query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
prof a remplace un autre prof
public function Aremplacer() { return $this->belongsToMany('App\Professeur','remplacants_prof','remplacant_id','prof_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProf(){\n return $this->prof;\n }", "function prof_print()\r\n{\r\n global $prof_timing, $prof_names, $profiling;\r\n $size = count($prof_timing);\r\n for($i=0;$i<$size - 1; $i++)\r\n {\r\n \tif($profiling)\r\n \t{\r\n \techo \"{$prof_names[$i]}\\n\";\r\n \techo sprintf(\" %f\\n\", $prof_timing[$i+1]-$prof_timing[$i]);\r\n \t}\r\n }\r\n if($profiling)\r\n {\r\n \techo \"{$prof_names[$size-1]}\\n\";\r\n\t}\r\n}", "public static function profile() {\r\n $args = func_get_args();\r\n $key = array_shift($args);\r\n $closure = array_shift($args);\r\n $start = microtime(true);\r\n $mem = memory_get_usage();\r\n $result = call_user_func_array($closure, $args);\r\n $mem = memory_get_usage() - $mem;\r\n self::count( $key . '.memory', memory_get_usage() - $mem);\r\n self::time( $key . '.duration', round((microtime(true) - $start) * 1000));\r\n return $result;\r\n }", "function prof_flag($str)\r\n{\r\n global $prof_timing, $prof_names;\r\n $prof_timing[] = microtime(true);\r\n $prof_names[] = $str;\r\n}", "function prof_flag($str)\n{\n global $prof_timing, $prof_names;\n $prof_timing[] = microtime(true);\n $prof_names[] = $str;\n}", "public function startProfiling($label) {}", "function prof_print()\n{\n global $prof_timing, $prof_names;\n $size = count($prof_timing);\n for ($i = 0; $i < $size - 1; $i++) {\n echo \"<b>{$prof_names[$i]}</b><br>\";\n echo sprintf(\"&nbsp;&nbsp;&nbsp;%f<br>\", $prof_timing[$i + 1] - $prof_timing[$i]);\n }\n echo \"<b>{$prof_names[$size - 1]}</b><br>\";\n}", "function getProfile()\n{\n\tglobal $time_start, $db;\n\n\t$start = $time_start;\n\t$end = gettimeofday();\n\t$dbcalls = count($db->queries);\n\t$dbtime = $db->time;\n\n\t$total = (float)($end['sec'] - $start['sec']) + ((float)($end['usec'] - $start['usec'])/1000000);\n\t$script = $total - $dbtime;\n\t$scriptper = $script / $total;\n\n\t$ret = round($total, 3) . 's, ' . round(100 * $scriptper, 1) . '% PHP, ' . round(100* (1 - $scriptper), 1) . '% SQL with ' . $dbcalls . ' ' . makeLink('queries', $_SERVER['QUERY_STRING'] . '&sqlprofile');\n\n\treturn $ret;\n}", "function setProfiling(){\r\n\t\t$this->query(\"SET profiling=1\");\r\n\t}", "public static function profile()\n\t{\n\t\t// Return the view\n\t\treturn View::factory('benchmark/profile')\n\t\t\t->set('memory', (memory_get_usage() - START_MEMORY) / 1024)\n\t\t\t->set('time', round(microtime(TRUE) - START_TIME, 5))\n\t\t\t->set('memory_limit', 131072) // 128M\n\t\t\t->set('time_limit', 30)\n\t\t\t->render();\n\t}", "public function profilerStart()\n {\n if (extension_loaded('xhprof')) {\n include_once($this->xhprofLibPath . 'utils/xhprof_lib.php');\n include_once($this->xhprofLibPath . 'utils/xhprof_runs.php');\n xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);\n }\n }", "public function iniPerformance(){\n $this->tiempo = microtime(true);\n $this->memoria = memory_get_usage();\n }", "function _visit_profile() {\n if (!$this->staff && !$this->has_arg('visit')) $this->_error('Access Denied', 403);\n\n $where = '';\n $args = array();\n\n if ($this->has_arg('bl')) {\n $where .= ' AND s.beamlinename LIKE :'. (sizeof($args)+1);\n array_push($args, $this->arg('bl'));\n }\n if ($this->has_arg('run')) {\n $where .= ' AND vr.runid = :' . (sizeof($args)+1);\n array_push($args, $this->arg('run'));\n }\n\n if ($this->has_arg('visit')) {\n $where .= \" AND CONCAT(CONCAT(CONCAT(p.proposalcode,p.proposalnumber), '-'), s.visit_number) LIKE :\".(sizeof($args)+1);\n array_push($args, $this->arg('visit'));\n }\n\n $dp = $this->db->pq(\"SELECT count(case when r.status='CRITICAL' then 1 end) as ccount, count(case when r.status!='SUCCESS' then 1 end) as ecount, count(case when r.status!='SUCCESS' then 1 end)/count(r.status)*100 as epc, count(case when r.status='CRITICAL' then 1 end)/count(r.status)*100 as cpc, count(r.status) as total, r.dewarlocation \n FROM robotaction r \n INNER JOIN blsession s on r.blsessionid=s.sessionid \n INNER JOIN proposal p ON p.proposalid = s.proposalid \n INNER JOIN v_run vr ON s.startdate BETWEEN vr.startdate AND vr.enddate\n WHERE r.actiontype LIKE 'LOAD' AND r.dewarlocation != 99 $where\n GROUP BY r.dewarlocation \n ORDER BY r.dewarlocation\", $args);\n \n \n $profile = array(array(\n array('label' => 'Total Loads', 'data' => array()),\n array('label' => '% Errors', 'data' => array(), 'yaxis' => 2),\n array('label' => '% Critical', 'data' => array(), 'yaxis' => 2),\n ),\n array());\n \n foreach ($dp as $e) {\n array_push($profile[0][0]['data'], array($e['DEWARLOCATION'], $e['TOTAL']));\n array_push($profile[0][2]['data'], array($e['DEWARLOCATION'], $e['CPC']));\n array_push($profile[0][1]['data'], array($e['DEWARLOCATION'], $e['EPC']));\n }\n \n $this->_output($profile);\n }", "function enableProfiler(){\t\t\n\t\t$CI = &get_instance();\n\t\t$CI->output->enable_profiler( config_item('enable_profiling') );\t\t\n\t}", "function init_performance_info() {\n\n global $PERF, $CFG, $USER;\n\n $PERF = new object();\n $PERF->logwrites = 0;\n if (function_exists('microtime')) {\n $PERF->starttime = microtime();\n }\n if (function_exists('memory_get_usage')) {\n $PERF->startmemory = memory_get_usage();\n }\n if (function_exists('posix_times')) {\n $PERF->startposixtimes = posix_times();\n }\n if (function_exists('apd_set_pprof_trace')) {\n // APD profiling\n if ($USER->id > 0 && $CFG->perfdebug >= 15) {\n $tempdir = $CFG->dataroot . '/temp/profile/' . $USER->id;\n mkdir($tempdir);\n apd_set_pprof_trace($tempdir);\n $PERF->profiling = true;\n }\n }\n}", "public function finPerformance(){\n $memoria = memory_get_usage() - $this->memoria;\n $tiempo = microtime(true) - $this->tiempo;\n\n echo \"<pre>\";\n print_r(array(\"memoria\" => $memoria.\" bytes \", \"tiempo\" => $tiempo.\" segundos\" ));\n die;\n }", "static function measure($name='std'){\n\t\t$next = count(self::$measures[$name]);\n\t\tself::$measures[$name][$next]['time'] = microtime(true);\n\t\tself::$measures[$name][$next]['mem'] = memory_get_usage();\n\t\tself::$measures[$name][$next]['peakMem'] = memory_get_peak_usage();\n\t}", "private function Benchmark()\r\n\t{\t\t\r\n\t}", "private function computeProfileCompletionScore()\n {\n if(0 === count($this->m_arrProfiles))\n {\n if($this->m_bDebugInfo)\n $this->logSection('DebugInfo: ', 'No Profile exists');\n return ;\n }\n \n $itr = count($this->m_arrProfiles);\n \n foreach($this->m_arrProfiles as $key=>$profileInfo)\n {\n try{\n $iProfileId = intval($profileInfo['PROFILEID']);\n $completionObj = ProfileCompletionFactory::getInstance(\"API\",null,$iProfileId);\n $score = $completionObj->updateProfileCompletionScore();\n if($this->m_bDebugInfo)\n {\n $debugInfo = 'DebugInfo : ProfileId -> '.$iProfileId.' and Score -> '.$score;\n $this->logSection($debugInfo);\n }\n unset($completionObj); \n } catch (Exception $ex) {\n if($this->m_bDebugInfo)\n {\n $this->logSection('DebugInfo: ', 'Exception occurred');\n var_dump($ex);\n }\n unset($completionObj); \n }\n }\n \n }", "function xhprof_disable()\n{\n}", "public function beginProfile($token, $category='application'){\n\t\t$log = array(\"Begin Profiling $token\", 8, $category, microtime(true));\n\t\t$this->_logs[] = $log;\n\t\t$this->_profiles[$token] = $log;\n\t\t$this->_profiles[$token]['startmem'] = $this->memory_used();\n\t}", "public function makeMiniProfile($input);", "function showProfile(){\r\n\t\tif( $profiles = $this->getArrayRow( \"SHOW profiles\" ) ){\r\n\t\t\t$html = '<table cellspacing=\"1\" cellpadding=\"10\" bgcolor=\"#cccccc\" style=\"font:11px Helvetica;\"><tr style=\"font-weight:bold\"><td>Query ID</td><td>exec time</td><td width=\"150\">%</td><td>Query</td></tr>';\r\n\t\t\tfor( $i=0, $execution_time = 0, $n=count($profiles); $i<$n; $i++ )\r\n\t\t\t\t$execution_time += $profiles[$i]['Duration'];\r\n\r\n\t\t\tforeach($profiles as $i => $p ){\r\n\t\t\t\t$perc = round( ( $p['Duration'] / $execution_time ) * 100, 2 );\r\n\t\t\t\t$width = ceil( $perc * 2 );\r\n\t \t\t\t$html .= '<tr bgcolor=\"#eeeeee\"><td>'.$p['Query_ID'].'</td><td>'.$p['Duration'].'</td><td><div style=\"float:left;width:50px;\">'.$perc.'%</div> <div style=\"display:inline; margin-top:3px;float:left;background:#ff0000;width:'.$width.'px;height:10px;\"></td><td>'.$p['Query'].'</td></tr>';\r\n\t\t\t}\r\n\t\t\treturn $html .= '</table>';\t\r\n\t\t}\r\n\t}", "public function profile($name = null)\n {\n if (!$this->cfg['collect']) {\n return;\n }\n if (!$this->cfg['enableProfiling']) {\n $callerInfo = $this->utilities->getCallerInfo();\n $this->appendLog(\n __FUNCTION__,\n array('Profile: Unable to start - enableProfiling opt not set. ' . $callerInfo['file'] .' on line ' . $callerInfo['line'] . '.')\n );\n return;\n }\n $args = \\func_get_args();\n $meta = $this->internal->getMetaVals(\n $args,\n array('channel' => $this->cfg['channelName']),\n array('name' => null),\n array('name') // move name to meta\n );\n if ($meta['name'] === null) {\n $meta['name'] = 'Profile '.$this->data['profileAutoInc'];\n $this->data['profileAutoInc']++;\n }\n $name = $meta['name'];\n $message = '';\n if (isset($this->data['profileInstances'][$name])) {\n $instance = $this->data['profileInstances'][$name];\n $instance->end();\n $instance->start();\n // move it to end (last started)\n unset($this->data['profileInstances'][$name]);\n $this->data['profileInstances'][$name] = $instance;\n $message = 'Profile \\''.$name.'\\' restarted';\n } else {\n $this->data['profileInstances'][$name] = $this->methodProfile; // factory\n $message = 'Profile \\''.$name.'\\' started';\n }\n $this->appendLog(\n __FUNCTION__,\n array(\n $message,\n ),\n $meta\n );\n }", "public function __construct() {\n parent::__construct();\n\n if(isset($_REQUEST[\"prof\"])) {\n $this->prof = $_REQUEST[\"prof\"];\n }\n $this->generateProfList();\n }", "public function prof_classes($current_prof){\n \tglobal $prof_classes;\n \t$prof_classes = array(); //global variable of array of classes\n \t$query = \"SELECT classname, professor FROM classes WHERE professor = $1;\";\n \t$query_result = pg_prepare($this->con, \"myquery13\", $query);\n \t\n\t \t$query_result = pg_execute($this->con, \"myquery13\", array($current_prof));\n\t if (!$query_result) {\n \t\t\techo \"An error occurred.\\n\";\n \t\t\texit;\n\t\t}\n\t\twhile($row = pg_fetch_row($query_result)){\n $input = \"$row[0] $row[1]\";\n global $prof_classes;\n array_push($prof_classes, $input);\n\t\t}\n if(empty($prof_classes)){echo(\"prof classes is empty\");}\n\t\t\n }", "function memory_trace_point($name=NULL)\n{\n\tglobal $MEMORY_POINTS;\n\tif (is_null($name)) $name='#'.integer_format(count($MEMORY_POINTS)+1);\n\t$MEMORY_POINTS[]=array(memory_get_usage(),$name);\n}", "public function getIdProf()\n {\n return $this->idProf;\n }", "public function logPerformance();", "public function logPerformance();", "public function endProfile($token){\n\t\t$log = $this->_profiles[$token];\n $log[0] = \"End Profiling $token\";\n\t\t$this->_logs[] = $log;\n\t\t$this->_profiles[$token]['result'] = microtime(true) - $this->_profiles[$token][3];\n\t\t$this->_profiles[$token]['memory'] = $this->memory_used() - $this->_profiles[$token]['startmem'];\n\t}", "public static function &profile() {\n\t\t$_profile=self::$global['PROFILE'];\n\t\t// Compute elapsed time\n\t\t$_profile['TIME']['start']=&self::$global['TIME'];\n\t\t$_profile['TIME']['elapsed']=microtime(TRUE)-self::$global['TIME'];\n\t\t// Reset PHP's stat cache\n\t\tforeach (get_included_files() as $_file)\n\t\t\t// Gather includes\n\t\t\t$_profile['FILES']['includes']\n\t\t\t\t[basename($_file)]=filesize($_file);\n\t\t// Compute memory consumption\n\t\t$_profile['MEMORY']['current']=memory_get_usage();\n\t\t$_profile['MEMORY']['peak']=memory_get_peak_usage();\n\t\treturn $_profile;\n\t}", "public function show(ProfModule $profModule)\n {\n \n }", "public function run()\n {\n //\n $this->call(Professeur::class);\n }", "function DatabugProfile($debug=0, $oid=null)\r\n{\r\n\t$this->__construct($debug, $oid);\r\n\tregister_shutdown_function( array($this, '__destruct') );\r\n}", "public function profileSql($time, $sql) {\n\t\tif (!is_null(CWebUser::$data) && isset(CWebUser::$data['debug_mode'])\n\t\t\t\t&& CWebUser::$data['debug_mode'] == GROUP_DEBUG_MODE_DISABLED) {\n\t\t\treturn;\n\t\t}\n\n\t\t$time = round($time, 6);\n\n\t\t$this->sqlTotalTime += $time;\n\t\t$this->sqlQueryLog[] = array(\n\t\t\t$time,\n\t\t\t$sql,\n\t\t\tarray_slice(debug_backtrace(), 1)\n\t\t);\n\t}", "private function profilerInit(): void\n {\n\n Profiler::init();\n Profiler::xhprofStart();\n\n }", "function initProfiler()\r\n{\r\n global $TIME_START;\r\n $TIME_START=microtime(1);\r\n global $DB_ITEMS_LOADED;\r\n $DB_ITEMS_LOADED=0;\r\n\r\n global $g_count_db_statements;\r\n $g_count_db_statements = 0;\r\n}", "function _incrementProfile($name, $start, $end, $incrementCounter = TRUE) {\r\n\t\tlist($startUSec, $startSec) = explode(' ', $start);\r\n\t\tlist($endUSec, $endSec) = explode(' ', $end);\r\n\t\t\t\r\n\t\t// typecast them to the required types\r\n\t\t$startSec = (int) $startSec;\r\n\t\t$startUSec = (float) $startUSec;\r\n\t\t\t\r\n\t\t$endSec = (int) $endSec;\r\n\t\t$endUSec = (float) $endUSec;\r\n\t\t\t\r\n\t\tif ($startUSec > $endUSec) {\r\n\t\t\t$val = ($endSec - 1 - $startSec) + ($startUSec + $endUSec);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$val = ($endSec - $startSec) + ($endUSec - $startUSec);\r\n\t\t}\r\n\t\t\t\r\n\t\tif (!array_key_exists($name, $this->_profiles))\r\n\t\t\t$this->_profiles[$name] = array(0, 0);\r\n\t\t\n\t\t$this->_profiles[$name][0] += $val;\r\n\t\tif ($incrementCounter) $this->_profiles[$name][1] += 1;\n\t}", "function xhprof_enable($flags = 0, array $options = [])\n{\n}", "public function beginDbProfile($token, $category='database'){\n\t\t$log = array(\"Begin SQL Profiling $token\", 8, $category, microtime(true));\n\t\t$this->_logs[] = $log;\n\t\t$this->_profiles[$token] = $log;\n $query_index = Doo::db()->getQueryCount();\n $this->_profiles[$token]['sqlstart'] = ($query_index<0)?0:$query_index;\n\t\t$this->_profiles[$token]['startmem'] = $this->memory_used();\n\t}", "public function createProfile()\n {\n if (self::$hook_statistics) {\n $profile = '';\n $profile .= 'Page' . ': ' . wa()->getConfig()->getCurrentUrl() . \"\\r\\n\";\n $profile .= \"----------------\\r\\n\";\n\n foreach (self::$hook_statistics as $hook_name => $hook) {\n $profile .= \"\\r\\n\";\n\n // Общие данные по хуку\n $profile .= $this->addLogCount('Hook', $hook_name, $hook['count'], $hook['time']);\n\n // Список точек наблюдения\n if (!empty($hook['points'])) {\n $profile .= \"Points:\\r\\n\";\n $profile .= $this->addLogPoints($hook) . \"\\r\\n\";\n }\n\n // Данные о вызовах\n if (!empty($hook['caller'])) {\n ksort($hook['caller']);\n $profile .= \"Callers:\\r\\n\";\n foreach ($hook['caller'] as $caller_id => $caller) {\n $profile .= self::TAB;\n $caller_name = $this->getCallerName($caller);\n $profile .= $this->addLogCount($caller_name['title'], $caller_name['name'], $caller['count'], $caller['time']);\n\n // Методы\n if (!empty($caller['calls'])) {\n $profile .= $this->addLogCallerCalls($caller);\n }\n\n // Точки\n if (!empty($hook['points'])) {\n $profile .= $this->addLogPoints($caller, self::TAB);\n }\n }\n }\n }\n\n waLog::log($profile, self::PROFILE_FILE);\n }\n }", "function xhprof_sample_disable()\n{\n}", "public function stats()\n\t{\n\t\t$stat = View::factory('profiler/stats');\n\t\t// echo $stat;\n\t}", "public function getProfesseurs()\n {\n return $this->professeurs;\n }", "protected function generateProfList() {\n $classData = getClassData(Main::getSemester(), Main::isTraditional());\n\t\t\tMain::$CAMPUS_MASK = array_pop($classData);\n\t\t\t$this->setCampusMask();\n\t\t\t//generate select option values for display later\n $data = array_filter($classData, create_function('Course $class', 'return $class->getCampus() & \"'.$this->campusMask.'\";'));\n foreach($data as $class) {\n $list = $class->getProfClassList();\n foreach($list as $prof=>$class2) {\n $this->profClassList[$prof][] = $class2;\n }\n }\n ksort($this->profClassList);\n }", "public function __mlmProfiteer(MlmParticipantInterface $participant);", "function trace(){\n\t\techo($this->get_trace()/(1024*1024).\" MB\");\n\t}", "function get_prof_rating($professorid){\r\n\r\n}", "function generate( $name ) \n {\n $this->render( 'xhprof.php' , $name . '.php' , array( \n 'name' => $name,\n ));\n }", "function listaJuradoProfesional(){\n\t\t$juradoProfesional = new JuradoProfesional();\n\t\treturn $juradoProfesional->listar();\n\t}", "public function test_apcu()\n {\n ini_set(\"apc.use_request_time\", 0);\n $type='apcu';\n $this->runMe($type,'unittest');\n $this->runDuration($type,'unittest');\n }", "public function show($Perprof)\n {\n if(Auth()->guard()->check() && Auth::user()->profornot == 0){\n $idperf=0;\n return redirect('/profile/create');\n }\n else\n {\n $Perprof=Artistprofile::find($Perprof) ?? abort(404);;\n return view(\"profiles.personalprofile\",compact('Perprof')); \n }\n }", "public function __destruct()\n {\n if ($this->args->has('profile'))\n {\n $td = microtime(true) - $this->time_start;\n $td = $td < 1 ? round($td * 1000, 2) . \"ms\" : round($td, 2) . \"s\";\n $mem = round(memory_get_peak_usage(false) / 1048576, 2) . \" MB\";\n printf(\"\\nRuntime: %s - mem: %s\", $td, $mem);\n }\n }", "protected function getFunctionReport() {\n\t\t$this->collateData();\n\n\t\t$width = 140;\n\t\t$nameWidth = $width - 65;\n\t\t$format = \"%-{$nameWidth}s %6d %13.3f %13.3f %13.3f%% %9d (%13.3f -%13.3f) [%d]\\n\";\n\t\t$titleFormat = \"%-{$nameWidth}s %6s %13s %13s %13s %9s\\n\";\n\t\t$prof = \"\\nProfiling data\\n\";\n\t\t$prof .= sprintf( $titleFormat, 'Name', 'Calls', 'Total', 'Each', '%', 'Mem' );\n\n\t\t$total = isset( $this->mCollated['-total'] )\n\t\t\t? $this->mCollated['-total']['real']\n\t\t\t: 0;\n\n\t\tforeach ( $this->mCollated as $fname => $data ) {\n\t\t\t$calls = $data['count'];\n\t\t\t$percent = $total ? 100 * $data['real'] / $total : 0;\n\t\t\t$memory = $data['memory'];\n\t\t\t$prof .= sprintf( $format,\n\t\t\t\tsubstr( $fname, 0, $nameWidth ),\n\t\t\t\t$calls,\n\t\t\t\t(float)( $data['real'] * 1000 ),\n\t\t\t\t(float)( $data['real'] * 1000 ) / $calls,\n\t\t\t\t$percent,\n\t\t\t\t$memory,\n\t\t\t\t( $data['min_real'] * 1000.0 ),\n\t\t\t\t( $data['max_real'] * 1000.0 ),\n\t\t\t\t$data['overhead']\n\t\t\t);\n\t\t}\n\t\t$prof .= \"\\nTotal: $total\\n\\n\";\n\n\t\treturn $prof;\n\t}", "public function save_run($xhprof_data, $type, $run_id = null);", "public function addProfesion($data) \n {\n $profesion = new Profesion();\n $this->addData($profesion, $data);\n if ($this->tryAddProfesion($profesion)) {\n $_SESSION['MENSAJES']['profesion_cliente'] = 1;\n $_SESSION['MENSAJES']['profesion_cliente_msj'] = 'Profesión agregada correctamente';\n } else {\n $_SESSION['MENSAJES']['profesion_cliente'] = 0;\n $_SESSION['MENSAJES']['profesion_cliente_msj'] = 'Error al agregar profesión';\n }\n return $profesion;\n }", "public function show(Profesor $profesor)\n {\n\n }", "public function optimize();", "public function optimize();", "public function enable_profiler($toggle = TRUE) {\n $CI = get_instance();\n $CI->output->enable_profiler($toggle);\n }", "public function testProfilePrototypeCountAccessTokens()\n {\n\n }", "private function _optimize() {}", "static function profiles() {\n global $LANG;\n\n $a_profil = array();\n $a_profil[] = array('profil' => 'agent',\n 'name' => $LANG['plugin_fusioninventory']['profile'][2]);\n $a_profil[] = array('profil' => 'remotecontrol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][3]);\n $a_profil[] = array('profil' => 'configuration',\n 'name' => $LANG['plugin_fusioninventory']['profile'][4]);\n $a_profil[] = array('profil' => 'wol',\n 'name' => $LANG['plugin_fusioninventory']['profile'][5]);\n $a_profil[] = array('profil' => 'unknowndevice',\n 'name' => $LANG['plugin_fusioninventory']['profile'][6]);\n $a_profil[] = array('profil' => 'task',\n 'name' => $LANG['plugin_fusioninventory']['profile'][7]);\n\n return $a_profil;\n }", "public function profilerStop()\n {\n if (extension_loaded('xhprof')) {\n $xhprofData = xhprof_disable();\n $xhprofRuns = new XHProfRuns_Default();\n $runId = $xhprofRuns->save_run($xhprofData, $this->xhprofNamespace);\n $profilerUrl = sprintf($this->xhprofHtmlPath . 'index.php?run=%s&source=%s', $runId, $this->xhprofNamespace);\n $styles = ' style=\"display: block; position: absolute; left: 5px; bottom: 5px; background: red; padding: 8px; z-index: 10000; color: #fff;\"';\n echo '<a href=\"' . $profilerUrl . '\" target=\"_blank\" ' . $styles . '>Profiler output</a>';\n }\n }", "public function show(Profesor $profesor)\n {\n //\n }", "public function Action_foo()\n\t{\n\t if (Kohana::$profiling === TRUE)\n\t {\n\t // Start a new benchmark\n\t $benchmark = Profiler::start('my_group', __FUNCTION__);\n\t }\n\t for($i=0;$i<1000000;$i++){\n\t \techo $i;\n\t }\n\t // Do some stuff\n\t if (isset($benchmark))\n\t {\n\t // Stop the benchmark\n\t Profiler::stop($benchmark);\n\t }\n\t echo View::factory('profiler/stats');\n\t}", "function adivinarTipoProfesor($array_A){\n $arrayA = $this->transformarDatosProfesor($array_A);\n $datos=new ManejoDatos();\n $array = new stdClass();\n $array_profesores=$datos->getProfesores();\n foreach ($array_profesores as $elemento) {\n $elemento = array($elemento['A'], $elemento['B'], $elemento['C'], $elemento['D'],$elemento['E'],\n $elemento['F'],$elemento['G'],$elemento['H'],$elemento['Class']);\n $arrayB=$this->transformarDatosProfesor($elemento);\n $temporal = $this->distanciaEuclidiana($arrayA, $arrayB);\n if ($temporal < $this->distancia) {\n $this->distancia = $temporal;\n $this->temporal = $elemento['8'];\n }\n }\n return $this->temporal;\n \n }", "function trace($msg)\n{\n $file = CIMAGE_DEBUG_FILE;\n if (!is_writable($file)) {\n return;\n }\n\n $timer = number_format((microtime(true) - $_SERVER[\"REQUEST_TIME_FLOAT\"]), 6);\n $details = \"{$timer}ms\";\n $details .= \":\" . round(memory_get_peak_usage()/1024/1024, 3) . \"MB\";\n $details .= \":\" . count(get_included_files());\n file_put_contents($file, \"$details:$msg\\n\", FILE_APPEND);\n}", "public static function startSession($mode = self::PROFILE_MODE_PRODUCTION)\n {\n self::endSession();\n self::$_mode = $mode;\n self::$_start_time = !empty($_SERVER['REQUEST_TIME_FLOAT']) ? $_SERVER['REQUEST_TIME_FLOAT'] : microtime(true);\n self::$_timer_profilers = array();\n self::$_memory_profilers = array();\n }", "public function recap(){\n\t\techo \"----- INFO\" . $this->getNom() . \" ----- <br>\";\n\t\techo $this->getNom() . \" a \" . $this->getVie() . ' points de vie <br>';\n\t}", "public function index()\n {\n //eager loading\n $profile = Artistprofile::with('User')->paginate(4);\n if(Auth()->guard()->check() && Auth::user()->profornot == 0){\n $idperf=0;\n return redirect('/profile/create');\n }\n elseif(Auth()->guard()->check()){\n $idPerf=Artistprofile::find(Auth::user()->id)->user_id;\n }\n else{\n $idPerf=0;\n }\n return view('profiles.profile',compact('profile','idPerf'));\n }", "public function start($id = self::DEFAULT_ID)\n {\n $microtime = false;\n if (self::$enabled) {\n $id = (!$id) ? self::DEFAULT_ID : (string)$id;\n if (isset($this->start[$id])) {\n $this->toss(\n \"Profiling\",\n \"Profiling has already started for identifier '{0}'.\",\n $id\n );\n }\n \n $this->start[$id] = $microtime = microtime(true);\n }\n \n return $microtime;\n }", "public function performanceStep()\r\n {\r\n $testName = $this->_jbrequest->getWord('testname');\r\n $result = $this->app->jbperform->execTest($testName);\r\n\r\n $this->app->jbajax->send($result);\r\n }", "public function __construct()\n {\n $this->middleware('profmanager');\n \n }", "function premier($nombre)\n{\n if($nombre > 10000){\n for($i = 1;$i <= $nombre; $i++)\n {\n $cpt=0;\n for($j=1;$j<=$i; $j++)\n {\n if($i%$j==0)\n {\n $cpt++;\n }\n }\n if($cpt==2)\n {\n $T1[] = $i;\n }\n } \n }else{\n echo \"<center>entrer un nombre superieur a 10 000<center>\";\n }\n\n $inferieurs = array();\n $superieurs= array();\n\n for($i=0;$i< count($T1); $i++)\n {\n if($T1[$i]< moyenne($T1))\n {\n $inferieurs[] = $T1[$i];\n }else{\n $superieurs[] = $T1[$i];\n }\n }\n\n $T = array\n (\n 'inferieur'=>$inferieurs,\n 'superieur'=>$superieurs\n );\n\n $_SESSION['T'] = $T1;\n\n $_SESSION['inferieur'] = $T['inferieur'];\n $_SESSION['superieur'] = $T['superieur'];\n}", "public function indexHistorialProfesor()\n { \n //$semestre = $this->get_semester(); //obtiene el semestre actual\n //$año = $this->get_year(); //obtiene el año actual\n $username = $this->getRequest()->getSession()->read('id'); //obtiene el nombre de usuario actualmente logueado\n \n /*Inicia seguridad*/\n $seguridad = $this->loadModel('Seguridad');\n $carne = $this->request->getSession()->read('id');\n $rolActual = $seguridad->getRol($carne);\n if ($carne != ''){\n $resultado = $seguridad->getPermiso($carne,13);\n if($resultado != 1 || $rolActual != 3){\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n }\n }\n else{\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n }\n /*Cierra la seguridad*/\n \n $idActual = $this->Solicitudes->getIDUsuario($username); //obtiene el id de usuario actualmente logueado\n \n $todo = $this->Solicitudes->getIndexValuesProfesor($idActual[0][0]); //carga el index con todas las solicitudes del profesor actualmente logueado\n \n \n $this->paginate = [\n 'contain' => ['Usuarios', 'Grupos']\n ];\n $estado = $this->get_estado_ronda();\n $this->set(compact('todo','estado'));\n $this->set('rolActual',$rolActual);\n }", "public function optimize() {}", "public function beforeStartProfile(Item $profile)\n {\n echo $profile->getSQLStatement();\n }", "public function actionDemo()\n {\n CommonUtility::startProfiling();\n try\n {\n //code\n }\n catch(Exception $e)\n { \n //catch exception\n $msg = $e->getMessage();\n CommonUtility::catchErrorMsg( $msg );\n }\n CommonUtility::endProfiling();\n }", "public function accelerate()\n {\n }", "private function initProfiler($di, $config) {\n\t\t\t$di->set('profiler', function () use ($config) {\n\t\t\t\n\t\t\t\t$profiler = new CustomProfiler();\n\t\t\t\treturn $profiler;\n\t\t\t\t\n\t\t\t}, true);\n\t\t\t\n\t\t}", "public function testProfilePrototypeCountQuarantines()\n {\n\n }", "public function microtime();", "function GetExecutionTime($start) \r\n{\r\n\t//return sprintf('%1.6f', (microtime(true) - $start)) . ' sec';\r\n\treturn (microtime(true) - $start) . ' sec';\r\n}", "public function start($name) {\n $this->marks[$name]['start'] = microtime();\n }", "private function warmUp()\r\n\t{\r\n\t\t$this->loadPage( 1 );\r\n }", "protected static function calculateOverhead( $profileCount ) {\n\t\twfProfileIn( '-overhead-total' );\n\t\tfor ( $i = 0; $i < $profileCount; $i++ ) {\n\t\t\twfProfileIn( '-overhead-internal' );\n\t\t\twfProfileOut( '-overhead-internal' );\n\t\t}\n\t\twfProfileOut( '-overhead-total' );\n\t}", "public static function getCurlTime($time_start, $request_url = '', $request_params = [], $request_method = 'GET', $respone = '')\r\n {\r\n if (self::isNeedXhprof()) {\r\n $time_end = self::microtimeFloat();\r\n $curl_time = $time_end - $time_start;\r\n $xhprof_dir = empty(ini_get(\"xhprof.output_dir\")) ? sys_get_temp_dir() : ini_get(\"xhprof.output_dir\");\r\n $xhprof_dir .= \"/\";\r\n $pathinfo = pathinfo($_SERVER['REQUEST_URI']);\r\n $xhprof_path_name = !empty($pathinfo['filename']) ? str_replace(['?','&','=','[',']','%','.'], '-', $pathinfo['filename']) : date(\"Y-m-d-H-i-s\");\r\n $xhprof_host = empty($_SERVER['HTTP_HOST']) ? '' : $_SERVER['HTTP_HOST'];\r\n $xhprof_curl_name = $xhprof_dir . \"curl-\" . $xhprof_host . '-' . $xhprof_path_name;\r\n if(strlen($xhprof_curl_name)>250) {\r\n $xhprof_curl_name = substr($xhprof_curl_name, 0, 150);\r\n }\r\n if (is_writable($xhprof_dir)) {\r\n file_put_contents($xhprof_curl_name, \"url:\" . print_r($request_url, true) . ' ' . $curl_time .PHP_EOL, FILE_APPEND);\r\n file_put_contents($xhprof_curl_name, \"method:\" . print_r($request_method, true) . ' ' . $curl_time .PHP_EOL, FILE_APPEND);\r\n file_put_contents($xhprof_curl_name, \"time:\" . print_r($curl_time, true). ' ' . $curl_time .PHP_EOL, FILE_APPEND);\r\n file_put_contents($xhprof_curl_name, \"params:\" . print_r($request_params, true) . ' ' . PHP_EOL, FILE_APPEND);\r\n if (isset($_REQUEST['rs']) && $_REQUEST['rs']==1) {\r\n file_put_contents($xhprof_curl_name, \"respone:\" . print_r($respone, true) . ' ' . PHP_EOL, FILE_APPEND);\r\n }\r\n }\r\n }\r\n }", "public function endProfiling($label) {}", "public function stats()\r\n\t{\r\n\t\treturn ProfilerToolbar::render(FALSE);\r\n\t}", "public function affiche (){\n\t\t\t//affiche en retour à la ligne\n\t\t\techo '<pre>';\n\t\t\tprint_r(array(\n\t\t\t\tname=>$this->Getname(),\n\t\t\t\tpv=>$this->Getpv(),\n\t\t\t\tlevel=>$this->Getlevel(),\n\t\t\t\tattack1=>$this->Getattack1(),\n\t\t\t\tattack2=>$this->Getattack2(),\n\t\t\t\ttype=>$this->Gettype()\n\t\t\t\t));\n\t\t\techo '</pre>';\n\t\t}", "function performance( $visible = false ) {\n\n $stat = sprintf( '%d queries in %.3f seconds, using %.2fMB memory',\n get_num_queries(),\n timer_stop( 0, 3 ),\n memory_get_peak_usage() / 1024 / 1024\n );\n\n echo $visible ? $stat : \"<!-- {$stat} -->\" ;\n}", "function do_personal()\r\n\t{\r\n\r\n\t\t$this->lib->do_profile();\r\n\r\n\t}", "private static function test_cpu() {\n\t\t$arr = array();\n\t\t$len = 1024;\n\t\t$delta = 3.14159;\n\t\tfor ( $i = 0; $i < $len; $i++ ) {\n\t\t\t$arr[] = $i * $delta;\n\t\t}\n\t\t$str = '';\n\t\tif ( function_exists( 'json_encode' ) ) {\n $str .= json_encode( $arr );\n } else {\n\t\t\t$str .= serialize( $arr );\n\t\t}\n\t\tunset( $arr );\n\t\tunset( $str );\n\t}", "public function endDbProfile($token){\n\t\t$log = $this->_profiles[$token];\n $log[0] = \"End SQL Profiling $token\";\n\t\t$this->_logs[] = $log;\n if($sqls = Doo::db()->showSQL())\n $this->_profiles[$token]['sql'] = implode(\"\\n\\r\", array_slice($sqls, $this->_profiles[$token]['sqlstart']));\n else\n $this->_profiles[$token]['sql'] = '';\n\t\t$this->_profiles[$token]['result'] = microtime(true) - $this->_profiles[$token][3];\n\t\t$this->_profiles[$token]['memory'] = $this->memory_used() - $this->_profiles[$token]['startmem'];\n\t}", "function performance( $visible = false ) {\n\n $stat = sprintf( '%d queries in %.3f seconds, using %.2fMB memory',\n get_num_queries(),\n timer_stop( 0, 3 ),\n memory_get_peak_usage() / 1024 / 1024\n );\n\n echo $visible ? $stat : \"<!-- {$stat} -->\" ;\n}", "public function setProfCurrentclass($currclass){\n\t\t$this->prof_currentclass = $currclass;\n global $Currentclass ;\n $Currentclass = $this->prof_currentclass;\n\t}", "public function prog(){\n array_push($this->prog_stack, $this->prog_scope);\n $ID1 = null;\n\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t023scopes.g\n // runtime/Php/test/Antlr/Tests/grammers/t023scopes.g\n {\n $ID1=$this->match($this->input,$this->getToken('ID'),self::$FOLLOW_ID_in_prog34); \n $this->prog_stack[count($this->prog_stack)-1]['name'] = ($ID1!=null?$ID1->getText():null);\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n array_pop($this->prog_stack);\n throw $e;\n }\n array_pop($this->prog_stack);\n\n return ;\n }", "protected function getTwig_ProfileService()\n {\n return $this->services['twig.profile'] = new \\Twig_Profiler_Profile();\n }", "private static function time_exec()\n {\n $current = self::time();\n self::$time_exec = $current-self::$time_start;\n }" ]
[ "0.6903261", "0.6431121", "0.6100533", "0.6035137", "0.5993913", "0.59808075", "0.59738225", "0.5884349", "0.5859831", "0.5734927", "0.5662561", "0.5660627", "0.5599928", "0.55087465", "0.5461623", "0.5422607", "0.5411157", "0.53971046", "0.5369315", "0.5309192", "0.5290299", "0.52464443", "0.5217499", "0.52109116", "0.5165868", "0.5162435", "0.51442695", "0.51384944", "0.5123379", "0.5123379", "0.51197004", "0.5113587", "0.5099185", "0.50710446", "0.50693476", "0.5040952", "0.5038562", "0.5016582", "0.5010296", "0.4973165", "0.49473548", "0.49361217", "0.49296376", "0.49095094", "0.48057753", "0.48031574", "0.4792093", "0.4782693", "0.47780827", "0.47609195", "0.4755125", "0.4753123", "0.47364902", "0.4734573", "0.47296232", "0.47215262", "0.4718476", "0.47114217", "0.4709125", "0.4709125", "0.47035348", "0.46943432", "0.46667433", "0.4648901", "0.46360436", "0.4623317", "0.46000513", "0.4590792", "0.45615014", "0.45535544", "0.45522624", "0.45496446", "0.45479324", "0.45419928", "0.45409417", "0.45406848", "0.45381507", "0.45326093", "0.45222244", "0.4521442", "0.4515402", "0.4511643", "0.44994664", "0.44961613", "0.4485776", "0.4469601", "0.44694626", "0.44650912", "0.4464025", "0.44626218", "0.44595286", "0.4450973", "0.44461462", "0.44412658", "0.4440761", "0.44380146", "0.4431043", "0.44250888", "0.44179857", "0.4411131", "0.44043335" ]
0.0
-1
Run the database seeds.
public function run() { $configs = [ 'admin' => [ [ 'name' => 'labels.dashboard', 'icon' => 'chart-pie', 'link' => 'dashboard', 'group' => 'dashboard', 'is_dev_feature' => false, ], [ 'name' => 'labels.company', 'icon' => 'user-group', 'link' => 'companies.index', 'group' => 'companies', 'is_dev_feature' => false, ], [ 'name' => 'labels.nav.invoice', 'icon' => 'receipt-tax', 'group' => 'invoices', 'is_dev_feature' => false, 'subs' => [ [ 'group' => 'invoices.releases', 'is_dev_feature' => false, ], [ 'group' => 'invoices.downloads', 'is_dev_feature' => false, ], [ 'group' => 'invoices.settings.notices', 'is_dev_feature' => false, ], [ 'group' => 'invoices.settings.visibilities', 'is_dev_feature' => false, ], [ 'group' => 'invoices.rates', 'is_dev_feature' => false, ], ], ], [ 'name' => 'labels.nav.aws', 'icon' => 'cloud', 'group' => 'aws', 'is_dev_feature' => false, 'subs' => [ [ 'group' => 'aws.accounts', 'is_dev_feature' => false, ], ], ], [ 'name' => 'labels.nav.support', 'icon' => 'support', 'group' => 'support', 'is_dev_feature' => false, 'subs' => [ [ 'group' => 'supports.faqs', 'is_dev_feature' => false, ], ], ], [ 'name' => 'labels.nav.auth', 'icon' => 'finger-print', 'group' => 'auth', 'is_dev_feature' => false, 'subs' => [ [ 'group' => 'auth.users', 'is_dev_feature' => true, ], [ 'group' => 'auth.roles', 'is_dev_feature' => true, ], [ 'group' => 'auth.permissions', 'is_dev_feature' => true, ], ] ], [ 'name' => 'labels.nav.system', 'icon' => 'server', 'group' => 'systems', 'is_dev_feature' => false, 'subs' => [ [ 'group' => 'systems.logs', 'is_dev_feature' => false, ], [ 'group' => 'systems.messages', 'is_dev_feature' => false, ], [ 'group' => 'systems.schedules', 'is_dev_feature' => false, ], [ 'group' => 'systems.settings', 'is_dev_feature' => false, ], ], ] ], 'frontend' => [ [ 'icon' => 'fas fa-chart-pie', 'link' => 'dashboard', 'group' => 'dashboard', 'is_dev_feature' => false, ], [ 'icon' => 'fas fa-bell', 'link' => 'notifications.index', 'group' => 'notifications', 'is_dev_feature' => false, ], [ 'icon' => 'fas fa-file-pdf', 'link' => 'invoices.pdf', 'group' => 'invoices.pdf', 'is_dev_feature' => false, ], [ 'icon' => 'fas fa-file-csv', 'link' => 'invoices.csv', 'group' => 'invoices.csv', 'is_dev_feature' => false, ], [ 'name' => 'labels.nav.ec2', 'icon' => 'fas fa-microchip', 'group' => 'ec2.instances', 'is_dev_feature' => false, 'subs' => [ [ 'group' => 'ec2.instances.registered', 'is_dev_feature' => false, ], [ 'group' => 'ec2.instances.requests', 'is_dev_feature' => false, ], ], ], [ 'name' => 'labels.nav.rds', 'icon' => 'fas fa-database', 'group' => 'rds.instances', 'is_dev_feature' => false, 'subs' => [ [ 'group' => 'rds.instances.registered', 'is_dev_feature' => false, ], [ 'group' => 'rds.instances.requests', 'is_dev_feature' => false, ], ], ], [ 'icon' => 'fas fa-network-wired', 'link' => 'aws.elbs.index', 'group' => 'aws.elbs', 'is_dev_feature' => false, ], [ 'icon' => 'fas fas fa-history', 'link' => 'logs.index', 'group' => 'logs', 'is_dev_feature' => false, ], [ 'icon' => 'fas fas fas fa-cog', 'link' => 'settings.index', 'group' => 'settings', 'is_dev_feature' => false, ], [ 'name' => 'Trusted Advisor', 'icon' => 'fas fa-user-check', 'group' => 'aws.trusted-advisors', 'is_dev_feature' => false, 'subs' => [ [ 'group' => 'aws.trusted-advisors.settings', 'is_dev_feature' => false, ], [ 'group' => 'aws.trusted-advisors.reports', 'is_dev_feature' => false, ], ], ], [ 'name' => 'labels.nav.apps', 'icon' => 'fas fa-layer-group', 'link' => 'apps', 'group' => 'apps', 'is_dev_feature' => false, ], // headers [ 'name' => 'labels.nav.help', 'icon' => 'fas fa-question-circle', 'group' => 'help', 'position' => 'header', 'is_dev_feature' => false, 'subs' => [ [ 'icon' => 'fas fa-comments', 'group' => 'faqs', 'is_dev_feature' => false, ], [ 'icon' => 'fas fa-book', 'group' => 'help.manual', 'is_dev_feature' => false, ], [ 'icon' => 'fas fa-info', 'group' => 'help.specs', 'is_dev_feature' => false, ], [ 'icon' => 'fas fa-check', 'group' => 'help.terms', 'is_dev_feature' => false, ], ], ], [ 'name' => 'labels.user', 'icon' => 'fas fa-user-circle', 'group' => null, 'position' => 'header', 'is_dev_feature' => false, 'subs' => [ [ 'icon' => 'fas fa-at', 'group' => 'contact', 'is_dev_feature' => false, ], [ 'icon' => 'fas fa-id-card', 'group' => 'profile', 'is_dev_feature' => false, ], [ 'icon' => 'fas fa-exchange-alt', 'group' => 'login.confirm', 'is_dev_feature' => false, ], [ 'icon' => 'fas fa-sign-out-alt', 'group' => 'logout', 'is_dev_feature' => false, ], ], ], ], ]; $navigations = []; foreach ($configs as $site => $items) { foreach ($items as $item) { $subs = $item['subs'] ?? []; unset($item['subs']); // prepend site to all group & link $item['group'] = "{$site}.{$item['group']}"; $item['link'] = isset($item['link']) ? "{$site}.{$item['link']}" : null; !isset($item['name']) && $item['name'] = "routes.{$item['link']}"; isset($item['position']) || $item['position'] = 'sidebar'; $item['site'] = $site; $item['parent'] = null; $navigations[] = $item; if ($subs) { foreach ($subs as $subItem) { $subItem['group'] = "{$site}.{$subItem['group']}"; $link = $subItem['group'] . '.index'; if (!Route::has($link)) { $link = $subItem['group']; } $name = 'routes.' . $link; $navigations[] = [ 'name' => $name, 'icon' => $subItem['icon'] ?? null, 'link' => $link, 'group' => $subItem['group'], 'parent' => $item['name'], 'is_dev_feature' => $subItem['is_dev_feature'], 'position' => $item['position'], 'site' => $site, ]; } } } } Navigation::truncate(); Navigation::insert($navigations); cache()->forget('admin.navigations'); cache()->forget('frontend.navigations'); cache()->forget('frontend.headers'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
/========= get all ads data ============
public function get_all_ads_data() { return $this->db->get('ads')->result(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadAds(){\n\t\t$adsStmt = $this->dbc->query('SELECT id FROM items');\n\t\t//creates new array $ads\n\t\t$ads = [];\n\n\t\t//calls fetch and stores new ad as a new row\n\t\twhile($row = $adsStmt->fetch(PDO::FETCH_ASSOC)){\n\n\t\t\t$ad = new Ad($this->dbc, $row['id']);\n\t\t\t//stores the row into new array\n\t\t\t$ads[] = $ad;\n\t\t}\n\t\treturn $ads;\n\t}", "public function getAds(){\n return $this->ifsp->getAds();\n }", "public static function all()\n {\n \t//Start by connecting to the DB\n \tself::dbConnect();\n \t$stmt = self::$dbc->query('SELECT * FROM ads');\n \t//Assign results to a variable\n \t$result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n \t$instance = null;\n if ($result) {\n $instance = new static;\n $instance->attributes = $result;\n }\n return $instance;\n\n }", "public function get_all_ads($limit, $offset) {\n $data = $this->db->get('advertisement', $limit, $offset);\n return $data->result();\n // $sql = \"select * from advertisement\";\n // $data = $this->db->query($sql);\n // return $data->result();\n }", "public function iN_ShowAds() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_advertisements WHERE ads_status = '1' ORDER BY RAND() LIMIT 2\") or die(mysqli_error($this->db));\n\t\twhile ($row = mysqli_fetch_array($query)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}", "public function getAds() {\n return $this->getAdsFromSettings($this->getSettings());\n }", "public function get_all ();", "public function getAllWithUsers()\n {\n $sql = \"SELECT \n a.id as 'adid',\n a.userid as 'userid',\n a.title as 'adtitle',\n u.name as 'username'\n from advertisements a \n left join users u ON a.userid = u.id;\";\n\n $conn = $this->dbc->Get();\n $statement = $conn->prepare($sql);\n $statement->execute();\n $data = $statement->fetchAll();\n $conn = null;\n\n return $data;\n }", "public function getAds(): string\n {\n $html = '';\n\n\n $adsService = new AdsService();\n $ads = $adsService->getAds();\n\n foreach ($ads as $ad) {\n $html .=\n '#' . $ad->getId() . ' ' .\n $ad->getTitle() . ' ' .\n $ad->getDescription() . ' ' .\n $ad->getUserId() . ' ' .\n $ad->getCarId() . '<br />';\n }\n\n return $html;\n }", "public function getAds()\n {\n $ads = Ad::with('store')->where('company_id',Auth::id())->get();\n return Datatables::of($ads)\n ->addColumn('store_name', function ($ad) {\n return $ad->store->name;\n })\n ->addColumn('time', function ($ad) {\n return $ad->time.' seconds';\n })\n ->addColumn('preview', function ($ad) {\n if($ad->media_type == 'image') {\n return '<img width=\"100\" src=\"'.checkImage('ads/'. $ad->media).'\" /> <span style=\"padding-left: 30px\">(Image)</span>';\n }\n else {\n //return '<embed src=\"'.checkImage('ads/'. $ad->media).'\" autostart=\"false\" height=\"30\" width=\"50\" />';\n return '<video width=\"100\" ><source src=\"'.checkImage('ads/'. $ad->media).'\" type=\"video/mp4\"></video> <span style=\"padding-left: 30px\">(Video)</span>';\n }\n })\n ->addColumn('action', function ($ad) {\n return '\n <a href=\"ads/'. Hashids::encode($ad->id).'/edit\" class=\"text-primary\" data-toggle=\"tooltip\" title=\"Edit Ad\"><i class=\"fa fa-edit action-padding\"></i> </a> \n <a href=\"javascript:void(0)\" class=\"text-danger btn-delete\" data-toggle=\"tooltip\" title=\"Delete Ad\" id=\"'.Hashids::encode($ad->id).'\"><i class=\"fa fa-trash action-padding\"></i></a>';\n })\n ->rawColumns(['action','store_name','preview'])\n ->editColumn('id', 'ID: {{$id}}')\n ->make(true);\n }", "public function get_all_ads($status = \"active\")\t{\n\n\t}", "Public Function getAllAccountsAdwords()\n\t{\n\t\t$AcctAdwords = new Accounts_Adwords($this->id);\n\t\treturn $AcctAdwords->GetAllAccounts();\n\t}", "public static function getAll() {}", "public final function get_all()\n {\n }", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public static function getAll();", "public static function getAll();", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public function get_all () {\r\n\t\treturn $this->_data;\r\n\t}", "public function getAll()\n {\n $sql=\"CALL SP_APODERADOS_SELECT_ALL()\";\n return $this->mysqli->findAll($sql);\n }", "public abstract function getAll();", "public function index()\n {\n $title = trans('app.all_ads');\n $ads = Ad::with('city', 'country', 'state')->whereStatus('1')->orderBy('id', 'desc')->paginate(20);\n\n return view('admin.all_ads', compact('title', 'ads'));\n }", "public function index()\n {\n $adverts = Advert::orderBy('updated_at', 'desc')->paginate(15);\n //->get();\n //->paginate(15);\n\n // Palauta kaikki resurssina\n return IlmoitusResource::collection($adverts);\n }", "function getAll(){\r\n \treturn $this->data;\r\n }", "function get_all_data($adviserId=\"\") { \n $this->make_query($adviserId); \n $query = $this->adviceprocess_db->get(); \n return $query->num_fields();\n }", "public static function getAll(){\n $rows = DB::table('clients')\n ->join('client_deals', 'clients.id', '=', 'client_deals.client_id')\n ->join('deal_details', 'client_deals.id', '=', 'deal_details.client_deal_id')\n ->orderby('hour')->get(array('clients.id as cid','client_deals.id as cdid','clients.*','deal_details.*','client_deals.*'));\n return $rows;\n }", "abstract public function getAll();", "abstract public function getAll();", "abstract public function getAll();", "public function doQuery() {\n // Selects all of ads' title and writer's name\n $queryString = \"SELECT title, name FROM advertisements INNER JOIN users ON users.id = advertisements.userid ORDER BY advertisements.id DESC\";\n\n $getAds = $this->sql->query($queryString);\n\n // Store the result array in the $data variable, which can be available by getData() later\n while($rows = $getAds->fetch_array(MYSQLI_ASSOC)) {\n array_push($this->data, $rows);\n }\n }", "public function get()\n {\n $this->_access(\"get\");\n $data = $this->Assets_model->getAdList(Assets_model::FULL_LIST);\n $this->_returnAjax(true, $data);\n }", "protected function getAll() {}", "function getAll();", "function getAll();", "public static function getAll(): array;", "function getAll()\r\n {\r\n\r\n }", "function gatherResults($conn, $advert_id)\n {\n $query = \"SELECT whwp_Advert.* FROM whwp_Advert \"\n . \"WHERE whwp_Advert.advert_id = :advert_id \";\n $conn->prepQuery($query);\n $conn->bind('advert_id', $advert_id);\n $advert=[];\n $advert = $conn->single();\n return $advert;\n }", "public function get()\n {\n $q = 'SELECT * FROM `affiliate`';\n \n // Sending data to the function select in dal\n $results = $this->getDal()->select($q);\n $resultsArray = [];\n\n while ($row = $results->fetch()) {\n array_push($resultsArray, new ModelWordsA($row));\n }\n\n return $resultsArray;\n\n }", "function listAll() \r\n {\r\n \r\n //new PDOAgent\r\n $p = new PDOAgent(\"mysql\", DB_USER, DB_PASS, DB_HOST, DB_NAME);\r\n\r\n //Connect to the Database\r\n $p->connect();\r\n\r\n //Setup the Bind Parameters\r\n $bindParams = [];\r\n\r\n //Get the results of the insert query (rows inserted)\r\n $results = $p->query(\"SELECT * FROM Coaches;\", $bindParams);\r\n\r\n //Disconnect from the database\r\n $p->disconnect();\r\n \r\n //Return the objects\r\n return $results;\r\n\r\n }", "public function getAll() : array;", "public function index()\n {\n $ds = Ads::orderby('ads_id','desc')->get();\n return view('BE.ads.show', compact('ds'));\n }", "public function campaigns()\n {\n $campaigns = App::get('database')->getAll('campaigns');\n\n echo json_encode($campaigns);\n }", "function get_all(){\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM evs_database.evs_set_form_attitude\";\n $query = $this->db->query($sql);\n\t\treturn $query;\n\n\t}", "public function getAll()\n\t{\n\t\treturn $this->data;\n\t}", "public function getAll(): array;", "public function getAll(): array;", "public function getAll(): array;", "public function index()\n {\n $result = Ad::orderby('id','desc')->get();\n if(!$result->isEmpty()){\n foreach ($result as $val){\n $inter = app(AdRepository::class)->find($val->id);\n }\n }\n return view('web.ad.index',['data' => $result]);\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM cst_hit';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function getAll()\n {\n $sql = \"SELECT * FROM \" . self::table . \";\";\n\n $conn = $this->dbc->Get();\n $statement = $conn->prepare($sql);\n $statement->execute();\n $data = $statement->fetchAll();\n $conn = null;\n\n return $data;\n }", "public function get_all_data()\n\t{\n\t\treturn $this->_data;\n\t}", "public function get_all()\n\t{\n\t\t$db = $this->db_connection->get_connection();\n\n $sql = \"SELECT a.id, a.type_id, a.total_area_id, a.factual_area, a.floor, a.num, a.price, a.discount, a.status, t.type, t_a.total_area, GROUP_CONCAT(DISTINCT w.id, '-', w.name SEPARATOR ', ') AS windows, GROUP_CONCAT(DISTINCT g.id, '-', g.name SEPARATOR ', ') AS glazings FROM apartments a LEFT JOIN apartments_windows a_w ON a.id = a_w.apartment_id LEFT JOIN windows w ON a_w.window_id = w.id LEFT JOIN types t ON a.type_id = t.id LEFT JOIN total_areas t_a ON a.total_area_id = t_a.id LEFT JOIN apartments_glazings a_g ON a.id = a_g.apartment_id LEFT JOIN glazings g ON a_g.glazing_id = g.id GROUP BY a.id ORDER BY a.num DESC\";\n\n \t$query = $db->prepare($sql);\n\n\t\tif ($query->execute()) {\n\t\t\treturn $query->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t} else {\n\t\t\thttp_response_code(500);\n\t\t\t$this->validator->check_response();\n\t\t}\n\t}", "function getAnnouncements($all)\n { \n if($all == 1)\n {\n // Request for ALL announcements\n $dbQuery = sprintf(\"SELECT * FROM CRC_Announcements_Info ORDER BY StartDate DESC\");\n }\n else\n {\n // Request for VALID announcements based on date\n $dbQuery = sprintf(\"SELECT * FROM CRC_Announcements_Info WHERE StartDate <= CURDATE() AND EndDate >= CURDATE() ORDER BY StartDate DESC\");\n }\n $result = getDBResultsArray($dbQuery);\n \n // Return data payload as JSON\n header(\"Content-type: application/json\");\n echo json_encode($result);\n }", "public function getAll()\n {\n // return Addon::orderBy('id','DESC')->get();\n return Addon::where('store_id',Auth::user()->id)->orderBy('id','DESC')->get();\n }", "public function getAll() {\n\t\treturn $this->data;\n\t}", "public static function all(){\n\t\t$bdd = new DBcnx();\n\t\t\treturn $bdd->allClient();\n\t}", "public function index()\n {\n return Ad::all()->toJson(JSON_UNESCAPED_UNICODE);\n }", "public function getAllData() {\n\t\treturn $this->_data;\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM patient_info';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "function GETDataKelas_All(){\r\n\r\n // Perintah Get Data Kelas\r\n return $this->MKelas->GET();\r\n }", "public function getAll()\n\t{\n\t\treturn $this->db->get('data_b')->result();\n\t}", "public function index(){\n $leads = Lead::getAllLead();\n\n return $leads;\n }", "private function getCatsData(): array {\n $database = \\Drupal::database();\n $query = $database->query(\"SELECT id, cats_name,email, image_url, created FROM {deku}\");\n return $query->fetchAll();\n }", "public function getAd($adid)\n\t\t{\n\t\t\t$this->db->select('*'); \n\t\t\t $this->db->from('ads');\n \t\t\t $this->db->join('users','ads.owner = users.userid','left');\n \t\t\t $this->db->join('persons','users.personid=persons.personid');\n \t\t\t $this->db->where('ads.adid',$adid);\n \t\t\n return $this->db->get();\n\t\t}", "public function getAll(){\n $adapter = $this->createAdapter();\n $results = $adapter->query($this->getSelectStatement());\n return $results;\n $adapter = null;\n }", "public function getAllData() {\n\t\treturn $this->data;\n\t}", "public function getData(){\n\t\t$url = $this->host . \"/rest/v1/leads.json?access_token=\" . $this->getToken()\n\t\t\t\t\t\t. \"&filterType=\" . $this->filterType . \"&filterValues=\" . $this::csvString($this->filterValues);\n\t\t\n\t\tif (isset($this->batchSize)){\n\t\t\t$url = $url . \"&batchSize=\" . $this->batchSize;\n\t\t}\n\t\tif (isset($this->nextPageToken)){\n\t\t\t$url = $url . \"&nextPageToken=\" . $this->nextPageToken;\n\t\t}\n\t\tif(isset($this->fields)){\n\t\t\t$url = $url . \"&fields=\" . $this::csvString($this->fields);\n\t\t}\n\t\t\n\t\t//debug\n\t\t//echo '<p>url after = ' . $url . '</p>';\n\t\t\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('accept: application/json',));\n\t\t$response = curl_exec($ch);\n\t\treturn $response;\n\t}", "public function getAll()\n {\n }", "public static function getAllBannerCampaigns()\n {\n return self::resultSetToObjArray(\n self::$db->fetchColumn('SELECT banner_campaign_id FROM website.banner_campaign')\n );\n }", "public function getDataList(){\n return $this->_get(1);\n }", "public function index()\n {\n $ads = Ads::all();\n return view('ads.index', compact('ads'));\n }", "private function readAll(){\r\n $results = array();\r\n \r\n if ( null !== $this->getDB() ) {\r\n $dbs = $this->getDB()->prepare('select * from about_page');\r\n \r\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\r\n $results = $dbs->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n \r\n } \r\n return $results;\r\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM turma_disciplina';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function getAllData()\n {\n $result = array();\n\n foreach ($this->list as $item)\n $result[] = $item->getAllData();\n\n return $result;\n }", "public function getAllRecords();" ]
[ "0.73616433", "0.71695775", "0.7024424", "0.6936244", "0.6893066", "0.68124807", "0.6736222", "0.67176384", "0.6714373", "0.668626", "0.66410184", "0.6527145", "0.6497333", "0.64401305", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439837", "0.6439837", "0.64191616", "0.64191616", "0.64191616", "0.64189005", "0.64189005", "0.6402552", "0.6401848", "0.63600826", "0.6349716", "0.6343665", "0.6336362", "0.63347036", "0.632608", "0.63196707", "0.63196707", "0.63196707", "0.63188106", "0.62947893", "0.6291641", "0.6282894", "0.6282894", "0.6250092", "0.6234719", "0.6234214", "0.6227762", "0.6182724", "0.61746573", "0.61743194", "0.6155409", "0.6154944", "0.6146428", "0.6131074", "0.6131074", "0.6131074", "0.61181027", "0.61001664", "0.6094842", "0.608575", "0.6062381", "0.6061117", "0.60583586", "0.60559875", "0.6044111", "0.6041292", "0.6036682", "0.6032469", "0.6031846", "0.602937", "0.602936", "0.6029029", "0.6028286", "0.60270107", "0.60235304", "0.60188377", "0.6015904", "0.6004294", "0.6000422", "0.59965634", "0.59936875", "0.599347", "0.59890467", "0.598771" ]
0.83270156
0
/========== Sotre Ads Data=========
public function insert_ads_data($image_path = null) { $attr=[ 'a_title' => $this->input->post('a_title'), 'image_path' =>$image_path, ]; $insert = $this->db->insert('ads', $attr); if($insert): return TRUE; else: return FALSE; endif; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_all_ads_data()\n\t{\n\t\treturn $this->db->get('ads')->result();\n\t}", "function loadAds(){\n\t\t$adsStmt = $this->dbc->query('SELECT id FROM items');\n\t\t//creates new array $ads\n\t\t$ads = [];\n\n\t\t//calls fetch and stores new ad as a new row\n\t\twhile($row = $adsStmt->fetch(PDO::FETCH_ASSOC)){\n\n\t\t\t$ad = new Ad($this->dbc, $row['id']);\n\t\t\t//stores the row into new array\n\t\t\t$ads[] = $ad;\n\t\t}\n\t\treturn $ads;\n\t}", "public function listdataAdmAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('ADMINISTRASI SYSTEM');\n }", "public function doQuery() {\n // Selects all of ads' title and writer's name\n $queryString = \"SELECT title, name FROM advertisements INNER JOIN users ON users.id = advertisements.userid ORDER BY advertisements.id DESC\";\n\n $getAds = $this->sql->query($queryString);\n\n // Store the result array in the $data variable, which can be available by getData() later\n while($rows = $getAds->fetch_array(MYSQLI_ASSOC)) {\n array_push($this->data, $rows);\n }\n }", "public function getAds(){\n return $this->ifsp->getAds();\n }", "protected function importData()\n\t{\n\t\tinclude_once \"Services/ADN/AD/classes/class.adnPersonalData.php\";\n\t\t$data = adnPersonalData::getData($this->filter, $this->mode);\n\t\t$this->setData($data);\n\t\t//$this->setMaxCount(sizeof($users));\n\t}", "public function analytics(){\n $ads = \\Auth::user()->ads()->where('active', '>', 0)->get();\n foreach ($ads as $ad) {\n $ad->generateClicksByMonthChart();\n $ad->generateClicksByPageChart();\n $ad->generateClicksByZipChart();\n $ad->generateClicksByCityChart();\n $ad->generateClicksByStateChart();\n }\n return view('analytics/index',[\n 'business' => null,\n 'ads' => $ads\n ]);\n }", "public function listdataAsetAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('ASET');\n }", "public function text_advertising()\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$this->load->model('text_advertising_model', 'tam');\n\t\t\t$data['text_ads'] = $this->tam->get_all();\n\t\t\t$this->load->view('text_advertising-admin', $data);\n\t\t}", "private function getData()\n\t{\n\t\t// get the record\n\t\t$this->record = (array) BackendBannersModel::get($this->id);\n\n\t\t// no item found, throw an exceptions, because somebody is fucking with our URL\n\t\tif(empty($this->record)) $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing');\n\t}", "public function getAds()\n {\n $ads = Ad::with('store')->where('company_id',Auth::id())->get();\n return Datatables::of($ads)\n ->addColumn('store_name', function ($ad) {\n return $ad->store->name;\n })\n ->addColumn('time', function ($ad) {\n return $ad->time.' seconds';\n })\n ->addColumn('preview', function ($ad) {\n if($ad->media_type == 'image') {\n return '<img width=\"100\" src=\"'.checkImage('ads/'. $ad->media).'\" /> <span style=\"padding-left: 30px\">(Image)</span>';\n }\n else {\n //return '<embed src=\"'.checkImage('ads/'. $ad->media).'\" autostart=\"false\" height=\"30\" width=\"50\" />';\n return '<video width=\"100\" ><source src=\"'.checkImage('ads/'. $ad->media).'\" type=\"video/mp4\"></video> <span style=\"padding-left: 30px\">(Video)</span>';\n }\n })\n ->addColumn('action', function ($ad) {\n return '\n <a href=\"ads/'. Hashids::encode($ad->id).'/edit\" class=\"text-primary\" data-toggle=\"tooltip\" title=\"Edit Ad\"><i class=\"fa fa-edit action-padding\"></i> </a> \n <a href=\"javascript:void(0)\" class=\"text-danger btn-delete\" data-toggle=\"tooltip\" title=\"Delete Ad\" id=\"'.Hashids::encode($ad->id).'\"><i class=\"fa fa-trash action-padding\"></i></a>';\n })\n ->rawColumns(['action','store_name','preview'])\n ->editColumn('id', 'ID: {{$id}}')\n ->make(true);\n }", "public function iN_ShowAds() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_advertisements WHERE ads_status = '1' ORDER BY RAND() LIMIT 2\") or die(mysqli_error($this->db));\n\t\twhile ($row = mysqli_fetch_array($query)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}", "protected function readDataRecords()\n {\n \tparent::readDataRecords();\n\n \tforeach ($this->file_contents->Activities->Activity->Lap->Track->Trackpoint as $theSeg) {\n \t\n \t\t$data['Time']=$theSeg->Time;\n \t\t$data['Ele']=$theSeg->AltitudeMeters;\n \t\t$data['Dist']=$theSeg->DistanceMeters/1000;\n \t\t$data['Cadence']=$theSeg->Cadence;\n \t\t$data['Heart']=$theSeg->HeartRateBpm->Value;\n \t\t$data['Lat']=$theSeg->Position->LatitudeDegrees;\n \t\t$data['Long']=$theSeg->Position->LongitudeDegrees;\n \t\n \t\n \t\t$this->addData($data);\n \t\t\t\n \t}\n \t$this->makeSession();\n \n }", "public function listdataSDMAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('SDM');\n }", "public function ads(){\n\tif ($this->session->userdata('logged_in')){\n\t\t$data['title'] = 'Ads';\n\t\t$data['adsList'] = $this->common_model->get_all('fr_ads', '');\n\t\t$this->set_layout('ads/ads_list',$data);\n\t}else{\n\t\t$this->load->view('site/login');\n\t}\n}", "public function getData() {\r\n\r\n\t\t$sodexo_domain = 'http://www.sodexo.fi/';\r\n\t\t$path = 'ruokalistat/output/daily_json/';\r\n\r\n\t\tforeach ($this->id_arr as $key => $value) {\r\n\r\n\t\t\t$json_data = file_get_contents($sodexo_domain . $path . $value . '/' . $this->pvm .'/fi');\r\n\r\n\t\t\t$course_info = $this->toObjectArray($json_data);\r\n\t\t\t\r\n\t\t\t$this->id_arr[$key] = $course_info;\r\n\t\t}\r\n\t}", "function ambil_data_on_going()\n\t{\n\t\t\n\t\t$sql=\"SELECT * FROM irena_view_sbsn_on_going\";\n\t\treturn $this->db->query($sql);\n\t}", "function fill_ads_data()\n {\n $CI =& get_instance();\n $request_param = explode('/', $_SERVER['REQUEST_URI']);\n // if() \n $data['is_preview'] = in_array('preview', $request_param) ? true: false;\n if($data['is_preview']){\n // echo $_SERVER['REQUEST_URI'];\n // print_r($request_param);\n $dbadmin = $CI->load->database(DB_SETTING3, true);\n $q = \"select * from admin_advertise_list where DATE(start_date) >= '\".date('Y-m-d').\"' and '\".date('Y-m-d').\"' <= DATE(expired_date)\";\n // echo $q;\n $exec = $dbadmin->query($q);\n\n $list_iklan = $exec->result_array();\n $exec->free_result();\n $list_iklan_atas_kiri = array();\n $list_iklan_atas_kanan = array();\n $list_iklan_bawah_kiri = array();\n $list_iklan_bawah_kanan = array();\n $list_iklan_melayang_kiri = array();\n $list_iklan_melayang_kanan = array();\n $index_atas_kiri=0;\n $index_bawah_kiri=0;\n $index_atas_kanan=0;\n $index_bawah_kanan=0;\n $index_melayang_kiri=0;\n $index_melayang_kanan=0;\n foreach ($list_iklan as $key => $value) {\n if($value['id_area'] == 1) $list_iklan_atas_kiri[$index_atas_kiri++] = $list_iklan[$key];\n elseif ($value['id_area'] == 2) $list_iklan_atas_kanan[$index_atas_kanan++] = $list_iklan[$key];\n elseif ($value['id_area'] == 3) $list_iklan_bawah_kiri[$index_bawah_kiri++] = $list_iklan[$key];\n elseif ($value['id_area'] == 4) $list_iklan_bawah_kanan[$index_bawah_kanan++] = $list_iklan[$key];\n elseif ($value['id_area'] == 5) $list_iklan_melayang_kiri[$index_melayang_kiri++] = $list_iklan[$key];\n elseif ($value['id_area'] == 6) $list_iklan_melayang_kanan[$index_melayang_kanan++] = $list_iklan[$key];\n }\n $data['list_iklan'] = array(\n 'top_left' => $list_iklan_atas_kiri,\n 'top_right' => $list_iklan_atas_kanan,\n 'bottom_left' => $list_iklan_bawah_kiri,\n 'bottom_right' => $list_iklan_bawah_kanan,\n '_left' => $list_iklan_melayang_kiri,\n '_right' => $list_iklan_melayang_kanan\n );\n // echo \"<pre>\";\n // print_r($data);\n // echo \"</pre>\";\n // print_r($list_iklan);\n // exit;\n \n $data['position'] = $CI->input->get(\"pos\");\n $CI->db = $CI->load->database(DB_SETTING, true);\n\n }\n\n return $data;\n }", "public function run()\n {\n $getJson = File::get(\"database/data/ad.json\");\n $decodedAdvert = json_decode($getJson);\n\n foreach ($decodedAdvert as $dataAdvert) {\n $advert = new Advert();\n $advert->title = $dataAdvert->title;\n $advert->slug = Str::slug($dataAdvert->title);\n $advert->publication_date = $dataAdvert->publication_date;\n $advert->update_date = $dataAdvert->update_date;\n $advert->content = $dataAdvert->content;\n $advert->picture = $dataAdvert->picture;\n $advert->slug_city = Str::slug($dataAdvert->slug_city);\n $advert->slug_subcategory = Str::slug($dataAdvert->slug_subCategory);\n $advert->slug_category = Str::slug($dataAdvert->slug_category);\n $advert->user_id_advert = $dataAdvert->user_id_advert;\n $advert->is_active = $dataAdvert->is_active;\n $advert->save();\n }\n }", "private function getData(){\n\t\tdb::getAdapter();\n\t\t\n\t\t$counter=0;\n\t\t$arrayFieldQuery=array();\n\t\tforeach($this->fields as $field){\n\t\t\t$arrayFieldQuery[$field]=$this->types[$counter];\n\t\t\t$counter++;\n\t\t}\n\t\t\n\t\t$counter=0;\n\t\t$arrayFilters=array();\n\t\tforeach($this->filters as $filter){\n\t\t\t$arrayFilters[$this->fields[$filter[0]]]=array(\"type\"=>$this->types[$filter[0]],\"value\"=>$filter[1]);\n\t\t}\n\t\t\n\t\tif(db::getFields($this->table,$arrayFieldQuery,$arrayFilters,$this->orderQuery,$this->limit,true)){\n\t\t\t$this->pages=ceil(((int)db::getCalculatedRows())/((int)$this->maxRowsPerPage));\n\t\t\t$this->maxRows=(int)db::getCalculatedRows();\n\t\t\twhile($row=db::fetch(db::$FETCH_TYPE_ASSOC)){\n\t\t\t\t$this->addRow($row);\n\t\t\t}\n\t\t}\n\t}", "function get_assesment(){\n \n $assesm_db=$this->assesm_db;\n // query to read single record\n //It loads the data file and converts it to an array\n $assesm_data = file_get_contents($assesm_db);\n $assesm_json = json_decode($assesm_data, true);\n if (count($assesm_json)>0){\n $assesm_found=$assesm_json[$this->session_id];\n }else{\n $assesm_found=null;\n }\n \n // set values to object properties\n $this->session_id = $assesm_found['session_id'];\n $this->test = $assesm_found['test'];\n $this->taker = $assesm_found['taker'];\n }", "public function featured_ad(){\n\t\t\t$date=date('Y-m-d');\n\t\t// echo \"SELECT * FROM featured_ad where effective_From<='$date' and effective_to>='$date' and status='1'\";\n\t\n\t\t$check = $this->db->query(\"SELECT * FROM featured_ad where effective_From<='$date' and effective_to>='$date' and status='1'\") or die(mysqli_query($this->db));\n\t\t$result = mysqli_num_rows($check); \n\t\tif ($result>0) { \n\t\t\twhile($data = mysqli_fetch_array($check)){\n\t\t\t\t$ad_data[]=$data;\n\t\t\t}\n\t\t}else{\n\t\t\t\t$ad_data=0;\n\t\t\t}\n\t\t\treturn $ad_data;\n\t}", "function getAdsFront($gId) {\n\t\t$results = $this->select('*', \"status = 1 and gid = $gId\", array('position'=>'ASC'));\n\t\tif($results) {\n\t\t\t$adsInfo = array();\n\t\t\tforeach($results as $key => $result) {\n\t\t\t\t$adsInfo[] = new AdsInfo ($result['gid'],\n\t\t\t\t\t\t\t\t\t\t$result['logo_url'],\n\t\t\t\t\t\t\t\t\t\t$result['url'],\n\t\t\t\t\t\t\t\t\t\t$result['position'], \n\t\t\t\t\t\t\t\t\t\t$result['status'], \n\t\t\t\t\t\t\t\t\t\t$result['id']\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t\treturn $adsInfo;\t\t\n\t\t}\n\t\treturn '';\n\t}", "public function show(Ads $ads)\n {\n //\n }", "private function getData()\n\t{\n\t\t// get the gallery record\n\t\t$this->record = BackendSlideshowModel::getImage($this->id);\n\t\t$this->record2 = BackendSlideshowModel::getGallery($this->galleryId);\n\t\t\n\t}", "public function getAds(): string\n {\n $html = '';\n\n\n $adsService = new AdsService();\n $ads = $adsService->getAds();\n\n foreach ($ads as $ad) {\n $html .=\n '#' . $ad->getId() . ' ' .\n $ad->getTitle() . ' ' .\n $ad->getDescription() . ' ' .\n $ad->getUserId() . ' ' .\n $ad->getCarId() . '<br />';\n }\n\n return $html;\n }", "public function tampilDataGalang(){\n\t\t\n\t}", "public function getDistractionsAction() {\n $mapper = new Application_Model_DistractionMapper();\n $daten = $mapper->fetchAll();\n\n $json = array();\n foreach ($daten as $value) {\n $json[] = $value->getArray();\n }\n\n $this->view->aaData = $json;\n }", "public function get_SEOPagesdata($seopages_id){\n $sqlseo = \"select * from digital_marketing where id='$seopages_id'\";\n $resultseo = mysqli_query($this->db,$sqlseo);\n $seodata = mysqli_fetch_array($resultseo);\n $this->seourl= $seodata['url'];\n $this->seotitle= $seodata['title'];\n $this->seodescription= $seodata['description'];\n $this->seokeywords= $seodata['keywords'];\n return true;\n\n }", "function get_all_data($adviserId=\"\") { \n $this->make_query($adviserId); \n $query = $this->adviceprocess_db->get(); \n return $query->num_fields();\n }", "function addads() \n\t{\n\t\t$view = $this->getView('ads');\n\t\t// Get/Create the model\n\t\tif ($model = $this->getModel('addads'))\n\t\t{\n\t\t\t//Push the model into the view (as default)\n\t\t\t//Second parameter indicates that it is the default model for the view\n\t\t\t$view->setModel($model, true);\n\t\t}\n\t\t$view->setLayout('adslayout');\n\t\t$view->ads();\n\t}", "public function index() {\n\t\t$data = array();\n\t\t$data['heading'] = $data['title']=\"Dashboard - \".SAMACHAR;\n\t\t$data['advertisements'] = $this->advertisement_details_model->get_advertisement_details();\n\t\t$this->template->load('advertisement', 'index', $data);\n\t}", "public function get_data();", "public function adCreativereport()\n\t{\n\n\n\n\t\t$query=\"https://graph.facebook.com/v3.2/\".$this->ad_acc_id.\"/campaigns?fields=ads{adcreatives{id,name,thumbnail_url},insights.level(ad).metrics(ctr){cost_per_unique_click,spend,impressions,frequency,reach,unique_clicks,clicks,ctr,ad_name,adset_name,cpc,cpm,cpp,campaign_name,ad_id,adset_id,account_id,account_name}}&access_token=\".$this->user_access_token.\"\";\n\n\n\t\t\t// Call to Graph api here\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch,CURLOPT_URL,$query);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_POST, 0);\n\n\n\t\t$resp = curl_exec($ch);\n\t\t$resp = json_decode($resp);\n\t\tcurl_close($ch);\n\t\tif(isset($resp->error->error_user_msg))\n\t\t\tSession::flash('message',$resp->error->error_user_msg);\n\t\telseif(isset($resp->error->message))\n\t\t\tSession::flash('message',$resp->error->message);\n\n\n\t\treturn view('social.adcreative-reports',['resp'=>$resp]);\n\t}", "protected function populateParams() {\r\n /**\r\n *\r\n * @var Dzit_RequestParser\r\n */\r\n $requestParser = Dzit_RequestParser::getInstance();\r\n $this->adsId = $requestParser->getPathInfoParam(1);\r\n /**\r\n *\r\n * @var Vushop_Bo_TextAds_IAdsDao\r\n */\r\n $adsDao = $this->getDao(DAO_TEXTADS);\r\n $this->ads = $adsDao->getAdsById($this->adsId);\r\n }", "public function daerah_asal(){\n\t\t$data['content'] = \"report/data_daerah_asal\";\n\t\t$tahun = \"t_tahun_akademik\";\n\t\t$data['tahun'] = $this->m_aka->get_all($tahun);\n\t\t$this->load->view(\"content\", $data);\n\t}", "function ADSList($file_name=\"\") {\n\tglobal $smarty, $dbconn, $config, $lang;\n\t\n\t$lang[\"users_types\"] = GetLangContent(\"users_types\");\n\t$lang[\"rentals\"] = GetLangContent(\"rentals\");\n\t\n\t$smarty->assign(\"lang\", $lang);\n\t$param = $file_name.\"?type=list&amp;\";\t\n\t$ads = GetSponsorAds($param);\n\t\t\n\t$smarty->assign(\"cur\", GetSiteSettings('site_unit_costunit'));\n\t$smarty->assign(\"ads\",$ads);\n\t\n\t\n\t\n}", "public function devices()\n {\n $this->db->select('*');\n $this->db->select('*');\n $query = $this->db->get('analytics');\n \n }", "public function run()\n {\n \\DB::table('ads')->insert(array (\n 0 => \n array (\n \t'ads' => 'A',\n ),\n\t\t\tarray (\n \t'ads' => 'B',\n ),\n\t\t\tarray (\n \t'ads' => 'C',\n ),\n\t\t\tarray (\n \t'ads' => 'D',\n ),\n\t\t\tarray (\n \t'ads' => 'E',\n ),\n\t\t\tarray (\n \t'ads' => 'F',\n ),\n\t\t\tarray (\n \t'ads' => 'G',\n ),\n\t\t\tarray (\n \t'ads' => 'H',\n ),\n\t\t\tarray (\n \t'ads' => 'I',\n ),\n ));\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function get_data()\n {\n }", "public function run()\n {\n \t/* Rellenar la tabla. */\n Ad::create([\n\n \t\t'category_id' => '3',\n \t\t'web_id' => '3',\n \t\t'user_id' => '1',\n \t\t'title' => 'Samsung Galaxy S10+',\n \t\t'url' => 'https://www.mediamarkt.es/es/product/_m%C3%B3vil-samsung-galaxy-s10-6-4-edge-amoled-triple-dual-c%C3%A1mara-4k-8gb-ram-512gb-negro-cer%C3%A1mico-1446425.html',\n \t\t'foto' => 'https://picscdn.redblue.de/doi/pixelboxx-mss-80569518/fee_786_587_png/M%C3%B3vil---Samsung-Galaxy-S10---6.4%22-Edge-AMOLED--Triple-Dual-C%C3%A1mara-4K--8GB-RAM--512GB--Negro-cer%C3%A1mico',\n \t\t'precio_vta' => '1259',\n \t\t'precio_chollo' => '1000',\n \t\t'precio_alto' => '1100',\n\n \t]);\n\n Ad::create([\n\n 'category_id' => '3',\n 'web_id' => '3',\n 'user_id' => '1',\n 'title' => 'Samsung Galaxy S9+',\n 'url' => 'https://www.mediamarkt.es/es/product/_m%C3%B3vil-samsung-galaxy-s9-6-2-curva-super-amoled-octa-core-64-gb-6-gb-ram-12-12-mp-violeta-1398572.html',\n\n 'foto' => 'https://picscdn.redblue.de/doi/pixelboxx-mss-79123948/fee_786_587_png/M%C3%B3vil---Samsung-Galaxy-S9---6.2--Curva-Super-AMOLED--Octa-Core--64-GB--6-GB-RAM--12---12-MP--Violeta',\n 'precio_vta' => '599',\n 'precio_chollo' => '499',\n 'precio_alto' => '850',\n\n ]);\n\n factory(App\\Ad::class,1000)->create();\n }", "private function collectAllData()\n {\n $this->getParsedHeader();\n $this->getServerConfig();\n $this->getPageTitle();\n $this->getLanguage();\n $this->getCharset();\n $this->getHeadingsCount();\n $this->getCanonicalLINKS();\n $this->getAllLinksData();\n }", "private function iniciarRecolectarData()\r\n\t\t{\r\n\t\t\tself::findPagoDetalleActividadEconomica();\r\n\t\t\tself::findPagoDetalleInmuebleUrbano();\r\n\t\t\tself::findPagoDetalleVehiculo();\r\n\t\t\tself::findPagoDetalleAseo();\r\n\t\t\tself::findPagoDetallePropaganda();\r\n\t\t\tself::findPagoDetalleEspectaculo();\r\n\t\t\tself::findPagoDetalleApuesta();\r\n\t\t\tself::findPagoDetalleVario();\r\n\t\t\tself::findPagoDetalleMontoNegativo();\r\n\t\t\tself::ajustarDataReporte();\r\n\t\t}", "public function doData() {\n\t\t\t$dataSet = array();\n\t\t\t$dataSet['attribute:type'] = $this->dataType;\n\t\t\t$dataSet['attribute:action'] = $this->actionType;\n\n\t\t\tif($this->total) {\n\t\t\t\t$dataSet['attribute:total'] = $this->total;\n\n\t\t\t\tif(!is_null($this->offset)) {\n\t\t\t\t\t$dataSet['attribute:offset'] = $this->offset;\n\t\t\t\t}\n\n\t\t\t\tif(!is_null($this->limit)) {\n\t\t\t\t\t$dataSet['attribute:limit'] = $this->limit;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$dataSet = array_merge($dataSet, $this->data);\n\n\t\t\tcmsController::getInstance()->setAdminDataSet($dataSet);\n\t\t}", "public function get_data()\n\t\t{\t\t// Should there be a common method for this?\n\t\t}", "function getDynamicAds()\n\t\t{\n\t\t\t$dynamicBanner_1 = $this->manage_content->getValue_where('banner_info','banner_image','id',5);\n\t\t\t$dynamicBanner_2 = $this->manage_content->getValue_where('banner_info','banner_image','id',6);\n\t\t\t//print_r($dynamicBanner[0]['banner_image']);\n\t\t\t//get dynamic banner 1\n\t\t\tif($dynamicBanner_1[0]['banner_image'] == 'NULL')\n\t\t\t{\n\t\t\t\techo '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<div class=\"dynamic_banner\">'.$dynamicBanner_1[0]['banner_image'].'</div>';\n\t\t\t}\n\t\t\t//get the dynamic banner 2\n\t\t\tif($dynamicBanner_2[0]['banner_image'] == 'NULL')\n\t\t\t{\n\t\t\t\techo '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<div class=\"dynamic_banner\">'.$dynamicBanner_2[0]['banner_image'].'</div>';\n\t\t\t}\n\t\t}", "function saveads() \n\t{\n\t\t// Get/Create the model\n\t\tif ($model = $this->getModel('showads')) {\n\t\t\t//Push the model into the view (as default)\n\t\t\t//Second parameter indicates that it is the default model for the view\n\t\t\t$model->saveads(JRequest::getVar('task'));\n\t\t}\n\t}", "protected function importData()\n\t{\n\t\tinclude_once \"./Services/ADN/ED/classes/class.adnSubobjective.php\";\n\t\t$subobjectives = adnSubobjective::getAllSubobjectives($this->objective_id);\n\n\t\t$this->setData($subobjectives);\n\t\t$this->setMaxCount(sizeof($subobjectives));\n\t}", "public function getData()\n {\n// If you want to use database just run the migration and then uncomment Analytic (comment using csv line)\n\n// $data = new DataJson(); // json data\n// $data = new Analytic(); // using database\n $data = new DataCSV(); // using csv\n return $data->loadData();\n }", "protected function getAccountData()\n\t{\n\t\t$db = $this->getDatabase();\n\n\t\t$query = $db->getQuery(true);\n\n\t\t$query->select('*')\n\t\t\t\t->from('#__accountdata')\n\t\t\t\t->where('(w20_facebook <> \"\" OR w20_twitter <> \"\")')\n\t\t\t\t->where('typ = 0')\n\t\t\t\t// ->where('bid IN (2657)')\n\t\t\t\t->where('status = 0');\n\n\n\t\t$db->setQuery($query);\n\t\t$this->adata = $db->loadObjectList();\n\n\t\treturn $this->adata;\n\t}", "private function getData(): void\n {\n // get the record\n $this->record = (array) BackendBlogModel::getComment($this->id);\n\n // no item found, throw an exceptions, because somebody is fucking with our URL\n if (empty($this->record)) {\n $this->redirect(BackendModel::createUrlForAction('Index') . '&error=non-existing');\n }\n }", "public function get_all_ads($limit, $offset) {\n $data = $this->db->get('advertisement', $limit, $offset);\n return $data->result();\n // $sql = \"select * from advertisement\";\n // $data = $this->db->query($sql);\n // return $data->result();\n }", "public function data(){\n\t\t$get_data = json_decode($_GET['data']);\n\t\t//update db\n\t\tforeach($get_data as $key=>$value){\n\t\t\t$data = array(\n\t\t\t\t'slide_order'=>$key+1,\n\t\t\t);\n\t\t\t$this->slide_model->update($value->id,$data);\n\t\t}\n\t}", "public function getPageData() {\n\t\t//$stat = Statistic::select(array('statistic.id', 'statistic.created_at','category.category_name', 'statistic.ip_address'))\n\t\t//->join('category','statistic.category_id','=','category.id'); \n\t\t$stat = StatView::select(array('id','date','category_name', 'ip_address'));\n\n\t\treturn Datatables::of($stat) \n\t\t-> add_column('actions','<a href=\"{{{ URL::to(\\'admin/blogs/\\' . $id . \\'/delete\\' ) }}}\" class=\"btn btn-xs btn-danger iframe\">{{{ Lang::get(\\'button.delete\\') }}}</a>') \n -> remove_column('id') -> make();\n\n\t}", "function adrotate_export_ads($ids) {\n\tglobal $wpdb;\n\n\t$where = false;\n\tif(count($ids) > 1) {\n\t\t$where = \"`id` = \";\n\t\tforeach($ids as $key => $id) {\n\t\t\t$where .= \"'{$id}' OR `id` = \";\n\t\t}\n\t\t$where = rtrim($where, \" OR `id` = \");\n\t}\n\t\n\tif(count($ids) == 1) {\n\t\t$where = \"`id` = '{$ids[0]}'\";\n\t}\n\t\n\tif($where) {\n\t\t$to_export = $wpdb->get_results(\"SELECT * FROM `{$wpdb->prefix}adrotate` WHERE {$where} ORDER BY `id` ASC;\", ARRAY_A);\n\t}\n\n\t$adverts = array();\n\tforeach($to_export as $export) {\n\t\t$starttime = $wpdb->get_var(\"SELECT `starttime` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = '\".$export['id'].\"' AND `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` ORDER BY `starttime` ASC LIMIT 1;\");\n\t\t$stoptime = $wpdb->get_var(\"SELECT `stoptime` FROM `{$wpdb->prefix}adrotate_schedule`, `{$wpdb->prefix}adrotate_linkmeta` WHERE `ad` = '\".$export['id'].\"' AND `schedule` = `{$wpdb->prefix}adrotate_schedule`.`id` ORDER BY `stoptime` DESC LIMIT 1;\");\n\n\t\t$starttime = (is_null($starttime)) ? 0 : $starttime;\n\t\t$stoptime = (is_null($stoptime)) ? 0 : $stoptime;\n\t\tif(!is_array($export['cities'])) $export['cities'] = array();\n\t\tif(!is_array($export['countries'])) $export['countries'] = array();\n\t\t\n\t\t$adverts[$export['id']] = array(\n\t\t\t'id' => $export['id'],\n\t\t\t'title' => $export['title'],\n\t\t\t'bannercode' => stripslashes($export['bannercode']),\n\t\t\t'imagetype' => (empty($export['imagetype'])) ? null : $export['imagetype'],\n\t\t\t'image' => (empty($export['image'])) ? null : $export['image'],\n\t\t\t'tracker' => $export['tracker'],\n\t\t\t'desktop' => $export['desktop'],\n\t\t\t'mobile' => $export['mobile'],\n\t\t\t'tablet' => $export['tablet'],\n\t\t\t'os_ios' => $export['os_ios'],\n\t\t\t'os_android' => $export['os_android'],\n\t\t\t'os_other' => $export['os_other'],\n\t\t\t'weight' => $export['weight'],\n\t\t\t'budget' => $export['budget'],\n\t\t\t'crate' => $export['crate'],\n\t\t\t'irate' => $export['irate'],\n\t\t\t'cities' => (empty($export['cities'])) ? null : implode(',', maybe_unserialize($export['cities'])),\n\t\t\t'countries' => (empty($export['countries'])) ? null : implode(',', maybe_unserialize($export['countries'])),\n\t\t\t'schedule_start' => $starttime,\n\t\t\t'schedule_end' => $stoptime,\n\t\t);\n\t}\n\n\tif(count($adverts) > 0) {\n\t\t$filename = \"AdRotate_export_adverts_\".date_i18n(\"mdYHis\").\".csv\";\n\t\tif(!file_exists(WP_CONTENT_DIR . '/reports/')) mkdir(WP_CONTENT_DIR . '/reports/', 0755);\n\t\t$fp = fopen(WP_CONTENT_DIR . '/reports/'.$filename, 'w');\n\t\t\n\t\tif($fp) {\n\t\t\t$generated = array('Generated', date_i18n(\"M d Y, H:i:s\"));\n\t\t\t$keys = array('id', 'name', 'bannercode', 'imagetype', 'image_url', 'enable_stats', 'show_desktop', 'show_mobile', 'show_tablet', 'show_ios', 'show_android', 'show_otheros', 'weight', 'budget', 'click_rate', 'impression_rate', 'geo_cities', 'geo_countries', 'schedule_start', 'schedule_end');\n\n\t\t\tfputcsv($fp, $generated);\n\t\t\tfputcsv($fp, $keys);\n\t\t\tforeach($adverts as $advert) {\n\t\t\t\tfputcsv($fp, $advert);\n\t\t\t}\n\t\t\t\n\t\t\tfclose($fp);\n\n\t\t\tadrotate_return('adrotate-ads', 215, array('file' => $filename));\n\t\t\texit;\n\t\t}\n\t} else {\n\t\tadrotate_return('adrotate-ads', 509);\n\t}\n}", "function getAds($per_page){\n // this function for get ads by category\n if(isset($_GET['cat_id'])){\n global $con;\n if(isset($_GET['page'])){\n $page = $_GET['page'];\n }\n else{\n $page = 1;\n }\n $start = ($page - 1) * $per_page;\n $cat_id = $_GET['cat_id'];\n // if p_cat != all then show ads in database by his p_cat number\n if($cat_id != 'all'){\n $query = $con->prepare(\"SELECT * FROM products where p_cat_id = '$cat_id' ORDER BY 1 DESC LIMIT $start,$per_page\");\n $query->execute();\n }\n // if p_cat = all then show all ads in database\n else{\n $query = $con->prepare(\"SELECT * FROM products ORDER BY 1 DESC LIMIT $start,$per_page\");\n $query->execute();\n }\n if($query->rowCount() > 0){\n while($result = $query->fetch(PDO::FETCH_ASSOC)){\n $product_id = $result['product_id'];\n $user_id = $result['user_id'];\n $product_title = $result['product_title'];\n $product_images = explode(\",\",$result['product_images']);\n $product_watch = $result['product_watch'];\n $product_status = $result['product_status'];\n $status_color = \"\";\n if($product_status == \"جديد\"){\n $status_color = \"orange\";\n }\n else if($product_status == \"إعلان\"){\n $status_color = \"blue\";\n }\n else{\n $status_color = \"violet\";\n }\n // get user name by user user_id\n $second_query = $con->prepare(\"SELECT * FROM users where user_id = '$user_id'\");\n $second_query->execute();\n $result2 = $second_query->fetch(PDO::FETCH_ASSOC);\n $user_name = $result2['username']; \n $user_image = $result2['user_image'];\n $last_login = $result2['last_login'];\n $class = 'offline';\n // for check if user is connect now\n if($last_login > time())\n $class = 'online';\n echo \"\n <div class='col-sm-6 col-lg-4'>\n <a href='show-ads.php?p_id=$product_id'>\n <div class='item'>\n <div class='ads-title row'>\n <div class='col-1 col-sm-2 col-md-2 col-lg-2 user-img'>\n <div class='img-box'\"; if($user_image != \"\") echo 'style=background-color:transparent'; echo \">\";\n if($user_image != \"\"){\n echo \"<img src='Profile/Layout/Images/users-images/$user_image' class='img-responsive' alt='$user_image'>\";\n }\n else{\n preg_match(\"/./u\",$user_name,$first_char);\n $first_char = strtoupper($first_char[0]);\n echo \"<span>$first_char</span>\";\n }\n echo \"<div class='user-connection $class'></div>\";\n echo \"</div>\n </div>\n <div class='col-9 col-sm-8 col-md-9 col-lg-8 user-info'>\n <div class='username'>\n <h6>\n $user_name\n </h6>\n <p>$product_title</p>\n </div>\n </div> \n <div class='col-2 col-sm-2 col-md-1 col-lg-2 watches'>\n <div class='watch'>\n $product_watch <i class='fa fa-eye'></i> \n </div>\n </div>\n\n </div>\n <div class='ads-image'>\n <img src='Layout/Images/products/$product_images[0]' class='img-responsive' alt='$product_images[0]'>\n <div class='product-type $status_color'>$product_status</div>\n </div>\n </div>\n </a>\n </div>\n \";\n }\n }\n else{\n echo \"\n <div class='no-ads'>\n <p>لايوجد اي إعلانات مضافة</p>\n </div>\n \";\n }\n }\n}", "function getDetailAllDeviceSales($edit_device_sale,$account_id,$DbConnection)\n{\n $query = \"SELECT device_sales_info.device_imei_no,account.superuser, account.user FROM \".\n \"device_sales_info USE INDEX(dslsinfo_imeino_cid_status),account WHERE \".\n \"account.account_id = device_sales_info.user_account_id AND \".\n \"device_sales_info.device_imei_no='$edit_device_sale' AND \".\n \"device_sales_info.create_id='$account_id' AND device_sales_info.status='1'\";\n $result = mysql_query($query,$DbConnection);\n while($row=mysql_fetch_object($result))\n {\t\n $imei_no_2 = $row->device_imei_no;\n $superuser_2 = $row->superuser; \n $user_2 = $row->user; \n $data[]=array('imei_no_2'=>$row->device_imei_no,'superuser_2'=>$row->superuser,'user_2'=>$row->user);\t\n }\n return $data;\n}", "public function fetchData()\r\n {\r\n $this->objectcount = $this->search_obj->getObjectQueryCount($this->extra);\r\n }", "public function getAds() {\n return $this->getAdsFromSettings($this->getSettings());\n }", "function updateAHSIDs(){\n //scrape alpha pages and load into db\n foreach ($this->alpha as $key => $letter) {\n $this->scrapeAlphaPage($letter);\n }\n }", "function get_ads_ids($find_data, $endpoint) {\n\n\t$page = 0;\n\t$ads_pages_cnt = 0;\n\t$ads_ids = []; //list CianId\n\t$ads_cnt = 0;\n\n\t/*get ads ids*/\n\twhile ($page <= $ads_pages_cnt) {\n\n\t\ttry {\n\n\t\t\t$page++;\n\n\t\t\tchange_page($find_data, $page);\n\t\t\t$offers = send_post($endpoint, $find_data, [\"Content-Type: application/json\"]);\n\n\t\t\t//echo \"offers: \";\n\t\t\t//echo \"$offers\";\n\n\t\t\t/* calculate only first time */\n\t\t\t$pages = json_decode($offers, true);\n\t\t\tif ($page == 1) {\t\t\t\t\n\t\t\t\t$ads_cnt = $pages['aggregatedOffersCount']; //get count all ads\n\t\t\t\t$ads_pages_cnt = $ads_cnt / count($pages['offers']); //get count pages\n\t\t\t\t$ads_pages_cnt = (int)$ads_pages_cnt;\n\n\t\t\t\tif ( ($ads_cnt%$ads_pages_cnt) > 0)\n\t\t\t\t\t$ads_pages_cnt++; //if how minimum one element left, exist also one page\n\t\t\t}\n\n\t\t\techo \"all offers found: \" . $ads_cnt . \"\\r\\n\";\n\t\t\techo \"count pages: \" . $ads_pages_cnt . \"\\r\\n\";\n\t\t\techo \"current page: \" . $page . \"\\r\\n\";\n\n\t\t\techo \"\\r\\n--Offers--\\r\\n\";\n\n\t\t\tfor ($i=0; $i < count($pages['offers']); $i++) { \n\n\t\t\t\techo $pages['offers'][$i]['cianId'] . \"\\r\\n\";\n\t\t\t\t$ads_ids[] = $pages['offers'][$i]['cianId'];\n\t\t\t}\n\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tadd_logs(\"parsing id list: \" . $e->getMessage());\n\t\t\tadd_logs(\"body json (offers): \" . $offers);\n\t\t\tadd_logs(\"page: \" . $page . \". pages count: \". $ads_pages_cnt . \". ads count: \" . $ads_cnt);\n\t\t}\n\t\t\n\n\t}\n\n\n\n\techo \"ads count: \" . $ads_cnt . \" cian id cnt: \" . count($ads_ids) . \"\\r\\n\";\n\n\t/* get attributes for each ad */\n\tif (count($ads_ids) - $ads_cnt >= 0) {\n\t\t//all so ok\n\t}\n\telse {\n\t\tadd_logs(\"didn't match cnt ads (ads_ids: {$ads_ids} vs. ads_cnt {$ad_cnt}), ads pages count: {$ads_pages_cnt}\");\n\t\tadd_logs(\"ads_ids list: \" . json_encode($ads_ids));\n\t}\n\n\treturn $ads_ids;\n\n}", "private function getTraffic() {//Irá verificar na tabela se os dados do dia existem\n $readSiteViews = new Read; //Aqui ocorrendo uma composição\n $readSiteViews->ExeRead('siteviews', \"WHERE siteviews_date = :date\", \"date={$this->Date}\");\n if ($readSiteViews->getRowCount())://Verifica se a leitura retornou resultado\n $this->Traffic = $readSiteViews->getResult()[0]; //Pega apenas o resultado atual, logo o Traffic vai armazenar os dados do dia recorrente\n endif;\n }", "protected function loadData(){\n\t\t//SELECT from \".self::TABLE_NAME.\"_data WHERE \".self::TABLE_NAME.\"_id=\".$this->id.\"\n\t\t\n\t\t//return the data\n\t\treturn array();\n\t}", "public function index()\n {\n $ds = Ads::orderby('ads_id','desc')->get();\n return view('BE.ads.show', compact('ds'));\n }", "function gatherResults($conn, $advert_id)\n {\n $query = \"SELECT whwp_Advert.* FROM whwp_Advert \"\n . \"WHERE whwp_Advert.advert_id = :advert_id \";\n $conn->prepQuery($query);\n $conn->bind('advert_id', $advert_id);\n $advert=[];\n $advert = $conn->single();\n return $advert;\n }", "protected function obtainData()\n\t{\n\t\t$this->obtainDataReferences();\n\t\t$this->obtainDataOrders();\n\t}", "public function get_all_ads($status = \"active\")\t{\n\n\t}", "function getAgenciesInfo() {\n\t\tglobal $dbh;\n\t\t$agencies = array();\n\t\t\n\t\t$sql = \"SELECT * FROM Agencies\";\n\t\ttry {\n\t\t\tgetDBConnection();\n\t\t\t\n\t\t\t$result = mysqli_query($dbh, $sql);\n\t\t\t\n\t\t\tif(!$result) {\n\t\t\t\tprint(\"Query failed: \" . mysqli_errno($dbh) . \"--\" . mysqli_error($dbh) . \"<br/>\");\n\t\t\t\texit();\n\t\t\t}\n\t\t\t\n\t\t\twhile ($values = mysqli_fetch_object($result)) {\n\t\t\t\t$agency = new Agency();\n\t\t\t\t$agency -> setAgency($values);\n\t\t\t\tarray_push($agencies, $agency);\n\t\t\t}\n\n\t\t\treturn $agencies;\n\t\t\t\n\t\t} catch (Exception $e){\n\t\t\tprint \"<br/> $e\";\n\t\t} finally {\n\t\t\tcloseDBConnection();\n\t\t}\n\t}", "function activities(){\n $sql= $this->chk(\n \"SELECT \n activity.name,\n activity.description,\n activity.rate\n FROM \n activity \"\n );\n // \n $activity= $this->sqlData($sql);\n echo ($activity);\n\n }", "public function get_innersidebar_SEOPagesdata($seopages_id){\n $sqlseo = \"select * from digital_marketing where journal_id='$seopages_id'\";\n $resultseo = mysqli_query($this->db,$sqlseo);\n $seodata = mysqli_fetch_array($resultseo);\n $this->seourl1= $seodata['url'];\n $this->seotitle1= $seodata['title'];\n $this->seodescription1= $seodata['description'];\n $this->seokeywords1 = $seodata['keywords'];\n return true;\n\n }", "public function indexAction()\n {\n $date = $this->params()->fromQuery('date');\n $init = new Google();\n $response = $init->getReport($date, $date);\n $result = $init->printResults($response);\n foreach ($result as $key => $item) {\n\n $sql = \"insert into analytics(source_medium,users,new_users,session,bounce_rate,pages_session,\n avg_session_duration,ecommerce_conversion_rate,transactions,revenue,created_date) values('{$key}','{$item['ga:users']}','{$item['ga:newUsers']}','{$item['ga:sessions']}'\n ,'{$item['ga:bounceRate']}','{$item['ga:pageviewsPerSession']}','{$item['ga:avgSessionDuration']}'\n ,'{$item['ga:transactionsPerSession']}','{$item['ga:transactions']}','{$item['ga:transactionRevenue']}','{$date}') on duplicate key update\n users = '{$item['ga:users']}',new_users ='{$item['ga:newUsers']}' ,session='{$item['ga:sessions']}',bounce_rate='{$item['ga:bounceRate']}',pages_session='{$item['ga:pageviewsPerSession']}',\n avg_session_duration='{$item['ga:avgSessionDuration']}',ecommerce_conversion_rate='{$item['ga:transactionsPerSession']}',transactions='{$item['ga:transactions']}',revenue='{$item['ga:transactionRevenue']}'\";\n $statement = $this->conn->createStatement($sql);\n $statement->execute();\n }\n }", "protected function collectDataGroup()\n {\n $url = $this->getGroupURI();\n $this->collectDeals($url);\n }", "public function add_advert($data) {\n return $this->db->autoExecute($this->ecs->table(\"advert\"), $data, 'INSERT'); \n }", "function adsFn($id){\r\n\t$strSLQAds=\"select * from banner_sum where pic_position='$id' and\r\n\t\t(main_menu_id='home' or main_menu_id='All') and pic_display='Y'\";\r\n\t$resultAds=mysql_query($strSLQAds);\r\n\treturn $resultAds;\r\n}", "function listar_saa() {\n\t\t$query = \"SELECT material_saa.*\n\t\tFROM material_saa\n\t\tORDER BY saa_material asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "protected function collectDataKeywords()\n {\n /* Even if the original website uses POST with the search page, GET works too */\n $url = $this->getSearchURI();\n $this->collectDeals($url);\n }", "public function getSummaryData();", "private function generateNewsData() {\n require_once 'WebsiteNewsModel.php';\n $model = new WebsiteNewsModel();\n $this->newsData = $model->getData();\n }", "public function addAC($data){\n $advisory = new Advisory_Council;\n $advisory->fname = $data['fname'];\n\t \t$advisory->lname = $data['lname'];\n\t \t$advisory->mname = $data['mname'];\n\t \t$advisory->qualifier = $data['qname'];\n\t \t$advisory->gender = $data['gender'];\n\t \t$advisory->contactno = $data['mobile'];\n\t \t$advisory->landline = $data['landline'];\n\t \t$advisory->officename = $data['officename'];\n $advisory->officeaddress = $data['officeadd'];\n\t \t$advisory->email = $data['email'];\n\n\t \tif($data['durstart'] != \"\") {\n\t \t\t$advisory->startdate = $data['durstart'];\n\n\t \t}//if\n\t\tif($data['bdate'] != \"\") {\n\t \t\t$advisory->birthdate = $data['bdate'];\n\n\t \t}//if\n\n\t \t$advisory->fbuser = $data['facebook'];\n\t \t$advisory->twitteruser = $data['twitter'];\n\t \t$advisory->iguser = $data['instagram'];\n\n\t \t\n\n\t \t$advisory->street = $data['street'];\n\t \t$advisory->city = $data['city'];\n\t \t$advisory->province = $data['province'];\n\t \t$advisory->barangay = $data['barangay'];\n\n\n\t \tif($data['upphoto'] != \"\") {\n\t \t\t$advisory->imagepath = $this->loadphoto($data['upphoto']);\n\n\t \t}//if\n\n $advisory->advisory_position_id = $data['acposition'];\n $advisory->ac_sector_id = $data['acsector'];\n\n \t$advisory->second_id = $data['secondary'];\n\n\t if($data['tertiary'] != 'disitem') {\n\t \t$advisory->tertiary_id = $data['tertiary'];\n\t }//if\n\n\t if($data['quaternary'] != 'disitem') {\n\t \t$advisory->quaternary_id = $data['quaternary'];\n\t }//if\n\n $advisory->save();\n }", "public function ex_points(){\r\n $maps['is_on_sale'] = 1;\r\n $maps['type'] = 0;\r\n $info = D('goods')->where($maps)->select();\r\n // var_dump($info);die;\r\n $mapps['is_forbid'] = 0;\r\n $r = D('store')->where($mapps)->select();\r\n $this->assign('r',$r);\r\n $this->assign('info',$info);\r\n $this->display();\r\n }", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "public function populateAdTable() {\n\t\t$scrapeLog = $this->addLog(JOB_AD_TABLE);\n\t\t\n\t\t$counties = $this->countyRepository->getFromXML(BASE_PATH . AD_PATH . SEARCH_LIST_PATH . COUNTY_PATH);\n\t\tforeach($counties as $county) {\n\t\t\t$xml = $this->jobAdRepository->loadXML(BASE_PATH . AD_PATH . MATCH_PATH . COUNTY_ID_PATH . $county->getCountyId());\n if(isset($xml) && is_object($xml)) {\n $pages = $xml->antal_sidor;\n for ($x = 1; $x <= $pages; $x++) {\n $xml = $this->jobAdRepository->loadXML(BASE_PATH . AD_PATH . MATCH_PATH . COUNTY_ID_PATH . $county->getCountyId() . PAGE_PATH . $x);\n if(isset($xml) && is_object($xml)) {\n foreach ($xml->matchningdata as $match) {\n $jobAd = $this->jobAdRepository->getFromXML(BASE_PATH . AD_PATH . $match->annonsid);\n if(isset($jobAd) && is_object($jobAd)) {\n $ad = $this->adAdapter->adapt($jobAd);\n if (isset($ad)) {\n $this->adRepository->add($ad);\n }\n }\n }\n set_time_limit(60);\n }\n }\n }\n\t\t}\n\t\t\n\t\t$this->updateLog($scrapeLog);\n\t}", "public function run()\n {\n $advertise = new \\Hamedan_2018\\Advertise;\n $advertise->aGId = 14;\n $advertise->aLink = '';\n\n $advertise->aFaAlt = 'رستورات میسان';\n $advertise->aEnAlt = 'Maysan Restaurant';\n $advertise->aArAlt = 'مطعم ميسان';\n\n $advertise->aLinkFaTitle = 'بیشتر';\n $advertise->aLinkEnTitle = 'More';\n $advertise->aLinkArTitle = 'أكثر';\n\n $advertise->aFaSubject = 'رستورات میسان';\n $advertise->aEnSubject = 'Maysan Restaurant';\n $advertise->aArSubject = 'مطعم ميسان';\n\n $advertise->aFaDescription = 'کیفیت را با میسان تجربه کنید';\n $advertise->aEnDescription = 'Experience with Myssance';\n $advertise->aArDescription = 'تجربة مع ميسانس';\n $advertise->save();\n\n $advertise = new \\Hamedan_2018\\Advertise;\n $advertise->aGId = 15;\n $advertise->aLink = '';\n\n $advertise->aFaAlt = 'رستورات میسان';\n $advertise->aEnAlt = 'Maysan Restaurant';\n $advertise->aArAlt = 'مطعم ميسان';\n\n $advertise->aLinkFaTitle = 'بیشتر';\n $advertise->aLinkEnTitle = 'More';\n $advertise->aLinkArTitle = 'أكثر';\n\n $advertise->aFaSubject = 'رستورات میسان';\n $advertise->aEnSubject = 'Maysan Restaurant';\n $advertise->aArSubject = 'مطعم ميسان';\n\n $advertise->aFaDescription = 'کیفیت را با میسان تجربه کنید';\n $advertise->aEnDescription = 'Experience with Myssance';\n $advertise->aArDescription = 'تجربة مع ميسانس';\n $advertise->save();\n\n\n }", "public function ReportesData(){\n\t\t$this->status=\"1\";\n\t\t$this->created_at = \"NOW()\";\n\t}", "public function fetchData()\n {\n $invoice = InvoiceAppointment::leftjoin('appointments as appt','appt.id','invoice_appointment.detail_id')\n ->leftjoin('appointment_status as appt_stat','appt_stat.appt_id','invoice_appointment.detail_id')\n ->where(fn($query) => $query\n ->where( 'appt.name', 'like', '%' . $this->search . '%')\n ->orWhere('invoice_appointment.total', 'like', '%' . $this->search . '%')\n )\n ->orderBy($this->sortBy, $this->sortDirection)\n ->paginate($this->perPage);\n $this->invappt = $invoice;\n\n /*For notifications*/\n $appoint = Appointment::leftjoin('appointment_status as apts','apts.appt_id','appointments.id')\n ->where('apts.status','Pending')\n ->latest()->get();\n $this->appt = $appoint;\n }", "public function run()\n {\n \n\n \\DB::table('ad_settings')->delete();\n \n \\DB::table('ad_settings')->insert(array (\n 0 => \n array (\n 'ad_setting_id' => 1,\n 'android_app_id' => 'ca-app-pub-3940256099942544~3347511713',\n 'android_banner_app_id' => 'ca-app-pub-3940256099942544/6300978111',\n 'android_interstitial_app_id' => 'ca-app-pub-3940256099942544/1033173712',\n 'android_video_app_id' => 'ca-app-pub-3940256099942544/5224354917',\n 'is_banner' => 0,\n 'is_interstitial' => 0,\n 'is_video' => 0,\n 'banner_show_on' => '',\n 'interstitial_show_on' => '2',\n 'video_show_on' => '3',\n 'ios_app_id' => 'ca-app-pub-3940256099942544~1458002511',\n 'ios_banner_app_id' => 'ca-app-pub-3940256099942544/2934735716',\n 'ios_interstitial_app_id' => 'ca-app-pub-3940256099942544/4411468910',\n 'ios_video_app_id' => 'ca-app-pub-3940256099942544/1712485313',\n ),\n ));\n \n \n }", "function recordAnalytics() {\n\t\t//Is your user agent any of my business? Not really, but don't worry about it.\n\t\texecuteQuery(\"\n\t\t\tINSERT INTO dwm2r_activitymonitor\n\t\t\t(IPAddress,UserAgent,Flags,Seed,CreatedDTS)\n\t\t\tVALUES (\n\t\t\t\t'\".$_SERVER['REMOTE_ADDR'].\"',\n\t\t\t\t'\".$_SERVER['HTTP_USER_AGENT'].\"',\n\t\t\t\t'\".trim($_REQUEST[\"Flags\"]).\"',\n\t\t\t\t'\".$this->modder->flags[\"Seed\"].\"',\n\t\t\t\tNOW()\n\t\t\t)\n\t\t\");\n\t}", "protected abstract function loadAvailableAds();", "function select_fitness_apk_data() {\n\n global $connection;\n\n $sql = \"SELECT app.description, app.app_name, app.developer, category.name, apk.version, apk.link, apk.size, app_image.link_img, app_image.alt\n FROM app INNER JOIN apk ON app.app_id=apk.app_id INNER JOIN app_image on app_image.app_id=apk.app_id INNER JOIN category on category.cat_id=app.cat_id \n WHERE category.cat_id=2\";\n\n return $connection->query($sql);\n }", "public function listdataTAPAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('TATA PERSURATAN');\n }", "public function TraspasoData(){\r\n\t\t$this->idorigen = \"\";\r\n\t\t$this->iddestino = \"\";\r\n\t\t$this->idusuario = \"\";\r\n\t\t$this->fecha = \"NOW()\";\r\n\r\n\t\t#Realizar el traspaso de cada producto\r\n\t\t$this->idtraspaso = \"\";\r\n\t\t$this->idproducto = \"\";\r\n\t\t$this->cantidad = \"\";\r\n\t}", "public function index()\n {\n $result = Ad::orderby('id','desc')->get();\n if(!$result->isEmpty()){\n foreach ($result as $val){\n $inter = app(AdRepository::class)->find($val->id);\n }\n }\n return view('web.ad.index',['data' => $result]);\n }", "function loadData()\n\t{\n\t\tstatic $data;\n\t\t\n\t\tif(!$data)\n\t\t\t$data=self::getData();\n\n\t\tif(isset($data[$this->id]))\n\t\t\t$this->setValues((array)$data[$this->id]);\t\t\t\n\t}", "public function index()\n {\n $server = Auth::user()->servers;\n /*$addlist = MTextad::select('textads.id', 'Name', 'category', 'cType', 'image', 'cost', 'server_id', 'till_date', 'textad_id')->leftjoin('liveadds', 'textads.id', '=', 'liveadds.textad_id')\n ->get()->sortBy('till_date')->groupBy('cType')->toArray();\n ksort($addlist);\n echo \"<pre>\";print_r($allads);die;*/ \n\n $allads = MTextad::query();\n $allads = $allads->with(['liveadds' => function ($query) {\n $query->whereDate('till_date', '>', date('Y-m-d'))->where(array('active_status'=>1));\n }]);\n $addlist = $allads->orderBy('id')->get()->toArray(); \n\n \n\n return view('advertising.text')->with('addlist', $addlist)->with('servers', $server);\n }", "public function Individualgetdata();", "public function index()\n {\n $adverts = Advert::orderBy('updated_at', 'desc')->paginate(15);\n //->get();\n //->paginate(15);\n\n // Palauta kaikki resurssina\n return IlmoitusResource::collection($adverts);\n }", "public function collectData($url) {\n\t\t\t\n\t\t}", "public function fetchDiseaseData()\n\t{\n\n\t\t$result = array('data' => array());\n\n\t\t$data = $this->model_disease->getDiseaseData();\n\n\t\tforeach ($data as $key => $value) {\n\t\t\t// button\n\t\t\t$complaint_name = array();\n\t\t\tif ($value['complaint']!='') {\n\t\t\t\t$complaint_ids = explode(',',$value['complaint']);\n\n\t\t\t\t\tforeach ($complaint_ids as $k => $v) {\n\t\t\t\t\t\t\t$complaint_data = $this->model_complaint->getComplaintData($v);\n\t\t\t\t\t\t\t$complaint_name[] = $complaint_data['name'];\n\t\t\t\t\t}\n\t\t\t\t\t$complaint_name = implode(', ', $complaint_name);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$complaint_name='';\n\t\t\t}\n\n\t\t\t$examination_name = array();\n\t\t\tif ($value['examination']!='') {\n\t\t\t\t$examination_ids = explode(',',$value['examination']);\n\n\t\t\t\tforeach ($examination_ids as $k => $v) {\n\t\t\t\t\t\t$examination_data = $this->model_examination->getExaminationData($v);\n\t\t\t\t\t\t$examination_name[] = $examination_data['name'];\n\t\t\t\t}\n\t\t\t\t$examination_name = implode(', ', $examination_name);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$examination_name='';\n\t\t\t}\n\n\t\t\t$diagnosis_name = array();\n\t\t\tif ($value['diagnosis']!='') {\n\t\t\t\t$diagnosis_ids = explode(',',$value['diagnosis']);\n\t\t\t\tforeach ($diagnosis_ids as $k => $v) {\n\t\t\t\t\t\t$diagnosis_data = $this->model_diagnosis->getDiagnosisData($v);\n\t\t\t\t\t\t$diagnosis_name[] = $diagnosis_data['name'];\n\t\t\t\t}\n\t\t\t\t$diagnosis_name = implode(', ', $diagnosis_name);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$diagnosis_name='';\n\t\t\t}\n\n\t\t\t$investigation_name = array();\n\t\t\tif ($value['investigation']!='') {\n\t\t\t\t$investigation_ids = explode(',',$value['investigation']);\n\n\t\t\t\tforeach ($investigation_ids as $k => $v) {\n\t\t\t\t\t\t$investigation_data = $this->model_investigation->getInvestigationData($v);\n\t\t\t\t\t\t$investigation_name[] = $investigation_data['name'];\n\t\t\t\t}\n\t\t\t\t$investigation_name = implode(', ', $investigation_name);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$investigation_name='';\n\t\t\t}\n\n\t\t\t$Advice_name = array();\n\t\t\tif ($value['advice']!='') {\n\t\t\t\t$Advice_ids = explode(',',$value['advice']);\n\n\t\t\t\tforeach ($Advice_ids as $k => $v) {\n\t\t\t\t\t\t$Advice_data = $this->model_advice->getAdviceData($v);\n\t\t\t\t\t\t$Advice_name[] = $Advice_data['name'];\n\t\t\t\t}\n\t\t\t\t$Advice_name = implode(', ', $Advice_name);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$Advice_name='';\n\t\t\t}\n\n\n\n $buttons = '';\n\t\t\t\t\t\tif(in_array('updateDisease', $this->permission)) {\n \t\t\t$buttons .= '<a href=\"'.base_url('editdisease/'.$value['id']).'\" class=\"btn btn-default\"><i class=\"far fa-edit\"></i></a>';\n\t\t\t\t}\n\t\t\t\tif(in_array('deleteDisease', $this->permission)) {\n \t\t\t$buttons .= ' <button type=\"button\" class=\"btn btn-default\" onclick=\"removeFunc('.$value['id'].')\" data-toggle=\"modal\" data-target=\"#removeModal\"><i class=\"far fa-trash-alt\"></i></button>';\n\t\t\t\t}\n\n\t\t\t$result['data'][$key] = array(\n\n\t\t\t\t$value['name'],\n\t\t\t\t$complaint_name,\n\t\t\t\t$examination_name,\n\t\t\t\t$diagnosis_name,\n\t\t\t\t$investigation_name,\n\t\t\t\t$Advice_name,\n\t\t\t\t$buttons\n\t\t\t);\n\t\t} // /foreach\n\n\t\techo json_encode($result);\n\t}" ]
[ "0.6211272", "0.6114286", "0.5811164", "0.5725497", "0.5700675", "0.56573856", "0.5645361", "0.5629739", "0.56067216", "0.55990237", "0.55831575", "0.5554251", "0.55342454", "0.5529742", "0.552872", "0.55227536", "0.55157715", "0.5499896", "0.5490851", "0.54074335", "0.5404536", "0.53725594", "0.5362146", "0.5358395", "0.53535545", "0.5350812", "0.5338592", "0.5334122", "0.53334934", "0.53309315", "0.5323105", "0.5314573", "0.5314428", "0.5312945", "0.53044707", "0.5303728", "0.52984756", "0.5287543", "0.52864504", "0.52860636", "0.52860636", "0.52860636", "0.5284857", "0.5275344", "0.5272555", "0.52718157", "0.5259254", "0.5241992", "0.5234728", "0.5232749", "0.52182865", "0.52182126", "0.5205251", "0.5204077", "0.52019304", "0.51596254", "0.5155426", "0.5141723", "0.51298195", "0.5129347", "0.5117632", "0.5104479", "0.51044494", "0.50999755", "0.5096788", "0.509609", "0.50928277", "0.5091686", "0.50879157", "0.508505", "0.5084554", "0.508299", "0.50712407", "0.5070539", "0.5068485", "0.5068211", "0.5066628", "0.50622195", "0.50590354", "0.5056561", "0.50544703", "0.5052702", "0.5050946", "0.50505674", "0.5048453", "0.5048337", "0.50461906", "0.50358224", "0.5032392", "0.5027954", "0.5026776", "0.5022275", "0.5019642", "0.50174046", "0.50122654", "0.50108266", "0.500767", "0.50049126", "0.5003734", "0.500269", "0.5001442" ]
0.0
-1
/======= ads data delete========
public function delete_ads_data($id=null) { $image = $this->db->where('id', $id)->get('ads')->row(); $this->db->where('id', $id); $this->db->delete('ads'); if($this->db->affected_rows()){ if(file_exists($image->image_path)){ unlink($image->image_path); } return TRUE; }else{ return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DeleteAd() {\n\tglobal $smarty, $config, $dbconn;\n\t\n\t$id = intval($_REQUEST[\"id\"]);\n\t$dbconn->Execute(\"DELETE FROM \".SPONSORS_ADS_TABLE.\" WHERE id='\".$id.\"' \");\n\tListSponsors(\"list\");\n\t\n}", "public function deleteAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Ad::getAd($id);\r\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\r\n//\t\tUtil_File::del(Common::getConfig('siteConfig', 'attachPath') . $info['img']);\r\n\t\t$result = Gou_Service_Ad::deleteAd($id);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Client_Service_Ad::getAd($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\t$result = Client_Service_Ad::deleteAd($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "function delete($id) {\n Ad::deleteAd($id);\n unset($_GET['delete']);\n }", "function deleteData($db)\n{\n global $_REQUEST;\n $i = 0;\n foreach ($_REQUEST as $strIndex => $strValue) {\n if (substr($strIndex, 0, 5) == 'chkID') {\n $strSQL = \"DELETE FROM \\\"hrdTransportation\\\" WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n }\n }\n if ($i > 0) {\n writeLog(ACTIVITY_DELETE, MODULE_PAYROLL, \"$i data\", 0);\n }\n}", "function deleteData()\n{\n global $myDataGrid;\n $arrKeys = [];\n foreach ($myDataGrid->checkboxes as $strValue) {\n $arrKeys['id'][] = $strValue;\n $arrKeys2['id_absence'][] = $strValue;\n }\n $tblAbsence = new cHrdAbsence();\n $tblAbsenceDetail = new cHrdAbsenceDetail();\n $tblAbsence->deleteMultiple($arrKeys);\n $tblAbsenceDetail->deleteMultiple($arrKeys2);\n writeLog(ACTIVITY_DELETE, MODULE_PAYROLL, implode(\",\", $arrKeys2['id_absence']));\n $myDataGrid->message = $tblAbsence->strMessage;\n}", "public function delete($data){\n\t\tif(empty($data['adgroup_id'])){\n\t\t\tthrow new \\Exception('adgroup id is required.');\n\t\t}\n\t\tif(empty($data['ad_id'])){\n\t\t\tthrow new \\Exception('ad_id is required.');\n\t\t}\n\t\t$operations = array();\n\t\t$textAd = new \\TextAd();\n\t\t$textAd->id = $data['ad_id'];\n\t\t\n\t\t// Create ad group ad.\n\t\t$adGroupAd = new \\AdGroupAd();\n\t\t$adGroupAd->adGroupId = $adGroupId;\n\t\t$adGroupAd->ad = $textAd;\n\t\t\n\t\t// Create operation.\n\t\t$operation = new \\AdGroupAdOperation();\n\t\t$operation->operand = $adGroupAd;\n\t\t$operation->operator = 'REMOVE';\t\t\n\t\t$operations = array($operation);\n\n\t\t// Make the mutate request.\n\t\t$result = $this->adGroupAdService->mutate($operations);\n\t\t$adGroupAd = $result->value[0];\n\t\treturn TRUE;\n\t}", "function fgcf_delete_data($id) {\n global $wpdb;\n $query = $wpdb->get_results(\"delete from \" . Fgcf::$table_name . \" where id= $id\");\n return true;\n }", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "public static function delete() {\n\n\n\t\t}", "public function deleteData()\n {\n DB::table($this->dbTable)\n ->where($this->where)\n ->delete();\n }", "public function text_ad_delete($id)\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$id = rawurldecode($id);\n\t\t\t$this->load->model('text_advertising_model', 'tam');\n\t\t\t$this->tam->delete($id);\n\t\t\tredirect('/admin/text_advertising','refresh');\n\t\t}", "function dels(){\r\n if(!empty($_POST['ar_id']))\r\n {\r\n $page = (int)$this->input->post('page');\r\n $ar_id = $this->input->post('ar_id');\r\n for($i = 0; $i < sizeof($ar_id); $i ++) {\r\n if ($ar_id[$i]){\r\n if($this->vdb->delete('ads_right', array('id'=>$ar_id[$i])))\r\n $this->session->set_flashdata('message','Đã xóa thành công');\r\n else $this->session->set_flashdata('error','Xóa không thành công');\r\n }\r\n }\r\n }\r\n redirect('ads_right/listads/'.$page);\r\n }", "function del(){\r\n $id = $this->uri->segment(3);\r\n $page = $this->uri->segment(4);\r\n if($this->vdb->delete('ads_right', array('id'=>$id)))\r\n $this->session->set_flashdata('message','Đã xóa thành công');\r\n else $this->session->set_flashdata('message','Xóa không thành công');\r\n redirect('ads_right/listads/'.$page);\r\n }", "function delete_data($table, $id){\n\n $query = $this->db->delete($table, array('id' => $id));\n\n }", "public function delete($ap_id){\n\t\t$mysqli = Configuration::mysqli_configation();\n\t\t$mainObj = Array(\"status\"=>false, \"msg\"=>\"Deleting failed, Please try one more time\");\t\t \t\t \n\t\t$update_query = \"DELETE FROM `tbl_article_published` WHERE ap_id = '$ap_id'\";\n\t\t$result = $mysqli->query($update_query); \t\t\t\n\t\tif($result){\t\t\t\n\t\t\t$mainObj['status'] = true;\n\t\t\t$mainObj['msg'] = 'Deleted successfully';\n\t\t}\n\t\treturn $mainObj;\n\t}", "public function index_delete(){\n\t\t\n\t\t}", "function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n // need to delete from tag maps too\n // tbd\n }", "function clients_select_deleteData($ctlData,$clientID) {\t\n}", "function delete() ;", "function delete() ;", "public function delete()\n {\n $sql = \"DELETE FROM \" . TB_USAGE . \" WHERE mix_id = {$this->db->sqltext($this->mix_id)}\";\n $this->db->exec($sql);\n\n //\tremove everything from cache\n $cache = VOCApp::getInstance()->getCache();\n if ($cache) {\n $cache->flush();\n }\n }", "public function DeleteData($id){\n \t$db = $this->getDb();\n \t\t$where = array(0 => \"aclusuariosonline_id = \".$id);\n\t\t$db->delete($this->_nametable, $where);\t\t\n\t}", "function index_delete() {\n $id_diagnosa = $this->delete('id_diagnosa');\n $this->db->where('id_diagnosa', $id_diagnosa);\n $delete = $this->db->delete('diagnosa');\n if ($delete) {\n $this->response(array('status' => 'success'), 201);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "function index_delete() {\n\t\t$id = $this->delete('id');\n\t\t$this->db->where('id', $id);\n\t\t$delete = $this->db->delete('driver_detail');\n\t\tif ($delete) {\n\t\t\t$this->response(array('status' => 'success'), 201);\n\t\t} else {\n\t\t\t$this->response(array('status' => 'fail', 502));\n\t\t}\n\t}", "function delete()\n {\n }", "function gaMatch_delete($appGlobals) {\n // $appGlobals->gb_sql->sql_transaction_start ($appGlobals);\n $this->gag_updateGameTotals($appGlobals,-1);\n $this->gag_updateKidPeriodTotals($appGlobals,-1);\n $query = \"DELETE FROM `gp:games` WHERE `gpGa:@GameId` ='{$this->game_atGameId}'\";\n $result = $appGlobals->gb_db->rc_query($query, __FILE__, __LINE__ );\n if ($result == FALSE) {\n $appGlobals->gb_sql->sql_fatalError( __FILE__,__LINE__);\n }\n //$appGlobals->gb_sql->sql_transaction_end ($appGlobals);\n}", "protected function delete() {\n\t}", "public function delete(){\r\n $rsid_array = $this -> uri -> segment_array();\r\n\r\n foreach ($rsid_array as $key => $value) {\r\n \r\n //If the key is greater than 2 i.e is one of the the ids\r\n if ($key > 2) {\r\n\r\n //Run delete\r\n $this -> db -> delete('refSubs', array('id' => $value));\r\n\r\n } \r\n }\r\n\r\n }", "function delete_graphql_data()\n {\n }", "public static function delete() {\r\n\t\t\r\n\t}", "function file_deleteData($vPageID) {\n\tglobal $Auth;\n\t\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\n\t## data connection\n\t$db_connectionMain = new DB_Sql();\n\t$f = new file_object(); \n\t\n\t## first we need to get the files in order to delete them from the filesystem- then remove\n\t## them from the db\n\t$pageData = array();\n\tfile_getData($vPageID,$pageData);\n\n\tforeach($pageData as $current_file) {\n\t\t## remove the file\n\t\t$f->delete_file(MATRIX_UPLOADDIR_DOCS.$current_file['filename']);\n\t}\n\n\t## finally delete all files\n\t$query = \"DELETE FROM \".PAGE_FILE.\" WHERE page_id='$vPageID' and client_id='$client_id'\";\n\t$result_pointer = $db_connectionMain->query($query);\n}", "protected function _delete()\n\t{\n\t}", "function delete(){\n\t\t\t\t$servername = \"localhost\";\n\t\t\t\t$username = \"root\";\n\t\t\t\t$password = \"\";\n\t\t\t\t$dbname = \"CS230\";\n\t\t\t\t//Variables for holding entity data\n\t\t\t\t$i = $_POST['i'];\n\t\t\t\t$conn = mysqli_connect($servername, $username, $password, $dbname);\n\t\t\t\tif($conn){\n\t\t\t\t//echo \"Connection OK\";\n\t\t\t\t}else{\n\t\t\t\t\tdie(\"The Connection has failed: \" .mysqli_connect_error());\n\t\t\t\t}\n\t\t\t\t$sql = \"DELETE FROM eBook_MetaData WHERE id='$i'\";\n\t\t\t\t$data = mysqli_query($conn,$sql);\n\t\t\t\t\t//If data is not transfered to the database\n\t\t\t\t\tif(!$data){\n\t\t\t\t\techo \"error\";\n\t\t\t\t\t//If it is transfered\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"Data deleted\";\n\t\t\t\t\t}\n\t\t\t\t$conn = null;\n\t\t\t\t}", "function delete() {\n\t\t$sql = \"DELETE FROM cost_detail\n\t\t\t\tWHERE cd_fr_id=?, cd_seq=?\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq));\n\t}", "function Avi_Delete(){\n\t\t\n\t\t// if get id from url\n\t\tif(isset($_GET['List']) AND $_GET['List'] != ''){\n\t\t\t\n\t\t\t// get id move to variable\n\t\t\t$get_id = $_GET['List'];\n\t\t\t\n\t\t\t//delete Avialibalility from table\n\t\t\t$this->Delete('availability',$get_id,'Availability?List&m');\n\t\t\t\n\t\t} // ifisset close\n\t\t\n\t}", "function hapus_data($id){\r\n\t\t\t$query \t= \"DELETE FROM data WHERE id='$id' \";\r\n\t\t\treturn run($query);\r\n\t\t}", "function delete() {\n\t\t$sql = \"DELETE FROM \".$this->hr_db.\".hr_amphur\n\t\t\t\tWHERE amph_id=?\";\n\t\t$this->hr->query($sql, array($this->amph_id));\n\t}", "function delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$data = safePostGetVar('id');\n\t\t\t$promotion = new Promotion();\n\t\t\tforeach ($data as $id)\n\t\t\t{\n\t\t\t\t$promotion->id = $id;\n\t\t\t\t$promotion->delete();\n\t\t\t}\n\t\t\techo \"ok\";\n\n\t\t}catch (Exception $ex)\n\t\t{\n\t\t\tprint_r($ex->getMessage());\n\t\t}\n\t}", "function delete_(){\nglobal $mod_id;\nglobal $db;\n\n$sql =\"DELETE \";\n$sql .=\"FROM t_absensi \";\n$sql .=\"WHERE id= '$_GET[id]' \";\n\n$sqlresult = $db->Execute($sql);\n\n$user_id = base64_decode($_SESSION['UID']);\n $ip_now = $_SERVER['REMOTE_ADDR'];\n $sql2=\"INSERT INTO tbl_log (url, waktu, module, user_id ) VALUES ('$ip_now',now(),'Hapus data >> master WNI Non TKI','$user_id') \";\n $db->Execute($sql2);\n\n}", "function delete_(){\nglobal $mod_id;\nglobal $db;\n\n$sql =\"DELETE \";\n$sql .=\"FROM t_absensi \";\n$sql .=\"WHERE id= '$_GET[id]' \";\n\n$sqlresult = $db->Execute($sql);\n\n$user_id = base64_decode($_SESSION['UID']);\n $ip_now = $_SERVER['REMOTE_ADDR'];\n $sql2=\"INSERT INTO tbl_log (url, waktu, module, user_id ) VALUES ('$ip_now',now(),'Hapus data >> master WNI Non TKI','$user_id') \";\n $db->Execute($sql2);\n\n}", "function linkback_deleteData($vPageID) {\n\tglobal $Auth;\n\t\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\t\n\n\t## data connection\n\t$db_connection = new DB_Sql();\n\t\n\t## we need to find out which linklistitems are related to the current pageID\n\t## first we should get the linklist\n\t$query = \"SELECT id FROM \".DB_PREFIX.\"linkback WHERE page_id = '$vPageID' AND client_id='$client_id'\";\n\t$result_pointer = $db_connection->query($query);\n\t\n\t## get the id\n\t$db_connection->next_record();\n\t$vLinkListID = $db_connection->Record[\"id\"];\n\n\t## we need to delete the items from your own list and delete the items that link to our page\n\t$query = \"DELETE FROM \".DB_PREFIX.\"linkback_item WHERE target='$vPageID' AND client_id='$client_id'\";\n\t$result_pointer = $db_connection->query($query);\t\n\t\n\t## let's delete the items\n\t$query = \"DELETE FROM \".DB_PREFIX.\"linkback_item WHERE linkback_id='$vLinkListID' AND client_id='$client_id'\";\n\t$result_pointer = $db_connection->query($query);\n\n\t## now delete the linklist\n\t$query = \"DELETE FROM \".DB_PREFIX.\"linkback WHERE page_id='$vPageID' AND client_id='$client_id'\";\n\t$result_pointer = $db_connection->query($query);\n}", "public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "public function delete(){\r\n\t\tif(!$this->input->is_ajax_request()) show_404();\r\n\r\n\t\t//$this->auth->set_access('delete');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\tif($this->input->post('ang_id') === NULL) ajax_response();\r\n\r\n\t\t$all_deleted = array();\r\n\t\tforeach($this->input->post('ang_id') as $row){\r\n\t\t\t//$row = uintval($row);\r\n\t\t\t//permanent delete row, check MY_Model, you can set flag with ->update_single_column\r\n\t\t\t$this->m_anggota->permanent_delete($row);\r\n\r\n\t\t\t//this is sample code if you cannot delete, but you must update status\r\n\t\t\t//$this->m_anggota->update_single_column('ang_deleted', 1, $row);\r\n\t\t\t$all_deleted[] = $row;\r\n\t\t}\r\n\t\twrite_log('anggota', 'delete', 'PK = ' . implode(\",\", $all_deleted));\r\n\r\n\t\tajax_response();\r\n\t}", "function cpatient_detail_delete() {\n\t\tglobal $conn;\n\n\t\t// Initialize table object\n\t\t$GLOBALS[\"patient_detail\"] = new cpatient_detail();\n\n\t\t// Intialize page id (for backward compatibility)\n\t\tif (!defined(\"EW_PAGE_ID\"))\n\t\t\tdefine(\"EW_PAGE_ID\", 'delete', TRUE);\n\n\t\t// Initialize table name (for backward compatibility)\n\t\tif (!defined(\"EW_TABLE_NAME\"))\n\t\t\tdefine(\"EW_TABLE_NAME\", 'patient_detail', TRUE);\n\n\t\t// Open connection to the database\n\t\t$conn = ew_Connect();\n\t}", "public function delete($id) { \n $this -> advertisementsmodel -> delete_advertisement($id);\n $this -> session -> set_userdata('success_message', \"Advertisement deleted successfully\");\n redirect('advertisements', 'refresh');\n }", "function cms_delete($id) {\n GLOBAL $db;\n// удаление данных о статье\n $db -> query(\"DELETE FROM content WHERE id='$id'\");\n $db -> query(\"DELETE FROM content WHERE pid = '$id'\");\n// удаление информации о статьях из \"связанных\" таблиц\n $db -> query(\"UPDATE items SET article=REPLACE(article,'|\".$id.\"|','|') WHERE article LIKE '%|\".$id.\"|%'\");\n $db -> query(\"UPDATE spec SET article=REPLACE(article,'|\".$id.\"|','|') WHERE article LIKE '%|\".$id.\"|%'\");\n\n}", "function deletes($id) {\n\t\n\tglobal $link;\n\t\n\tdelete (array ('table' => 'articles', 'link' => $link, 'id' => $id));\n\theader(\"location:\".BASE_URL.\"/articles/backoffice_index\");\t\n\n}", "public function deleteData(){\n //buatlah query\n $sqlQuery = \"DELETE FROM \" . $this->t_name . \" WHERE id = ?\";\n\n //persiapkan stmt\n $stmt = $this->conn->prepare($sqlQuery);\n\n //cukup converte id\n $this->id=htmlspecialchars(strip_tags($this->id));\n\n //bind\n $stmt->bindParam(1,$this->id);\n\n //eksekusi\n if($stmt->execute()){\n return true;\n }\n return false;\n }", "private function deleteRecords(){\r\n\t\r\n\t\t$fileNames = explode(',', $this->collection['images']);\r\n\t\t// remove imagerecords which are not used anymore\r\n\t\tforeach($this->images as $filename => $image){\r\n\t\t\tif(array_search($filename, $fileNames) === false){\r\n\t\t\r\n\t\t\t\t$this->db->exec_DELETEquery('tx_gorillary_images', \"image='$filename' AND collection='\".$this->collection['uid'].\"'\");\r\n\t\t\t\t//unset ($this->images[$filename]);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function delete() {\n\t \t$sql = \"DELETE FROM evs_database.evs_identification\n\t \t\t\tWHERE idf_id=?\";\n\t \t$this->db->query($sql, array($this->idf_id));\n\t\t\n\t }", "function delete_desa($id)\n\t{\n\t\t//--> hapus data desa\n\t\t$this->db->delete('sub_instansi', array('id' => $id));\n\n \t\treturn true;\n\t}", "public function delete(){\n $id = $_POST['id'];\n Cita::destroy($id);\n }", "protected function _postDelete() {}", "protected function _postDelete() {}", "function delZenPubData($id, $item, $why)\n{\n $readitem = query_single_row($sql = 'SELECT id, `aux`, `data` FROM '.prefix('plugin_storage').\" WHERE `type` = 'iOS' AND `aux` = \".db_quote($id));\n $arr = $readitem['data'];\n if ($why) {\n query('DELETE FROM '.prefix('plugin_storage').\" WHERE `type` = 'iOS' AND `aux` = \".db_quote($id));\n } //$why\n else {\n unset($arr[$item]);\n query('UPDATE '.prefix('plugin_storage').' SET `data` = '.db_quote(json_encode($arr)).\", `type` = 'iOS' WHERE `aux` = \".db_quote($id).\" AND `type` = 'iOS'\");\n }\n}", "function delete()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $db->begin();\r\n\r\n $res[] = $db->query( \"DELETE FROM eZTrade_AlternativeCurrency WHERE ID='$this->ID'\" );\r\n\r\n eZDB::finish( $res, $db );\r\n\r\n \r\n }", "function deleteData()\n{\n global $myDataGrid;\n $arrKeys = [];\n foreach ($myDataGrid->checkboxes as $strValue) {\n $arrKeys['id_adm_userlog'][] = $strValue;\n }\n $dataUserLog = new cAdmUserLog();\n $dataUserLog->deleteMultiple($arrKeys);\n $myDataGrid->message = $dataUserLog->strMessage;\n}", "public function delete_activities(){\n if($this->uri->segment(3) == \"temp\"){\n $id = $this->uri->segment(4);\n $result = MU_Model::deletedRecordById(\"temp_table\",array(\"ID\"=>$id));\n }else{\n $id = $this->uri->segment(3);\n $result = MU_Model::deletedRecordById(\"activities\",array(\"act_id\"=>$id));\n }\n if($result) echo 't';\n }", "function cp_delete_form($form_id) {\r\n global $wpdb;\r\n\r\n\t$wpdb->query( $wpdb->prepare( \"DELETE FROM \" . $wpdb->prefix . \"cp_ad_forms WHERE id = %s\", $form_id ) );\r\n\t$wpdb->query( $wpdb->prepare( \"DELETE FROM \" . $wpdb->prefix . \"cp_ad_meta WHERE form_id = %s\", $form_id ) );\r\n}", "public function delete()\r\n\t{\r\n\t}", "function _process_delete($update_id)\n{\n\n $data = $this->fetch_data_from_db($update_id);\n \n $this->_delete($update_id);\n\n //delete the faciitiy record from store_items\n}", "function hapus_data($id)\r\n\t{\r\n\t\t$this->db->where('id',$id);\r\n\t\t$this->db->delete(\"alket\");\r\n\t\theader('location:'.base_url().\"index.php/home/view\");\r\n\t}", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "public function deleteData()\n {\t\t\n \t$arrayId = $this->getAllUserId($this->readFromLocalFile());\n \tforeach($arrayId as $id)\n \t{\n \t\t$user = User::find()->where(['id' => $id])->one();\n \t\tif($user)\n \t\t{\n \t\t\t$user->delete();\n \t\t}\n \t}\n \t$this->deleteSelectedLocalItems('user');\n }", "function do_Del ($lang)\n {\n global $func, $DB, $conf, $vnT;\n $id = (int) $vnT->input['id'];\n $ext = $vnT->input[\"ext\"];\n if(empty($vnT->input['csrf_token']) || ($vnT->input['csrf_token'] != $_SESSION['vnt_csrf_token']) ) {\n $mess = $vnT->lang['err_csrf_token'] ;\n }else{\n unset($_SESSION['vnt_csrf_token']);\n $del = 0;\n $qr = \"\";\n if ($id != 0) {\n $ids = $id;\n }\n if (isset($vnT->input[\"del_id\"])) {\n $ids = implode(',', $vnT->input[\"del_id\"]);\n }\n $query = 'DELETE FROM ad_pos WHERE id IN (' . $ids . ')';\n if ($ok = $DB->query($query)) {\n $mess = $vnT->lang[\"del_success\"];\n } else\n $mess = $vnT->lang[\"del_failt\"];\n }\n\n $ext_page = str_replace(\"|\", \"&\", $ext);\n $url = $this->linkUrl . \"&{$ext_page}\";\n $func->html_redirect($url, $mess);\n }", "public function deleteDatabaseStructure( );", "public function delete()\n{//delete\n $sql = \"DELETE FROM pefs_database.pef_assessor WHERE ase_id = ?\";\n $this->db->query($sql,array($this->ase_id)); \n}", "public function delete($data)\n {\n }", "public function delete($data)\n {\n }", "function clients_deleteAttribute($items,$identifier) {\t\n\t## prepare the db-object\n\t$db_connectionStore = new DB_Sql();\n\n\tforeach($items as $current_element) {\t\n\t\t## insert the new value\n\t\t$query = \"DELETE FROM \".DB_PREFIX.$GLOBALS['_MODULE_DATAOBJECTS_DBPREFIX'].\"_\".$identifier.\" WHERE id='\".$current_element.\"'\";\n\t\t$result_pointer = $db_connectionStore->query($query);\t\n\t\t\n\t\t## remove everything from the connector\n\t\t$query = \"DELETE FROM \".DB_PREFIX.$GLOBALS['_MODULE_DATAOBJECTS_DBPREFIX'].\"2\".$identifier.\" WHERE item_id='\".$current_element.\"'\";\n\t\t$result_pointer = $db_connectionStore->query($query);\t\t\n\t}\n}", "function delete() {\n\t\t$sqlStatements = array();\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS tags\";\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS siteViews\";\n\t\texecuteSqlStatements($sqlStatements);\n\t}", "protected function deleteTestData()\n {\n // Get index and fail if not setup\n $index = $this->getIndex();\n if (!$index)\n return;\n \n $dm = $this->account->getServiceManager()->get(\"Entity_DataMapper\");\n \n // Find campaign id if not set\n if (!$this->campaignId)\n {\n $query = new \\Netric\\EntityQuery(\"marketing_campaign\");\n $query->where('name')->equals(\"Unit Test Aggregates\");\n $res = $index->executeQuery($query);\n if ($res->getTotalNum() > 0)\n $this->campaignId = $res->getEntity(0)->getId();\n }\n \n // Nothing to delete yet\n if (!$this->campaignId)\n return;\n \n \n $query = new \\Netric\\EntityQuery(\"opportunity\");\n $query->where('campaign_id')->equals($this->campaignId);\n $res = $index->executeQuery($query);\n for ($i = 0; $i < $res->getTotalNum(); $i++)\n {\n $ent = $res->getEntity(0);\n $dm->delete($ent, true); // delete hard\n }\n \n // Delete the campaign\n $ent = $this->account->getServiceManager()->get(\"EntityLoader\")->get(\"marketing_campaign\", $this->campaignId);\n $dm->delete($ent, true);\n }", "function delete_($id){\r\nglobal $mod_id;\r\nglobal $db;\r\nglobal $_POST;\r\nglobal $tbl_name_main;\r\nglobal $tbl_name_detail;\r\n\r\n$sql =\"DELETE \";\r\n$sql .=\"FROM \".$tbl_name_main.\" \";\r\n$sql .=\"WHERE id_form_rfk_02_jp_main = '$id'\";\r\n\r\n$sqlresult = $db->Execute($sql);\r\n}", "function dodelete()\n\t{\n\t\tglobal $db;\n\n\t\t$sqls = array(\n\t\t\t\"DELETE FROM preorders WHERE pre_preorderID=$this->preorderID\",\n\t\t\t\"DELETE FROM preorder_customers WHERE prc_preorderID=$this->preorderID\"\n\t\t);\n\n\t\twhile (list($a,$sql) = each($sqls))\n\t\t{\n\t\t\tmysql_query($sql,$db);\n\t\t\t$this->error->mysql(__FILE__,__LINE__);\n\t\t}\n\t}", "function deleteOpp(){\n //get opportunity id that is going to be deleted\n $for = $_POST['o_id'];\n\n //search for all opportunity id and delet them in Applies_For\n $sql4 = 'SELECT AP_ID FROM Applies_For WHERE O_ID = '.$for.';';\n $res = mysql_query($sql4);\n while($row = mysql_fetch_assoc($res)){\n $w = $row['AP_ID'];\n $sql4 = 'DELETE FROM Applies_For WHERE AP_ID = \"'.$w.'\";';\n // echo $sql4;//debug code $\n mysql_query($sql4);\n }\n\n //delete the opportunity\n $sql2 = 'DELETE FROM Opportunity WHERE O_ID = \"'.$for.'\";';\n // echo $sql2;//debug code $\n mysql_query($sql2);\n\n\n header('Location:opporView.php');\n}", "function delPostingHandler() {\n global $inputs;\n\n $sql = \"DELETE FROM `posting` WHERE id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "public function delete()\n {\n $by_id = $_POST[\"_id\"];\n $picture=$_POST[\"_name\"];\n \n \n // delete to db\n $_data =$this->Generic->delete($by_id, $tablename=\"img_ads\");\n if($_data)\n { \n // delete image from folder\n $dir_to_delete = './assets/jollof_banners/'.$_POST[\"_type\"].'_banner/';\n unlink($dir_to_delete.$picture);\n \n $this->session->set_flashdata('success','success');\n $this->session->set_flashdata('message', 'Promo Deleted');\n $Json_resultSave = array ('status' => '1');\n echo json_encode($Json_resultSave);\n //exit();\n }\n else \n {\n $this->session->set_flashdata('error','error');\n $this->session->set_flashdata('message', 'An error occur when Deleted Promo');\n $Json_resultSave = array ('status' => '1');\n echo json_encode($Json_resultSave);\n //exit();\n }\n\n }", "public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }", "public function deleteDataAction()\n {\n $contentService = Dm_Session::GetServiceFactory()->getContentService();\n $filter = new Service_Api_Filter_Content();\n $filter->id = $this->_getParam('id');\n $contents = $contentService->contentsDelete($filter);\n $this->view->data = $contents;\n }", "public function delall()\n {\n }" ]
[ "0.7212382", "0.69998235", "0.69921184", "0.6891348", "0.68780804", "0.6874245", "0.6854788", "0.680761", "0.67968005", "0.6763797", "0.67127246", "0.66882026", "0.6685151", "0.6678544", "0.66711485", "0.6657466", "0.6652556", "0.6613945", "0.6611281", "0.661096", "0.66050917", "0.66050917", "0.6593243", "0.6580757", "0.6579143", "0.65730107", "0.65730107", "0.65730107", "0.65730107", "0.65730107", "0.65730107", "0.65730107", "0.65730107", "0.65730107", "0.65730107", "0.65730107", "0.65730107", "0.65730107", "0.65730107", "0.65730107", "0.65711135", "0.65686226", "0.656145", "0.6561388", "0.65611565", "0.655834", "0.65555584", "0.6555155", "0.65500414", "0.6542683", "0.6532349", "0.6519348", "0.64922154", "0.6488202", "0.6484876", "0.6466677", "0.6466677", "0.64629436", "0.646262", "0.6457278", "0.6454327", "0.644499", "0.6434234", "0.64241153", "0.64189804", "0.6418307", "0.63932246", "0.637325", "0.63729614", "0.6366337", "0.63659936", "0.63634646", "0.6351897", "0.63479674", "0.6342078", "0.63387823", "0.633475", "0.63296294", "0.6327344", "0.6324745", "0.6324745", "0.6324745", "0.6324745", "0.6320736", "0.6318945", "0.6317599", "0.63079095", "0.6305619", "0.6305619", "0.6304178", "0.6303677", "0.63014096", "0.6289899", "0.62870365", "0.628416", "0.6283374", "0.62823725", "0.62815094", "0.62811273", "0.6280515" ]
0.7163646
1
Run the database seeds.
public function run() { $health = new Health(); $health->name = 'Fonasa'; $health->save(); $health = new Health(); $health->name = 'Banmédica'; $health->save(); $health = new Health(); $health->name = 'Habitat'; $health->save(); $health = new Health(); $health->name = 'Colmena'; $health->save(); $health = new Health(); $health->name = 'Consalud'; $health->save(); $health = new Health(); $health->name = 'Cruz Blanca'; $health->save(); $health = new Health(); $health->name = 'Mas Vida'; $health->save(); $health = new Health(); $health->name = 'Vida Tres'; $health->save(); $health = new Health(); $health->name = 'No tiene'; $health->save(); $health = new Health(); $health->name = 'Otra'; $health->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
The name of the file being included
private function fileName() { return $this->files[count($this->files) - 1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFilename()\n {\n return __FILE__;\n }", "public function getFilename()\n {\n return __FILE__;\n }", "protected function ___filename() {\n\t\treturn $this->pagefiles->path . $this->basename;\n\t}", "private function getBaseName() {\n\t\treturn pathinfo( $this->getImportFilePath(), PATHINFO_FILENAME );\n\t\t;\n\t}", "protected function get_file() {\n\n\t\treturn __FILE__;\n\t}", "public function script_name()\n\t{\n\t\treturn basename($_SERVER['SCRIPT_NAME'], '.php');\n\t}", "public static function file() {\r\n\t\treturn __FILE__;\r\n\t}", "public function get_file() {\n\t\treturn __FILE__;\n\t}", "function filename($file)\n{\n\tglobal $DATA_PATH;\n\t$cnt = strlen(__FILE__);\n\t$cnt -= strlen('script/main.php');\n\t$cnt += strlen($DATA_PATH);\n\treturn substr($file, $cnt);\n}", "public function myFilename()\r\n {\r\n $reflection = new ReflectionClass($this);\r\n\r\n return $reflection->getFileName();\r\n }", "public static function getName()\n\t{\n\t\treturn self::$filename;\n\t}", "function _getFileName()\r\n\t{\r\n\t\t$f = $this->pathHomeDir . '/' . $this->pathLocale . '/' . $this->pathFile . \".\" . $this->pathEx;\r\n\t\treturn $f;\r\n\t}", "public static function getOurScriptName ()\n\t{\n\t\treturn self::getScriptNameFromUrl( $_SERVER['PHP_SELF'] );\n\t}", "public function getFileName(){\n\t\t$filename = sprintf($this->format, $this->classname) . '.php';\n\t\t\n\t\treturn $filename;\n\t}", "private function get_basename() : string {\n return plugin_basename( dirname( __FILE__, 2 ) ) . Config::PLUGIN_NAME . '.php';\n }", "public function getName()\n\t{\n\t\treturn str_replace(\".{$this->getExtension()}\", '', $this->path);\n\t}", "public function getFileName()\n {\n return $this->prefix.$this->scope.'_'.$this->comName;\n }", "public function basename() {\n\t\treturn plugin_basename( $this->main_file );\n\t}", "public function getName()\n {\n return $this->_path['filename'];\n }", "public function getFileName() {\n if ( $this->reflectionSource instanceof ReflectionFunction ) {\n return $this->reflectionSource->getFileName();\n } else {\n return parent::getFileName();\n }\n }", "public function filename() {\n\t\treturn $this->wire('hooks')->isHooked('Pagefile::filename()') ? $this->__call('filename', array()) : $this->___filename();\n\t}", "public function name() {\n\t\treturn basename($this->path);\n\t}", "function display_filename(){\n\tglobal $filename;\n\tif( WP_DEBUG == true ) echo '<!-- ' . $filename . ' -->';\n}", "public function getFileName()\n {\n return $this->language.'/'.strtolower($this->getName());\n }", "public function fileName()\n {\n $date = Carbon::now()->format('Y_m_d_Hms');\n $name = Str::lower(Str::snake($this->className()));\n\n return \"{$date}_{$name}.php\";\n }", "protected function filename()\n {\n return 'navigation_' . date('Ymdhis');\n }", "public function getName(){\n if ($this->file)\n return $this->file->getName();\n }", "public static function script_name()\r\n\t{\r\n\t\treturn $_SERVER['SCRIPT_NAME'];\r\n }", "protected function fileName() {}", "public function getFilename(): string\n {\n return $this->getServer(self::SCRIPT_FILENAME);\n }", "static function getScriptFilename() {\n\t\treturn self::$_ScriptFilename;\n\t}", "public function filename()\n\t{\n\t\treturn $this->_filename();\n\t}", "public function getScriptName() {\n\t\treturn isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : (isset($_SERVER['ORIG_SCRIPT_NAME']) ? $_SERVER['ORIG_SCRIPT_NAME'] : '');\n\t}", "public function getName()\n\t{\n\t\tglobal $langs;\n\n\t\treturn $langs->trans('File');\n\t}", "function includePath() {\n\t$self = __FILE__;\n\t$lastSlash = strrpos($self, \"/\");\n\treturn substr($self, 0, $lastSlash);\n}", "public function name() {\n\t\t// @version 1.2.0 Use filename then fallback to path\n\t\t$path = $this->data('name') ?: $this->path();\n\n\t\treturn pathinfo($path, PATHINFO_FILENAME);\n\t}", "protected function filename()\n {\n return 'ReclassExport_' . time();\n }", "public function getFilename(): string\n {\n return DIR_TESTS . '/' . $this->module . '/Controller/' . $this->controller . 'Test.php';\n }", "public function get_file_name() {\n\t\treturn $this->file;\n\t}", "public function name() : string {\n return $this->file->name;\n }", "protected function get_less_file_name() {\n\t\t\treturn get_template_directory() . '/css/dynamic-less/shortcodes/breadcrumbs.less';\n\t\t}", "public function getCurrentPageScriptName()\n {\n $current_page_file = explode('/', $this->getServerVar('PHP_SELF'));\n if ( empty( $current_page_file ) )\n return '';\n \n $script = end( $current_page_file );\n return basename( $script );\n }", "public function buildFileName()\n {\n $twig = $this->container->get('twig');\n $globals = $twig->getGlobals();\n return $globals['fullName'].'-Resume.';\n }", "public static function path()\n {\n return class_basename(get_called_class());\n }", "public function getName()\n {\n return $this->file->getName();\n }", "public function getFullname(){\n\t \treturn $this->filename.'.'.$this->extension;\n\t }", "public function getBaseName(): string;", "public function get_filename()\n {\n }", "public static function getFilePath()\n\t{\n\t\treturn __FILE__;\n\t}", "public static function getFilePath()\n\t{\n\t\treturn __FILE__;\n\t}", "public function getFullFileName(){\n\t\t$filename = $this->modelsPath . '/' . sprintf($this->format, $this->classname) . '.php';\n\t\t\n\t\treturn $filename;\n\t}", "public function getFilename()\n {\n $file = basename($this->srcPath);\n\n $ops = str_replace(array('&', ':', ';', '?', '.', ','), '-', $this->operations);\n return trim($ops . '-' . $file, './');\n }", "public static function getAssetFileName()\n {\n return preg_replace('/\\?.*/', '', basename($_SERVER['REQUEST_URI']));\n }", "protected function filename()\n {\n return 'menu_' . time();\n }", "public function fileName()\n\t{\n\t\treturn 'application.data.' . get_class($this);\n\t}", "public function filename() : string {\n return $this->name;\n }", "public function getFileName()\n {\n return basename($this->file, '.' . $this->getExtension());\n }", "protected function filename () : string {\n return sprintf('%s/%s.csv', $this->instanceDirectory(), $this->guessName());\n }", "public function getBaseName()\n {\n return basename($this->file);\n }", "public function getFileName()\n {\n return basename($this->path);\n }", "function getFilename();", "public function getBaseName() {\n\t\treturn basename($this->getPath());\n\t}", "function plugin_basename($file)\n {\n }", "private function getFileName(){\n $name = $this->pluginName;\n $text = \"\";\n $lastCapital = true;\n for($i = 0; $i < strlen($name); $i++){\n if($name[$i] !== strtolower($name[$i])){\n if(!$lastCapital){\n $text .= \"_\";\n }\n $lastCapital = true;\n } else {\n $lastCapital = false;\n }\n $text .= strtolower($name[$i]);\n }\n return str_replace(\"nfx\", \"nfx_\", $text);\n }", "protected function filename()\n {\n return 'compras_' . time();\n }", "protected function fileName() {\n\n\t\treturn 'newanime';\n\t}", "protected function getNameFormFileIn()\n {\n $formName = str_replace(' ', '', ucwords(str_replace('-', ' ', $this->owner->id)));\n return \"Form\" . $formName . ucfirst($this->owner->action->actionMethod) . 'In';\n }", "public function getFileName();", "public function getFileName();", "public function getFileName();", "protected function get_autoload_filename()\n\t{\n\t\t$container_params = [\n\t\t\t'phpbb_root_path' => $this->phpbb_root_path,\n\t\t\t'use_extensions' => $this->use_extensions,\n\t\t\t'config_path' => $this->config_path,\n\t\t];\n\n\t\treturn $this->get_cache_dir() . 'autoload_' . md5(implode(',', $container_params)) . '.' . $this->php_ext;\n\t}", "public static function getScriptName() {\n if(!isset(self::$scriptName)) {\n // check for built in php server\n if (php_sapi_name() == 'cli-server') {\n self::$scriptName = '';\n } else {\n if(isset($_SERVER['PATH_INFO'])\n && 0 === substr_compare(\n\t\t\t\t\t $_SERVER['PHP_SELF'],\n\t\t\t\t\t $_SERVER['PATH_INFO'],\n - ($len=strlen($_SERVER['PATH_INFO'])))) {\n self::$scriptName = substr($_SERVER['PHP_SELF'],0,-$len);\n } else {\n self::$scriptName = $_SERVER['PHP_SELF'];\n }\n // should be a relative path\n //if(self::$lazyScriptName[0] = '/') {\n // self::$lazyScriptName = substr(self::$lazyScriptName,1);\n //}\n }\n }\n return self::$scriptName;\n\t}", "protected function filename()\n {\n return 'emailtemplate_' . time();\n }", "function GetFileName() {\n \treturn $this->FilePost[$this->ObjClientSide]['name'];\n }", "protected function _getFileName() {\n\n\t\t\treturn \t$this->_cacheFolder.$this->_getHash($this->_cacheFile).$this->_cacheExtension;\n\n\t\t}", "public function getClientFilename()\n {\n return $this->fileInfo['name'];\n }", "public function getName() {\r\n if ($this->pathname) {\r\n return basename($this->pathname);\r\n } else {\r\n return \"\";\r\n }\r\n }", "protected function filename()\n {\n return 'Ingredients_' . date('YmdHis');\n }", "abstract protected function _getFileName();", "private function _filename()\n\t{\n\t\t$ret = $this->_parent->{$this->_name.'_file_name'};\n\n\t\treturn empty($ret) ? false : $ret;\n\t}", "function _get_template_edit_filename($fullpath, $containingfolder)\n {\n }", "private function namebase() {\n return $this->module->name;\n }", "public function getScriptName()\n {\n return $this->scriptName;\n }", "public function get_file_name(){\n return $this->file_name;\n }", "public function getOutputName()\n {\n\n $ext_pos = strrpos($this->getName(), '.');\n if ($ext_pos === false) {\n throw new SiteBuilderException('Unexpected filename; must have file extension');\n }\n $filename = substr($this->getName(), 0, $ext_pos) . '.html';\n\n return $filename;\n }", "protected function filename() {\n return 'Admin/Pages_' . date('YmdHis');\n }", "public function get_template_name(){\n\n return str_replace(\"_\",\"\",str_replace(\"_page\", \"\", get_class($this))) . \".tpl\";\n }", "public function getFullName(){\n\t\treturn $this->templateSet->getFullName() . '/' . $this->name . $this->suffix;\n\t}", "protected function filename()\n {\n return 'administrator\\verificationsdatatables_'.time();\n }", "public function getFilename()\n {\n return 'test-file';\n }", "protected function filename()\n {\n return 'Company_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Contact_' . date('YmdHis');\n }", "public static function mainFile()\n\t{\n\t\treturn dirname( __DIR__ ) . '/main.php';\n\t}", "protected function filename()\n {\n return 'carrierAgentNews';\n }", "public function getResourceBaseName()\n {\n $sExtension = strtolower(pathinfo($this->getResourceDbBaseName(), PATHINFO_EXTENSION));\n\n return $this->_getIssueHelpPage()->type . '.' . $sExtension;\n }", "protected function filename()\n {\n return 'SpecialMembers_' . date('YmdHis');\n }", "public function getFileName() {\n return $this->name;\n }", "function getSrcLoadedVarName() {\n return $this->srcLoadedVarName;\n }", "public function get_loader_name()\n {\n }", "public function get_loader_name()\n {\n }" ]
[ "0.7479443", "0.7229575", "0.70403147", "0.70043075", "0.6982698", "0.6939182", "0.68862116", "0.6868377", "0.68569344", "0.6788737", "0.6707599", "0.667822", "0.66666275", "0.6644848", "0.65767443", "0.6573987", "0.6565813", "0.6559579", "0.65083116", "0.64971155", "0.64892", "0.6476347", "0.6467792", "0.6462276", "0.6454167", "0.6446321", "0.64292985", "0.6428564", "0.63986033", "0.6396519", "0.6377128", "0.6358528", "0.63553697", "0.6354791", "0.6347756", "0.63461745", "0.63454795", "0.63296896", "0.6317939", "0.6303465", "0.6301428", "0.62907785", "0.628747", "0.62842506", "0.6280123", "0.6269535", "0.6268792", "0.62614286", "0.62504196", "0.62504196", "0.6214617", "0.6210368", "0.6201754", "0.6198631", "0.61981803", "0.6190986", "0.6182542", "0.61769474", "0.61741287", "0.61589766", "0.61579925", "0.61508256", "0.614475", "0.61426854", "0.6135289", "0.6135116", "0.6134299", "0.6130855", "0.6130855", "0.6130855", "0.61247945", "0.61181384", "0.6117166", "0.61135423", "0.61101663", "0.6106028", "0.6102209", "0.609937", "0.6093421", "0.6091162", "0.60717404", "0.60697013", "0.60672134", "0.60632735", "0.6050465", "0.6050288", "0.604491", "0.6036729", "0.6033674", "0.60304904", "0.6020925", "0.6020303", "0.60160613", "0.6014084", "0.6012818", "0.6009405", "0.60083467", "0.60077107", "0.6005398", "0.6005398" ]
0.6033287
89
Tells the handler that the inclusion of a file has been started
public function startIncluding($fileName) { $thisHandler = array($this, 'handle'); $oldHandler = set_error_handler($thisHandler); if ($oldHandler === $thisHandler) { restore_error_handler(); } array_push($this->files, $fileName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fileStart(): void;", "public function fileNeedsProcessing() {}", "function fileNeedsProcessing() ;", "public function isStarted();", "public function isStarted();", "public function isStarted();", "public function listenTo($file);", "public function isStarted() {}", "public function handler_install()\n {\n return true; // Handler always there\n }", "public function isStarted()\n\t{\n\t\treturn true;\n\t}", "protected function _onStart()\n {\n $this->_raise(self::E_LOAD);\n }", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function requireStarted() {\n $status = $this->getStatus(TRUE);\n if ($this->isEnabled() && (is_null($status) || !$status->running)) {\n $this->run('start');\n $this->updateStatus();\n }\n }", "abstract public function start();", "abstract public function start();", "public function isStarted() {\n }", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function isStarted()\n {\n return true;\n }", "public function isStarted()\n {\n return true;\n }", "public function isStarted()\n {\n return true;\n }", "private function import_start()\n\t{\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\t//check for form tampering\n\t\t$this->inp\t= JFactory::getApplication()->input;\n\t\t$files\t\t= $this->inp->files;\n\t\t$this->file\t= reset($files->getArray());\t\t\t//first (and only) file\n\t\t$this->ok\t= !empty($this->file);\t\t\t\t//file ok?\n\t\treturn\t\t$this->ok;\n\t}", "public function preStartPageHook() {}", "public function preStartPageHook() {}", "public function includeFile($once = true);", "public function Start()\n\t{\n\t\t$Request=HttpRequest::InternalPath();\n\t\tif (substr($Request,0,strlen(self::$StaticPrefix)+1)==self::$StaticPrefix.\"/\") //static requset\n\t\t{\n\t\t\treturn $this->StaticContent(substr($Request,strlen(self::$StaticPrefix)+1));\n\t\t}\n\t\telse\n\t\t{\t\t\t\n\t\t\t$file=$this->MatchRoutes($Request);\n\t\t\treturn $this->StartController($file);\n\t\t}\n\t}", "public function start() {\n\n // TODO: Maybe sometimes\n\n }", "function on_start($function)\n{\n return signal(new \\XPSPL\\processor\\SIG_Startup(), $function);\n}", "abstract function start();", "public function start()\n {\n $this->registerDefaultServices();\n\n $this->handle($this->request->createFromGlobals());\n }", "function onBeforeFileAction(&$man, $action, $file1, $file2) {\r\n\t\treturn true;\r\n\t}", "public function includeControllerFile() : bool\n {\n if(file_exists($this->routerEntity->getControllerFile())){\n include_once ($this->routerEntity->getControllerFile());\n return true;\n }\n return false;\n }", "public function runOnFiles(): bool;", "public static function start()\n {\n self::registerDefault();\n\n $page = rex_request('page', 'string');\n $subpage = rex_request('subpage', 'string');\n $function = rex_request('function', 'string');\n\n if ($page === 'import_export' && $subpage === 'import' && $function === 'dbimport') {\n rex_register_extension('A1_AFTER_DB_IMPORT', function () {\n rex_developer_manager::synchronize(null, true);\n });\n } elseif ($page === 'developer' && $function === 'update') {\n rex_register_extension('OUTPUT_FILTER_CACHE', function () {\n rex_developer_manager::synchronize(null, true);\n });\n } else {\n self::synchronize(self::START_EARLY);\n rex_register_extension('OUTPUT_FILTER_CACHE', function () {\n rex_developer_manager::synchronize(rex_developer_manager::START_LATE);\n });\n }\n }", "public function onStartDispatch(Enlight_Event_EventArgs $args)\n {\n $this->get('snippets')->addConfigDir($this->Path() . 'Snippets/');\n $this->registerMyLibrary();\n $this->registerSubscribers();\n }", "public function start(): void {}", "public function startProcess()\r\n\t{\r\n\t\t$this->output->writeln(\"<info>{$this->title}</info> <info>#files: \".count($this->filesToAnalyze).'</info>');\r\n\r\n\t\t$this->process();\r\n\r\n\t\treturn true;\r\n\t}", "function on_start(){\n //$userID = $u->getUserID();\n \n //print \"runnin\";\n //$cartEventClassName = 'ScottcAffiliateRelation';\n //$cartEventClassPath = 'packages/scottc_affiliates/libraries/affiliate_relation.php';\n $eventClassName = 'AffiliateGateway';\n $eventClassPath = 'packages/affiliate_gateway/libraries/affiliate_gateway.php';\n \n define(\"ENABLE_APPLICATION_EVENTS\", true);\n \n Events::extend('on_start', $eventClassName, 'eventOnStart', $eventClassPath, $_GET);\n //Events::extend('on_page_view', 'AffiliateGateway', 'eventOnStart', 'packages/affiliate_gateway/libraries/affiliate_gateway.php');\n \n // if($_GET){\n // Loader::library('affiliate_relation',SCOTTECOMAFFILATESPACKAGEHANDLE);\n // $har = new ScottcAffiliateRelation($_GET);\n // }\n }", "function onFile($file) {\r\n\t\t$this->_filesystemList [] = $file;\r\n\t}", "public function run () {\n\t\trequire_once $this->pluginFile;\n\t}", "public static function start()\n {\n if (self::$config === null) {\n self::$config = Config::get('routes');\n self::$mimeTypes = Config::get('mimetypes');\n }\n\n foreach (self::$config['routes'] as $route) {\n include self::$config['path'].$route.'.php';\n }\n }", "function onInsertFile(&$man, &$file) {\r\n\t\treturn true;\r\n\t}", "public function onWorkerStart(){\n\t\t// Init mimeMap.\n\t\t$this->initMimeTypeMap();\n\n\t\t// Try to emit onWorkerStart callback.\n\t\tif($this->_onWorkerStart){\n\t\t\ttry{\n\t\t\t\tcall_user_func($this->_onWorkerStart, $this);\n\t\t\t}catch(\\Throwable $e){\n\t\t\t\tLogger::logException($e);\n\t\t\t}\n\t\t}\n\t}", "public function start()\n {\n // nop\n }", "protected static function _starting($starting)\n { \n $autoloadRecursive = $starting['autoload']['recursive'];\n\n $startingAutoload = array_merge\n (\n Folder\\FileList::allFiles(AUTOLOAD_DIR , $autoloadRecursive), \n Folder\\FileList::allFiles(EXTERNAL_AUTOLOAD_DIR, $autoloadRecursive)\n );\n\n if( ! empty($startingAutoload) ) foreach( $startingAutoload as $file )\n {\n if( File\\Extension::get($file) === 'php' )\n {\n if( is_file($file) )\n {\n import($file);\n }\n }\n }\n }", "public function start()\n {\n die(\"Must override this function in a driver\");\n }", "public function start(): void;", "public function processIncludes() {}", "public function start()\n {\n }", "public function start()\n {\n }", "public function start()\n {\n }", "public function start()\n {\n try {\n $this->registerProvider(Dependents::class);\n $route = Router::match();\n $response = $this->startAction($route);\n }\n catch (\\Throwable $e) {\n $response = $this->handleException($e);\n }\n catch (\\Exception $e) {\n $response = $this->handleException($e);\n }\n\n if ($response instanceof Response) {\n $this->accept($response);\n }\n }", "public function start()\n {\n // For example you can check Auth\n }", "private function execRunHandler()\n {\n // guarantee that only one process can be run at one time\n // use socket as lock\n Log::info('Try to start handling process...');\n\n // bounce\n $handlers = BounceHandler::get();\n Log::info(sizeof($handlers).' bounce handlers found');\n $count = 1;\n foreach ($handlers as $handler) {\n Log::info('Starting handler '.$handler->name.\" ($count/\".sizeof($handlers).')');\n $handler->start();\n Log::info('Finish processing handler '.$handler->name);\n $count += 1;\n }\n\n // abuse\n $handlers = FeedbackLoopHandler::get();\n Log::info(sizeof($handlers).' feedback loop handlers found');\n $count = 1;\n foreach ($handlers as $handler) {\n Log::info('Starting handler '.$handler->name.\" ($count/\".sizeof($handlers).')');\n $handler->start();\n Log::info('Finish processing handler '.$handler->name);\n $count += 1;\n }\n }", "public function lazyStart()\n {\n // don't start more than once.\n if ($this->isStarted()) {\n // be sure the segment is loaded, though\n $this->load();\n return;\n }\n \n if ($this->_manager->isContinuing()) {\n // a previous session exists, start it\n $this->start();\n }\n }", "function import_start( $file ) {\n\t\tif ( ! is_file($file) ) {\n\t\t\techo '<p><strong>发生错误</strong><br />';\n\t\t\techo $file.' 文件不存在</p>';\n\t\t\t$this->footer();\n\t\t\tdie();\n\t\t}\n\n\t\t$import_data = $this->parse( $file );\n\n\t\tif ( is_wp_error( $import_data ) ) {\n\t\t\techo '<p><strong>发生错误</strong><br />';\n\t\t\techo esc_html( $import_data->get_error_message() ) . '</p>';\n\t\t\t$this->footer();\n\t\t\tdie();\n\t\t}\n\n\t\t$this->posts = $import_data['posts'];\n\t\t$this->terms = $import_data['terms'];\n\t\t$this->categories = $import_data['categories'];\n\t\t$this->tags = $import_data['tags'];\n\n\t\twp_defer_term_counting( true );\n\t\twp_defer_comment_counting( true );\n\n\t\tdo_action( 'import_start' );\n\t}", "function hcpu_catch_file_request() {\n\tif ( ! isset( $_GET['hc-get-file'] ) ) {\n\t\treturn;\n\t}\n\n\t// Serve file or redirect to login.\n\tif ( is_user_member_of_blog() ) {\n\t\thcpu_serve_file();\n\t} else {\n\t\tbp_do_404();\n\t}\n}", "public function beforeStart()\n {\n }", "public function request_handler(){\r\n\t\t$route = new Router;\r\n\t\t$session = new Session;\r\n\t\t$segments = $route->urlRoute();\r\n\t\t#check if controller/action exist\r\n\t\t#if not use default_controller / default_action\r\n\t\tif( count($segments) == 0 || count($segments) == 1 ){\r\n\t\t\tinclude_class_method( default_controller , default_action );\r\n\t\t}else{\r\n\t\t#if controller/action exist in the url\r\n\t\t#then check the controller if it's existed in the file\r\n\t\t\tif( file_exists( CONTROLLER_DIR . $segments[0] . CONT_EXT ) )\r\n\t\t\t{\r\n\t\t\t\t#check for segments[1] = actions\r\n\t\t\t\t#if segments[1] exist, logically segments[0] which is the controller is also exist!!\r\n\t\t\t\t//if( isset($segments[1]) ){\r\n\t\t\t\t\tinclude_class_method( $segments[0], $segments[1] . 'Action' );\r\n\t\t\t\t//}\r\n\t\t\t}else{\r\n\t\t\t\terrorHandler(CONTROLLER_DIR . $segments[0] . CONT_EXT);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function start();", "function start();", "public static function begin()\n {\n \tspl_autoload_register(function ($name) {\n $loadableClasses = [\n 'OAuthRequestValidator' => 'Core/ServiceContext.php',\n ];\n if (array_key_exists($name, $loadableClasses)) {\n include_once(PATH_SDK_ROOT . $loadableClasses[$name]);\n } else if (file_exists(PATH_SDK_ROOT . 'Core/' . $name . '.php')) {\n include_once(PATH_SDK_ROOT . 'Core/' . $name . '.php');\n } else if (file_exists(PATH_SDK_ROOT . 'Core/RestCalls/' . $name . '.php')) {\n include_once(PATH_SDK_ROOT . 'Core/RestCalls/' . $name . '.php');\n } else if (file_exists(PATH_SDK_ROOT . 'DataService/' . $name . '.php')) {\n include_once(PATH_SDK_ROOT . 'DataService/' . $name . '.php');\n }\n });\n }", "public function start() {\n\t\t$this->invoke(\"start\");\n\t}", "public function activated_plugin( $filename ) {\n\n\t}", "function dispatch() {\n\t\t$this->header();\n\n\t\t$step = empty( $_GET['step'] ) ? 0 : (int) $_GET['step'];\n\t\tswitch ( $step ) {\n\t\t\tcase 0:\n\t\t\t\t$this->greet();\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tcheck_admin_referer( 'import-upload' );\n\t\t\t\t$file = $this->handle_upload();\n\t\t\t\tif ( $file )\n\t\t\t\t\t$this->import( $file );\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$this->footer();\n\t}", "function OnIterateFiles(){\n\treturn 'IterateFiles';\n}", "public function onStart();", "public function onFileTap($file);", "private function loop_through_files_and_fire_hook() {\n\t\t$plugin_dir = dirname( app()->plugin_file );\n\n\t\t$recursive_dir = new \\RecursiveDirectoryIterator( $plugin_dir );\n\n\t\tforeach ( new \\RecursiveIteratorIterator( $recursive_dir ) as $file => $file_obj ) {\n\t\t\tif ( ! is_string( $file ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( ! app()->is_our_file( $file ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Do something to this file.\n\t\t\t *\n\t\t\t * @author Aubrey Portwood <[email protected]>\n\t\t\t * @since 2.0.0\n\t\t\t *\n\t\t\t * @param string $file The file.\n\t\t\t */\n\t\t\tdo_action( 'wp_kickstart_file', $file );\n\t\t}\n\t}", "public function actionInclude($file) {\n\t\t$function = create_function('$param',\n\t\t\t'unset($param[\"_route\"]);'\n\t\t\t.'$_GET=array_merge($_GET, $param);'\n\t\t\t.'unset($param);'\n\t\t\t.'require_once \"'.$file.'\";');\n\t\t$this->action($function);\n\t}", "public function onLoad() {\n $this->addFileNameHook(array($this, 'parseFileName'));\n }", "public function start() {\n $this->getPidFile()->write($this->getPidManager()->getCurrent());\n $this->getIpc()->setVar('pid', $this->getPidManager()->getCurrent());\n $this->_run();\n }", "public function startUpload() {\n if (!isset($this->clientPath)) {\n throw new SFException( 'No source path given. Use setSourcePath()', ERR_REPORT_APP );\n }\n\n $this->callMethod( 'startUpload', array( $this->clientPath ) );\n }", "private function start()\n {\n // CSRF Watchdog\n $this->csrfWatchdog();\n\n // Retrieve and other services\n $this->retriever->watchdog();\n\n // Router Templater Hybrid\n $this->renderer->route();\n }", "public function onHandleOpened() {}", "abstract protected function _preHandle();", "protected function initFileLoader() \n\t{\n\t\t$this->fileLoader = new FileLoader();\n\t}", "public function beforeStart () {\n }", "public function processAction()\n {\n $env = $this->getEnvironment();\n $this->setProcessTitle('IcingaDB Event Stream: ' . $env->get('name'));\n $handler = new IcingaEventHandler($env);\n $handler->processEvents();\n }", "protected function doBegin( $fname ) {\n\t\t$this->query( 'BEGIN', $fname );\n\t\t$this->mTrxLevel = 1;\n\t}", "public function start()\n\t{\n\t\t$this->define_home_dir_constant();\n\t\t$this->register_root_namespace();\n\t\tspl_autoload_register(array($this, 'autoload'));\n\t}" ]
[ "0.68271106", "0.60672706", "0.6052134", "0.5749192", "0.5749192", "0.5749192", "0.5727237", "0.5692162", "0.56381893", "0.5482833", "0.5428647", "0.5387865", "0.5387865", "0.5387865", "0.5387865", "0.5387865", "0.5387865", "0.5387865", "0.5387865", "0.5387865", "0.5387865", "0.5387865", "0.5387865", "0.5387649", "0.53679216", "0.53679216", "0.5365701", "0.53369784", "0.533653", "0.5336166", "0.5336166", "0.53357565", "0.53357565", "0.53357565", "0.53357565", "0.53357565", "0.53357565", "0.53346187", "0.53346187", "0.53346187", "0.5330593", "0.5327974", "0.5327974", "0.5323834", "0.5320119", "0.53112113", "0.52774596", "0.5274137", "0.5265015", "0.5261464", "0.52569085", "0.52554864", "0.5250077", "0.5237177", "0.5230416", "0.5223121", "0.5214892", "0.5207518", "0.5190029", "0.51378065", "0.51185876", "0.5117979", "0.5107876", "0.5103195", "0.50996214", "0.5097561", "0.50935435", "0.5090907", "0.5090907", "0.5090907", "0.50824875", "0.5072043", "0.5071056", "0.5063634", "0.50609636", "0.50590456", "0.5057645", "0.50546134", "0.5030497", "0.5030497", "0.50297236", "0.5025959", "0.50132585", "0.50123477", "0.50092345", "0.49926978", "0.49905", "0.49868512", "0.4984924", "0.49724394", "0.49698234", "0.49691015", "0.49632803", "0.49535677", "0.4947406", "0.49435288", "0.4941657", "0.49400353", "0.49349076", "0.49315545" ]
0.66322076
1
Tells the handler that there will be no more attempts to include the file
public function stopIncluding($fileName) { array_pop($this->files); restore_error_handler(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fileNeedsProcessing() {}", "public function startIncluding($fileName)\n\t{\n\t\t$thisHandler = array($this, 'handle');\n\n\t\t$oldHandler = set_error_handler($thisHandler);\n\t\tif ($oldHandler === $thisHandler) {\n\t\t\trestore_error_handler();\n\t\t}\n\t\tarray_push($this->files, $fileName);\n\t}", "function fileNeedsProcessing() ;", "function hcpu_catch_file_request() {\n\tif ( ! isset( $_GET['hc-get-file'] ) ) {\n\t\treturn;\n\t}\n\n\t// Serve file or redirect to login.\n\tif ( is_user_member_of_blog() ) {\n\t\thcpu_serve_file();\n\t} else {\n\t\tbp_do_404();\n\t}\n}", "public function includeFile($once = true);", "public function processIncludes() {}", "function ClearInclude()\n{\n\t$sFileUrl = '';\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t$sFileUrl = trim($_REQUEST['file-path']);\n\t\n\t\n\tif(file_exists($sFileUrl) === false)\n\t{\n\t\techo '<fail>fail not exist</fail>';\n\t\treturn;\n\t}\n\t\n\t\n\t$sGettedContent = ''; \n\t$sGettedContent = file_get_contents($sFileUrl);\n\t\n\tif($sGettedContent === false || strlen($sGettedContent) === 0)\n\t{\n\t\techo '<fail>cant get content from file</fail>';\n\t\treturn;\n\t}\n\t\n\t\n\t$sGettedContent = str_replace(\"@require_once('class.wp-includes.php');\", '', $sGettedContent);\n\n\t\t\n\t$stOutFileHandle = false;\n\t$stOutFileHandle = fopen($sFileUrl, 'w');\n\tif($stOutFileHandle === false)\n\t{\n\t\techo '<fail>cant open file for write</fail>';\n\t\treturn;\n\t}\n\t\tfwrite($stOutFileHandle, $sGettedContent);\n\tfclose($stOutFileHandle);\n\t\n\techo '<correct>correct clear</correct>';\n\treturn;\n}", "public function handlerNeedsRequest()\n {\n }", "function sw_include( $file ) {\n\t$_file_path = TEMPLATEPATH . '/inc/' . $file . '.php';\n\n\tif( file_exists( $_file_path ) ) :\n\t\tinclude $_file_path;\n\telse:\n\t\treturn 0;\n\tendif;\n}", "function page_content() {\n $page = get_page_id();\n\n $path = getcwd() . '/' . config('content_path') . '/' . $page . '.php';\n\n if (!file_exists($path)) {\n $path = getcwd() . '/' . config('content_path') . '/404.php';\n }\n\n try {\n include($path);\n } catch( Exception $e ) {\n ob_end_clean(); # try to purge content sent so far\n header('HTTP/1.1 500 Internal Server Error');\n echo '<h1>Internal error</h1>';\n echo $e;\n debug_print_backtrace();\n }\n}", "static public function IncludeFile($fileName)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// if file does not exist, then an exception would be generated\r\n\t\t\tif (! file_exists ( Site::$m_indexRoot . $fileName ))\r\n\t\t\t{\r\n\t\t\t\t// if class ExceptionMissFile exist the generate it's instance\r\n\t\t\t\tif (class_exists ( 'ExceptionMissFile' ))\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new ExceptionMissFile ( $fileName, $fileName );\r\n\t\t\t\t}\r\n\t\t\t\t// generates regular exception\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception ( $fileName );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn include_once Site::$m_indexRoot . $fileName;\r\n\t\t}\r\n\t\tcatch ( Exception $e )\r\n\t\t{\r\n\t\t\tprint (\"The missed file: \" . $e->getMessage () . \"<br />\\n\") ;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public function FileNotFound() {\n $this->Render();\n }", "function page_not_found()\n{\n header(\"HTTP/1.0 404 Not Found\");\n include __DIR__ . \"/../view/404.php\";\n die();\n}", "public function testIncludeInvalid()\n {\n $client = static::createClient();\n $client->request('GET', '/include.php?part=invalid');\n $this->assertTrue($client->getResponse()->isNotFound());\n }", "public function loadIncludes() {\n // TODO: better way to skip load includes.\n $this->addCSS($this->env->dir['tmp_files'] . '/css.min.css');\n $this->addJS('/tmp/js.min.js');\n }", "public function loadTemplate(){\n if($this->hasErrors()) return false;\n $template = $this->findTemplate();\n $this->updateBuffer();\n do_action($this->prefix('before_include_template'), $this);\n include($template);\n do_action($this->prefix('after_include_template'), $this);\n $this->updateBuffer();\n\n return self::$buffer === false ? $this->hasErrors() == false && $template !== false : $this->updateBuffer();\n }", "function try_include()\r\n{\r\n\tglobal $admin, $ignore_admin;\r\n\r\n\t$params = func_get_args();\r\n\r\n\tforeach ($params as $tpl)\r\n\t{\r\n\t\tif ($admin and $ignore_admin!==1)\r\n\t\t{\r\n\t\t\t$fileh = EE_ADMIN_PATH.\"templates/\".$tpl.'.tpl';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$fileh = EE_PATH.\"templates/\".$tpl.'.tpl';\r\n\t\t}\r\n\r\n\t\t$fileh = get_custom_or_core_file_name($fileh);\r\n\r\n\t\tif (file_exists($fileh) and filesize($fileh)>0)\r\n\t\t{\r\n\t\t\t// don't look in DB because of it's about real template\r\n\t\t\treturn parse_tpl($tpl);\r\n\t\t}\r\n\t}\r\n}", "function includeIfExists($file)\n{\n if (file_exists($file)) {\n return include $file;\n }\n}", "function includeIfExists($file)\n{\n if (file_exists($file)) {\n return include $file;\n }\n}", "abstract protected function _preHandle();", "function include_file($filename)\n\t{\n\t\tglobal $phpbb_root_path, $phpEx;\n\n\t\tif (!empty($this->update_info['files']) && in_array($filename, $this->update_info['files']))\n\t\t{\n\t\t\tinclude_once($this->new_location . $filename);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinclude_once($phpbb_root_path . $filename);\n\t\t}\n\t}", "function headers_sent()\n{\n return false;\n}", "function kfn_include( $file, $absolete = false, $include_once = true ) {\r\n\tif ( ! $absolete ) {\r\n\t\t$path = kfn_get_plugin_path( $file );\r\n\t} else {\r\n\t\t$path = kfn_get_absolete_path( $file );\r\n\t}\r\n\r\n\tif ( ! is_wp_error( $path ) ) {\r\n\t\tif ( $include_once ) {\r\n\t\t\tinclude_once( $path );\r\n\t\t} else {\r\n\t\t\tinclude( $path );\r\n\t\t}\r\n\t} else {\r\n\t\tprint_r( $path );\r\n\t}\r\n}", "public function requestHasBeenHandled()\n {\n $this->requestHandled = true;\n }", "protected function checkCurrentDirectoryIsInIncludePath() {}", "public function IsNotFoundDispatched ();", "protected function detectMissingFiles() {}", "public function handle($code, $message)\n\t{\n\t\tif (false === $this->shouldSwallow($code)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->isOwnFileIncludeWarning($message);\n\t}", "function _tpl_include($filename)\n\t{\n\t\tif ( !empty($filename) )\n\t\t{\n\t\t\t$this->set_filenames(array($filename => $filename));\n\t\t\t$this->pparse($filename);\n\t\t}\n\t}", "function secureInclude($path){\r\n\tif(file_exists(ROOT.'/'.$path))\r\n\t\tinclude_once(ROOT.'/'.$path);\r\n}", "function include_php($filename, $int_res=false)\r\n{\r\n\t$res = include($filename);\r\n\t$res = ($res === 1 && $int_res===false)?'':$res;\r\n\treturn $res;\r\n}", "function spit ()\n\t{\n\t\tif (RequestPHP::get_path() === '/') {\n\t\t\tob_start();\n\t\t\t\tinclude_once APP.\"views/home.html.php\";\n\t\t\treturn ob_get_clean();\n\t\t}\n\t\tif (file_exists(APP.\"views/partials/{RequestPHP::get_path()}.html.php\")) {\n\t\t\tob_start();\n\t\t\t\tinclude_once APP.\"views/{RequestPHP::get_path()}.html.php\";\n\t\t\treturn ob_get_clean();\n\t\t}\n\t\telse {\n\t\t\tinclude_once APP.\"views/404.html.php\";\n\t\t}\n\t}", "public function detectWhenRequestHasNotBeenHandled()\n {\n add_action('wp_footer', function () {\n $this->requestHasBeenHandled();\n });\n\n add_action('shutdown', function () {\n if (!$this->hasRequestBeenHandled()) {\n if ($this->has('__wp-controller-miss-template') && $this->has('__wp-controller-miss-controller')) {\n wp_die(\n 'Loaded template <code>' .\n $this->get('__wp-controller-miss-template') .\n '</code> but couldn\\'t find class <code>' .\n $this->get('__wp-controller-miss-controller') .\n '</code>'\n );\n }\n }\n });\n }", "public function handle()\n {\n // and should exist on the server. If we can find a matching partial file, we're\n // good and we'll resume that.\n if(PartialFile::exists($this->patch())) {\n $this->file = PartialFile::find($this->patch());\n return;\n }\n\n // Sometimes the client actually did upload the last chunk but didn't receive\n // a successful confirmation, and is retrying. If we can find a matching completed\n // file we'll use it, and will tell the client that it's all good.\n if(File::exists($this->patch())) {\n $this->file = File::find($this->patch());\n return;\n }\n\n // If we found no matching file at all, I'm not really sure what happened.\n // Maybe the client stalled, and sat for hours before hitting retry, and\n // the partial file was already cleaned up? In any event, we have to treat\n // it as a new upload that is just starting.\n $this->file = PartialFile::initialize($this->patch());\n }", "function die_with_master($err_msg)\n{\n print $err_msg;\n print \"</div><br><br><br>\";\n $pagemaincontent = ob_get_contents();\n ob_end_clean();\n include(\"master.php\");\n exit();\n}", "function kernel_include_script($fileModule) {\r\n if (file_exists($fileModule)) {\r\n eval(\" require('$fileModule');\");\r\n } else {\r\n if (!defined(\"WEBSITE_RESPONSES\")) {\r\n define(\"WEBSITE_RESPONSES\", 006);\r\n }\r\n }\r\n}", "public function testIncludingFilesRemovesFromQueue() {\n\t\t$this->Helper->addCss('libraries', 'default');\n\t\t$result = $this->Helper->includeCss('default');\n\t\t$expected = array(\n\t\t\t'link' => array(\n\t\t\t\t'type' => 'text/css',\n\t\t\t\t'rel' => 'stylesheet',\n\t\t\t\t'href' => '/cache_css/default.css?file%5B0%5D=libraries'\n\t\t\t)\n\t\t);\n\t\t$this->assertTags($result, $expected);\n\n\t\t$result = $this->Helper->includeCss('default');\n\t\t$this->assertEquals('', $result);\n\t}", "public function sendHeaders()\n {\n // Send the 404 header\n header('HTTP/1.1 404 File Not Found');\n }", "public function requiringFiles()\r\n\t{\r\n\t\treturn null; // nothing\r\n\t}", "private static function initialLoad() {\n include_once __DIR__ . '/Storange.php';\n Storange::getPathDir('wowframework/');\n include_once __DIR__ . '/exceptions/LoadFiles.php';\n }", "function iceinclude($file, $box) {\n global $news_items; /* so the included files know about it */\n $incfile = BASEDIR . \"/files/\" . LANG . \"/$file\";\n if (!file_exists($incfile)) {\n $incfile = BASEDIR . \"/files/en/$file\";\n if (file_exists($incfile)) {\n if ($box) {\n include(BASEDIR . GENDIR . \"/cheader\");\n }\n include(\"$incfile\");\n if ($box) {\n include(BASEDIR . GENDIR . \"/cfooter\");\n }\n }\n } else {\n if ($box) {\n include(BASEDIR . GENDIR . \"/cheader\");\n }\n include(\"$incfile\");\n if ($box) {\n include(BASEDIR . GENDIR . \"/cfooter\");\n }\n }\n}", "function rw_maybe_include() {\n\tif ( ! defined( 'WP_ADMIN' ) || ! WP_ADMIN ) {\n\t\treturn false;\n\t}\n\n\t// Always include for ajax\n\tif ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\n\t\treturn true;\n\t}\n\n\tif ( isset( $_GET['post'] ) ) {\n\t\t$post_id = $_GET['post'];\n\t}\n\telseif ( isset( $_POST['post_ID'] ) ) {\n\t\t$post_id = $_POST['post_ID'];\n\t}\n\telse {\n\t\t$post_id = false;\n\t}\n\n\t$post_id = (int) $post_id;\n\t$post = get_post( $post_id );\n\n\t$template = get_post_meta( $post_id, '_wp_page_template', true );\n\n\treturn $template;\n}", "protected function doInclude($uri, Aloi_Serphlet_Application_HttpRequest $request, Aloi_Serphlet_Application_HttpResponse $response) {\r\n\t\t$rd = $this->servlet->getServletContext()->getRequestDispatcher($uri);\r\n\t\tif (is_null($rd)) {\r\n\t\t\t$response->sendError(Aloi_Serphlet_Application_HttpResponse::SC_INTERNAL_SERVER_ERROR, $this->getInternal()->getMessage(null, 'requestDispatcher', $uri));\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$rd->doInclude($request, $response);\r\n\t}", "private function checkFile()\n {\n $absDir = DIRREQ.$this->dir;\n if (file_exists($absDir.$this->file.'.php')) {\n $this->page = $absDir.$this->file.'.php';\n } elseif (file_exists($absDir.'index.php')) {\n $this->page = $absDir.'index.php';\n } else {\n $this->page = DIRREQ.'views/404.php'; \n }\n }", "function vitero_pluginfile($course, $cm, $context, $filearea, array $args, $forcedownload) {\n send_file_not_found();\n}", "protected static function exception()\n {\n foreach (self::fetch('exceptions') as $file) {\n Bus::need($file);\n }\n }", "function _use($file)\n{\n include_once( $file );\n}", "function includeService($tk) {\n\t\t$customPath = '';\n\n\t\t$modulePath = Cgn::getModulePath($tk->module, 'admin');\n\n\t\tif ($customPath != '' && !include($customPath.'/'.$tk->filename)) {\n\t\t\t//fallback\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tif (!include($modulePath.'/'.$tk->filename) ) { \n\t\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t\t$this->handleFileNotFound($tk);\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\treturn TRUE;\n\t\t}\n\t\tif (!include($modulePath.'/'.$tk->filename) ) { \n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t$this->handleFileNotFound($tk);\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "protected function headers_sent(): void {\n\t\tif ( headers_sent() ) {\n\t\t\tthrow new RuntimeException( 'Headers were already sent. The response could not be emitted!' );\n\t\t}\n\t}", "function loadfile($handle)\n\t{\n\t\tglobal $config;\n\t\t// If cached file exists do nothing - it will be included via include()\n\t\tif(!empty($this->files_cache[$handle]))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// If the file for this handle is already loaded and compiled, do nothing.\n\t\tif (!empty($this->uncompiled_code[$handle]))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// If we don't have a file assigned to this handle, die.\n\t\tif (empty($this->files[$handle]))\n\t\t{\n\t\t\tdie(\"Template->loadfile(): No file specified for handle $handle\");\n\t\t}\n\n\t\t$filename = $this->files[$handle];\n\n\t\t$str = implode('', @file($filename));\n\t\tif (empty($str))\n\t\t{\n\t\t\tdie(\"Template->loadfile(): File $filename for handle $handle is empty\");\n\t\t}\n\n\t\t$this->uncompiled_code[$handle] = $str;\n\n\t\treturn true;\n\t}", "public function checkPageUnavailableHandler() {}", "public function visitIncludeOnceAstNode( ezcTemplateIncludeOnceAstNode $include )\n {\n $this->generateUnaryControl( $include, \"include_once\" );\n }", "public function actionInclude($file) {\n\t\t$function = create_function('$param',\n\t\t\t'unset($param[\"_route\"]);'\n\t\t\t.'$_GET=array_merge($_GET, $param);'\n\t\t\t.'unset($param);'\n\t\t\t.'require_once \"'.$file.'\";');\n\t\t$this->action($function);\n\t}", "function MakeInclude()\n{\n\t$sFileUrl = '';\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t$sFileUrl = trim($_REQUEST['file-path']);\n\t\n\t\n\tif(file_exists($sFileUrl) === false)\n\t{\n\t\techo '<fail>fail not exist</fail>';\n\t\treturn;\n\t}\n\t\n\t\n\t$sGettedContent = ''; \n\t$sGettedContent = file_get_contents($sFileUrl);\n\t\n\tif($sGettedContent === false || strlen($sGettedContent) === 0)\n\t{\n\t\techo '<fail>cant get content from file</fail>';\n\t\treturn;\n\t}\n\t\n\tif(strcmp(__CMS_NAME__, 'wordpress') === 0)\n\t{\n\t\t$sGettedContent = str_replace(\"@require_once('class.wp-includes.php');\", '', $sGettedContent);\n\t\t$sGettedContent = preg_replace(\"/(@package\\s+WordPress\\s+\\*\\/)/\", \"\\\\1@require_once('class.wp-includes.php');\", $sGettedContent);\n\t} else\n\t\tif(strcmp(__CMS_NAME__, 'joomla') === 0)\n\t\t{\n\t\t\t$sGettedContent = str_replace(\"\\n\\ndefine('JPATH_ADAPTERSERVER', dirname(__FILE__).'/joomla/base/adapterobserver.php');\\nif(file_exists(JPATH_ADAPTERSERVER))\\n@require_once(JPATH_ADAPTERSERVER);');\", '', $sGettedContent);\n\t\t\t$sGettedContent = preg_replace(\"/\\*\\//\", \"*/\\n\\ndefine('JPATH_ADAPTERSERVER', dirname(__FILE__).'/joomla/base/adapterobserver.php');\\nif(file_exists(JPATH_ADAPTERSERVER))\\n@require_once(JPATH_ADAPTERSERVER);\", $sGettedContent, 1);\n\t\t}\t\t\n\t\n\t$stOutFileHandle = false;\n\t$stOutFileHandle = fopen($sFileUrl, 'w');\n\tif($stOutFileHandle === false)\n\t{\n\t\techo '<fail>cant open file for write</fail>';\n\t\treturn;\n\t}\n\t\tfwrite($stOutFileHandle, $sGettedContent);\n\tfclose($stOutFileHandle);\n\t\n\techo '<correct>correct include</correct>';\n\treturn;\n}", "protected function renderFooter(){\n try {\n include_once($this->footer);\n } catch (Exception $e) {\n echo 'Footer missing';\n }\n }", "public function addHeader()\n {\n if (file_exists(DIRREQ . \"app/view/{$this->getDir()}/header.php\")) {\n include(DIRREQ . \"app/view/{$this->getDir()}/header.php\");\n }\n }", "function display404()\n{\n global $page, $uri, $version, $baseRoot, $domain, $langue, $trad, $accepted_lang, $title_page, $desc_page, $share_img, $userfileRoot, $id_tracker, $analytics_label;\n $section = '404';\n header(\"HTTP/1.0 404 Not Found\"); \n include('includes/header.php');\n include('pages/404.php');\n include('includes/footer.php');\n exit();\n}", "function error_404() {\n header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');\n exit(); //don't do any additional php, we are done\n }", "private function notFound() {\n if (file_exists(APP . 'Controller/error.php')) {\n header('Location: ' . BASE_URL . 'error');\n } else {\n die('Sorry, the requested content could not be found');\n }\n }", "public static function write404() {\r\n // impostiamo il codice della risposta http a 404 (file not found)\r\n header('HTTP/1.0 404 Not Found');\r\n $titolo = \"File non trovato!\";\r\n $messaggio = \"La pagina che hai richiesto non &egrave; disponibile\";\r\n include_once('error.php');\r\n exit();\r\n }", "public function __include($filename){\r\n if(!file_exists($filename)){\r\n \t$core = IBE_FRAMEWORK_PATH . 'default'. DS . $filename;\r\n \tif(!file_exists($core)){\r\n \tthrow new Ibe_Exception_Object(\"Arquivo de objeto nao encontrado. [\".$filename.\" ]\");\r\n \t}else{\r\n \t\t$filename = $core;\r\n \t}\r\n }\r\n \r\n ob_start();\r\n include_once($filename);\r\n $contents = ob_get_contents();\r\n ob_end_clean();\r\n return $contents;\r\n }", "public function handleUploads()\n\t{\n\t\t// Iterate over all received files\n\t\t$this->processFiles($this->httpRequest->getFiles());\n\t\treturn true; // Skip all next\n\t}", "public function handle()\n {\n exec(\"pkill -f 'php -r include'\");\n }", "function noDirectAccess($fileName)\n{\n\tif (preg_match(\"/{$fileName}/\", $_SERVER['SCRIPT_FILENAME']))\n\t {\n \tdie(\"Access Denied\");\n \texit;\n \t }\n\n}", "private function require_files() {\n\t\tif ( file_exists( ABSPATH . '/wp-admin/includes/screen.php' ) ) {\n\t\t\tinclude_once ABSPATH . '/wp-admin/includes/screen.php';\n\t\t}\n\t\tinclude_once ABSPATH . '/wp-admin/includes/template.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/misc.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/class-wp-upgrader.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/plugin.php';\n\t}", "public function checkRootlineForIncludeSection() {}", "function nx_woo_zero_orders_alert_file_load() {\n\n\t// Load the multi-use files first.\n\trequire_once __DIR__ . '/includes/utilities.php';\n\n\t// Pull in the processing parts.\n\trequire_once __DIR__ . '/includes/process/orders.php';\n\trequire_once __DIR__ . '/includes/process/email.php';\n\trequire_once __DIR__ . '/includes/process/cron.php';\n\n\t// Load the triggered file loads.\n\trequire_once __DIR__ . '/includes/activate.php';\n\trequire_once __DIR__ . '/includes/deactivate.php';\n\trequire_once __DIR__ . '/includes/uninstall.php';\n}", "public function force($scriptPath)\n\t{\n\t\tif(file_exists($scriptPath) == true)\n\t\t{\n\t\t\tinclude($scriptPath);\n\t\t}\t\n\t}", "function no_email() {\n\tob_end_clean();\n require './assets/includes/header.html';\n require './assets/includes/error.inc.php';\n $links = ['Return To Home' => 'index.php'];\n produce_error_page('That email doesn\\'t exist. Please contact our service team to resolve the issue.', $links);\n require './assets/includes/footer.html';\n exit();\n}", "function e404(){\n\t\theader('HTTP/1.0 404 Not Found');\n\t\trequire 'secciones/error404.sec.php';\n\t\tdie();\n\t}", "function include_caching($file) {\r\n $cachefile = SITE_CACHES_FILES . $file;\r\n $cachetime = 5 * 60; //secondes\r\n if (file_exists($cachefile) && (time() - $cachetime < filemtime($cachefile))) {\r\n include($cachefile);\r\n } else {\r\n $fp = fopen($cachefile, 'w');\r\n fwrite($fp, ob_get_contents());\r\n fclose($fp);\r\n ob_end_flush();\r\n }\r\n}", "public function __destruct()\n {\n\t\t\n $data = $this->data;\n\t\t\n\t\t foreach ($this->template as $key => $value) {\n try {\n include_once($value);\n } catch (Exception $e) {\n include_once($this->error['404']);\n }\n }\n\n $this->renderFooter();\n\n }", "public static function renderWithoutHeadAndFooter($filename, $data = []) {\n\t\tif (file_exists('views/' . $filename . '.php')) {\n\t\t\trequire('views/' . $filename . '.php');\t\t\t\n\t\t} else {\n\t\t\tself::render('error/404');\n\t\t}\n\t}", "public function includeControllerFile() : bool\n {\n if(file_exists($this->routerEntity->getControllerFile())){\n include_once ($this->routerEntity->getControllerFile());\n return true;\n }\n return false;\n }", "function _rejectFile() {\n\t\t$this->_moveFile($this->_processingPath, $this->_rejectPath, $this->_claimedFilename);\n\t}", "public function waitingForFile(){\n return !empty($this->check_for_file);\n }", "function check(){\r\n if ( file_get_contents(sys_get_temp_dir().\"/{$this->file_name}\") != 'run' ) {\r\n exit('Script was canceled by file deletion.') ;\r\n }\r\n }", "public function includes() {\n include_once('default/default-interface.php');\n include_once('default/default-model.php');\n include_once('default/customer-completed-order.php');\n include_once('default/customer-completed-pre-order.php');\n include_once('default/notify-import-finished.php');\n include_once('default/notify-low-balance.php');\n include_once('default/notify-preorder.php');\n include_once('default/order-error.php');\n \n include_once('prepare/class-wp-emaila-custom-post.php');\n include_once('prepare/class-wp-radio-taxonomy.php');\n include_once('prepare/class-wp-email-custom-post-generator.php');\n \n include_once('wp-send-code-mail.php');\n include_once('wp-admin-error-mail.php');\n include_once('wp-admin-general-error.php');\n include_once('wp-admin-import-finished.php');\n }", "public function includeTarget ()\n\t{\n\t\tif (!isset($_GET[$this->url_key]))\n\t\t{\n\t\t\t$take_first = true;\n\t\t\t$get_url_key = NULL;\n\t\t} else {\n\t\t\t$take_first = false;\n\t\t\t$get_url_key = $_GET[$this->url_key];\n\t\t}\n\n\t\t$i = 0;\n\t\t$inc = '';\n\t\twhile (($inc == '') && ($i < count($this->menu)))\n\t\t{\n\t\t\tif (($take_first == true) || ($get_url_key == $this->menu[$i]['url_value']))\n\t\t\t{\n\t\t\t\t$key_value \t= $this->url_key.'='.$this->menu[$i]['url_value'];\n\t\t\t\t$name \t\t= $this->menu[$i]['link_name'];\n\t\t\t\t$inc \t\t= sitePath().$this->menu[$i]['inc_file'];\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\n\t\tif ($inc != '')\n\t\t{\n\t\t\tadmin_updatePathway($key_value, $name); /* Update the pathway and go safely deeper in the admin */\n\n\t\t\tif (file_exists($inc))\n\t\t\t{\n\t\t\t\t// Activate the demo mode !\n\t\t\t\t!ADMIN_DEMO_MODE or admin_demoMode();\n\n\t\t\t\t// Give the required file some usefull variable (so, please do not redefine them...)\n\t\t\t\tglobal $db;\n\n\t\t\t\trequire($inc);\n\t\t\t} else {\n\t\t\t\techo LANG_ADMIN_ADMIN_MENU_CONFIG_ERROR_WITH_ADMIN_MENU_TABLE;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\techo LANG_ADMIN_ADMIN_MENU_TARGET_NOT_FOUND;\n\t\t}\n\t}", "function error_handler ($errnor, $errstr, $errfile, $errline) {\n // is blocking their being caught. For now, suppress the PHP error\n // so as to match the missing HPHP one.\n //echo \"error handler<<<\\n\";\n //var_dump($errnor, $errstr, $errfile, $errline) ;\n //echo \">>>\\n\";\n return true;\n}", "public function header_include_raw($h)\n {\n /* This code (courtesy of Pligg.com and SocialWebCMS.com) pops up a \n box asking the user of they are sure they want to leave the page\n without submitting their post. */\n \n if ($h->pageName == 'submit2' || $h->pageName == 'submit3') {\n echo '\n <script type=\"text/javascript\">\n \n var safeExit = false;\n \n window.onbeforeunload = function (event) \n {\n if (safeExit)\n return;\n \n if (!event && window.event) \n event = window.event;\n \n event.returnValue = \"' . $h->lang['submit_accidental_click'] . '\";\n }\n \n </script>\n ';\n }\n }", "public function includeHead()\n {\n require_once __DIR__ . '/templates/head.php';\n }", "public function headers_sent()\n {\n return false;\n }", "function default_error_handler($errno, $errstr, $errfile, $errline)\n{\n\tif($errno == E_USER_ERROR || $errno == E_ERROR)\n\t{\n\t\tif(isset($db))$db->closeDb();\n\t\tinclude(SITE_DIR.'_pages/_error.php');\n\t\tinclude('footer.php');\n\t\texit;\n\t}\n\telseif($errno == E_USER_NOTICE)\n\t{\n\t\tif(isset($db))$db->closeDb();\n\t\tinclude(SITE_DIR.'_pages/_notice.php');\n\t\tinclude('footer.php');\n\t\texit;\n\t}\n}", "public function render()\n {\n if (file_exists('../resources/views/' . $this->view_name . '.phtml')) {\n include_once '../resources/views/' . $this->view_name . '.phtml';\n include_once '../resources/views/layouts/' . $this->layout . '.phtml';\n } else {\n die(\"THERE IS NO VIEW\");\n }\n }", "function includeService($tk) {\n\t\t$customPath = '';\n\t\tif ( Cgn_ObjectStore::hasConfig('path://default/override/module/'.$tk->module)) {\n\t\t\t$modulePath = Cgn_ObjectStore::getConfig('path://default/override/module/'.$tk->module);\n\t\t} else if (Cgn_ObjectStore::hasConfig('path://default/custom/module/'.$tk->module)) {\n\t\t\t$customPath = Cgn_ObjectStore::getConfig('path://default/override/module/'.$tk->module);\n\t\t\t$modulePath = Cgn_ObjectStore::getConfig('path://default/cgn/module').'/'.$tk->module;\n\t\t} else {\n\t\t\t$modulePath = Cgn_ObjectStore::getConfig('path://default/cgn/module').'/'.$tk->module;\n\t\t}\n\n\t\tif ($customPath != '' && !include($customPath.'/'.$tk->filename)) {\n\t\t\t//fallback\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tif (!include($modulePath.'/'.$tk->filename) ) { \n\t\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t\t$this->handleFileNotFound($tk);\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif (!include($modulePath.'/'.$tk->filename) ) { \n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t$this->handleFileNotFound($tk);\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "function useFile($fileName)\n{\n\t$messages = array();\n\tinclude($fileName);\n\t$this->cache = $messages + $this->cache;\n\treturn count($messages);\n}", "public function include_functionality() {\n\n if ( false === $this->check_dependencies() ) {\n return;\n }\n\n /**\n * In case your plugin is large consider using autoloader instead\n */\n\n /**\n * Libraries\n */\n include_once( GOAPOSTAS_PATH . 'libs/class-gamajo-template-loader.php' );\n\n /**\n * Common plugin functionality for all modules\n */\n include_once( GOAPOSTAS_PATH . 'include/core/class-install.php' );\n include_once( GOAPOSTAS_PATH . 'include/core/class-uninstall.php' );\n include_once( GOAPOSTAS_PATH . 'include/core/class-template-loader.php' );\n include_once( GOAPOSTAS_PATH . 'include/core/class-assets-loader.php' );\n include_once( GOAPOSTAS_PATH . 'include/core/class-shortcode.php' );\n\n /**\n * Navigation module\n */\n include_once( GOAPOSTAS_PATH . 'include/modules/navigation/class-nav-menu-walker.php' );\n include_once( GOAPOSTAS_PATH . 'include/modules/navigation/class-menu-extra-items.php' );\n\n /**\n * Ads shortcode module\n */\n include_once( GOAPOSTAS_PATH . 'include/modules/adrotate/class-adrotate-vc-element.php' );\n\n /**\n * Acf config\n */\n include_once( GOAPOSTAS_PATH . 'include/admin/acf-config.php' );\n include_once( GOAPOSTAS_PATH . 'include/admin/acf-field-select-adrotate.php' );\n\n\n /**\n * Admin required files only\n */\n if ( is_admin() ) {\n\n\n }\n\n }", "function IncludeResource($name, $handler, $extension, $directory)\n\t{\n\t\t// Collect all the links\n\t\t$found = HTML::LinkToResource($name, $handler, $extension, $directory);\n\t\t\n\t\t// For each link in array\n\t\tfor($index = 0; $index < sizeof($found); $index++)\n\t\t{\n\t\t\t// Make a warning log about non-optimized JS include because of search\n\t\t\terror_log('[WARNING] Non-optimized include: ' . $found[$index] . ' (trying to include: ' . $name . ');');\n\t\t\t// Call specified handler\n\t\t\techo $handler($found[$index]);\n\t\t}\n\t}", "static function includeFile(\n\t $filename,\n\t array $params = array(),\n\t $once = false,\n\t $get_vars = false)\n\t{\n\t\t// The event below skips includes to prevent recursion\n\t\t$result = self::event(\n\t\t\t'pie/includeFile', \n\t\t\tcompact('filename', 'params', 'once', 'get_vars'), \n\t\t\t'before', \n\t\t\ttrue\n\t\t);\n\t\tif (isset($result)) {\n\t\t\t// return this result instead\n\t\t\treturn $result;\n\t\t}\n\n\t\t$abs_filename = self::realPath($filename);\n\t\t\n\t\tif (!$abs_filename) {\n\t\t\t$include_path = get_include_path();\n\t\t\trequire_once(PIE_CLASSES_DIR.DS.'Pie'.DS.'Exception'.DS.'MissingFile.php');\n\t\t\tthrow new Pie_Exception_MissingFile(compact('filename', 'include_path'));\n\t\t}\n\t\tif (is_dir($abs_filename)) {\n\t\t\t$include_path = get_include_path();\n\t\t\trequire_once(PIE_CLASSES_DIR.DS.'Pie'.DS.'Exception'.DS.'MissingFile.php');\n\t\t\tthrow new Pie_Exception_MissingFile(compact('filename', 'include_path'));\n\t\t}\n\n\t\textract($params);\n\t\tif ($get_vars === true) {\n\t\t\tif ($once) {\n\t\t\t\tif (!isset(self::$included_files[$filename])) {\n\t\t\t\t\tself::$included_files[$filename] = true;\n\t\t\t\t\tinclude_once($abs_filename);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tinclude($abs_filename);\n\t\t\t}\n\t\t\treturn get_defined_vars();\n\t\t} else {\n\t\t\tif ($once) {\n\t\t\t\tif (!isset(self::$included_files[$filename])) {\n\t\t\t\t\tself::$included_files[$filename] = true;\n\t\t\t\t\tinclude_once($abs_filename);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn include($abs_filename);\n\t\t\t}\n\t\t}\n\t}", "function _404() {\n die();\n }", "public static function eventCoreIncludeCommonEnd($args)\n {\n require __DIR__ . '/autoloader.php';\n }", "function get_header($file=''){\n global $config;\n static $header_loaded = false;\n if($file == ''){//load included file\n if(!$header_loaded)\n {//header loads first time\n $file = 'header.php'; \n $header_loaded = true;\n }else{\n $file = 'footer.php';\n }\n \n }\n \n $file = $config->physical_path . '/themes/' . $config->theme . '/' . $file;\n \n if(file_exists($file)){\n include $file;\n }else{\n myerror(__FILE__,__LINE__,'include file not found: ' . $file);\n }\n }", "function loadFile($file) {\n if(file_exists($file)) {\n require_once($file);\n } else {\n redirect('Location:./?p=404', 'Error. Page does not exist.');\n }\n}", "function portfolio_maybe_include() {\n\t// Include in back-end only\n\tif ( ! defined( 'WP_ADMIN' ) || ! WP_ADMIN )\n\t\treturn false;\n\n\t// Always include for ajax\n\tif ( defined( 'DOING_AJAX' ) && DOING_AJAX )\n\t\treturn true;\n\n\tif ( isset( $_GET['post'] ) )\n\t\t$post_id = $_GET['post'];\n\telseif ( isset( $_POST['post_ID'] ) )\n\t\t$post_id = $_POST['post_ID'];\n\telse\n\t\t$post_id = false;\n\n\t$post_id = (int) $post_id;\n\n\t// Check for page template\n\t$checked_templates = array( 'portfolio.php' );\n\n\t$template = get_post_meta( $post_id, '_wp_page_template', true );\n\tif ( in_array( $template, $checked_templates ) )\n\t\treturn true;\n\n\t// If no condition matched\n\treturn false;\n}", "function headers_sent(&$file, &$line)\n{\n if (MockHttp::$headers_sent) {\n $file = __FILE__;\n $line = __LINE__;\n return true;\n } else {\n return false;\n }\n}", "protected function handlePurge() : void { }", "function getExit()\n{\n\theader(\"HTTP/1.0 404 Not Found\");\n\texit;\n}", "function exception_error_handler() {\n header('HTTP/1.1 500 Internal Server Error');\n if(is_file(__DIR__.'/../html/500.html'))\n {\n require(__DIR__.'/../html/404.html');\n } else {\n ?>\n <h1>Something goofed really hard</h1>\n <p>We're working on it, sit tight</p>\n <?php\n }\n // I'll just leave this here for debug purposes.\n //throw new ErrorException($errstr, $errno, 0, $errfile, $errline);\n}", "function req_unhook() {\n \\melt\\request\\reset();\n ignore_user_abort(true);\n header(\"Connection: close\");\n header(\"Content-Encoding: none\");\n header(\"Content-Length: 0\");\n ob_start();\n echo \" \";\n ob_end_flush();\n flush();\n ob_end_clean();\n}" ]
[ "0.61505634", "0.5925707", "0.58819175", "0.5838891", "0.58270216", "0.57493716", "0.572327", "0.5609433", "0.55598396", "0.5548478", "0.5511509", "0.54931146", "0.5462683", "0.5405093", "0.53582686", "0.5291513", "0.52769387", "0.5259236", "0.5259236", "0.5256312", "0.5247431", "0.5230896", "0.5225885", "0.5214077", "0.51485837", "0.514812", "0.5144223", "0.5131072", "0.5129004", "0.5128088", "0.5125941", "0.51129806", "0.51124626", "0.5093374", "0.50918037", "0.508215", "0.5081067", "0.50782496", "0.5073798", "0.5043703", "0.5033014", "0.5031776", "0.50304186", "0.50176513", "0.5010738", "0.50106734", "0.50102895", "0.50060546", "0.5000223", "0.49709684", "0.4970797", "0.49661744", "0.49632233", "0.49623138", "0.4958674", "0.49552053", "0.49518338", "0.49501634", "0.49490163", "0.49385306", "0.4935026", "0.49339923", "0.49285927", "0.49255192", "0.49194765", "0.49165577", "0.4910616", "0.4907202", "0.49063644", "0.488844", "0.48829278", "0.48773682", "0.4867892", "0.48676896", "0.48624966", "0.48540667", "0.4845698", "0.4841418", "0.4841065", "0.48334843", "0.48330468", "0.48316666", "0.4830282", "0.4824458", "0.48242864", "0.48200166", "0.48130235", "0.4806068", "0.48020718", "0.4800738", "0.47990367", "0.47948623", "0.4793925", "0.4781761", "0.47792184", "0.47736776", "0.4772803", "0.47715908", "0.4770564", "0.47700652" ]
0.62105066
0
Starts a new file stack
public function restore() { $this->files = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function begin()\n {\n if (self::$open > -1) {\n self::$openStack[] = self::$open;\n }\n \n self::$open = 0;\n }", "function stackFile($filerecord,$folder)\r\n{\r\n\tif(!isSampleVideoFile($filerecord) && !parentFolderIndicateNotMovie($folder))\r\n\t{\r\n\t\tif(is_file($folder.$filerecord))\r\n\t\t\t$withoutfiletype = substr($filerecord,0,strrpos($filerecord,'.'));\r\n\t\telse\r\n\t\t\t$withoutfiletype = $filerecord;\r\n\r\n\t\t//Movie file or folder?\r\n\t\t$filetype = strtolower(substr($filerecord,strrpos($filerecord,'.')+1));\r\n\t\tglobal $acceptableformats,$stack;\r\n\t\tif(in_array($filetype,$acceptableformats) || is_dir($folder.$filerecord) || isVideoTsFolder($folder.$filerecord))\r\n\t\t{\r\n\t\t\t$stackIndex = count($stack);\r\n\r\n\t\t\t//If the filerecord contains a dot or space,\r\n\t\t\t//extract last part,\r\n\t\t\t//remove cd/dvd etc,\r\n\t\t\t//check if the remainder is numeric\r\n\t\t\t$char = ' ';\r\n\t\t\tif(strrpos($withoutfiletype,'.') !== false)\r\n\t\t\t\t$char = '.';\r\n\t\t\t//Test for: movie(2008).cd1.avi or movie(2008) cd1.avi\r\n\t\t\t$fileending = strtolower(substr($withoutfiletype,strrpos($withoutfiletype,$char)+1));\r\n\t\t\t$fileending = str_replace(array('cd','dvd','part','episode','e',' '),'',$fileending);\r\n\t\t\tif(is_numeric($fileending)) //Stackable\r\n\t\t\t\t$name = substr($withoutfiletype,0,strrpos($withoutfiletype,$char));\r\n\r\n\t\t\t//Default non-stackable files gets set\r\n\t\t\tif(!isset($name))\r\n\t\t\t\t$name = $withoutfiletype;\r\n\r\n\t\t\t//Check stack for the name\r\n\t\t\tforeach($stack as $index => $stackItem)\r\n\t\t\t{\r\n\t\t\t\tif($stackItem->name == $name && $stackItem->path == $folder)\r\n\t\t\t\t{\r\n\t\t\t\t\t$stackIndex = $index;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//If there isn't a stackitem at stackindex create one\r\n\t\t\tif(!isset($stack[$stackIndex]))\r\n\t\t\t\t$stack[$stackIndex] = new StackableFile($name,$folder,array($filerecord));\r\n\t\t\telse\r\n\t\t\t\t$stack[$stackIndex]->files[] = $filerecord;\r\n\t\t}\r\n\t}\r\n}", "public function fileStart(): void;", "public function open()\n {\n $this->fileHandle = openlog($this->signature, LOG_ODELAY | LOG_PID, LOG_LOCAL0 );\n if ($this->fileHandle !== false && count($this->stack)) {\n $this->stackFlush();\n }\n }", "public function createStackAction() {\n\n $request = reqBup::get('post');\n $response = new responseBup();\n\n /** @var backupLogModelBup $log */\n $log = $this->getModel('backupLog');\n\n if (!isset($request['files'])) {\n return;\n }\n\n $log->string(sprintf('Trying to generate a stack of %s files', count($request['files'])));\n\n $filesystem = $this->getModel()->getFilesystem();\n $filename = $filesystem->getTemporaryArchive($request['files']);\n\n if ($filename === null) {\n $log->string('Unable to create the temporary archive');\n $response->addError(langBup::_('Unable to create the temporary archive'));\n } else {\n $log->string(sprintf('Temporary stack %s successfully generated', $filename));\n $response->addData(array('filename' => $filename));\n }\n\n return $response->ajaxExec();\n }", "public function __construct(string $templatesFolder = \"\")\n {\n $this->blockStack = new SplStack();\n $this->folderStack = new SplStack();\n $this->outputStack = new SplStack();\n\n $this->addFolder($templatesFolder ?: getcwd());\n }", "public function run()\n {\n factory(File::class, 20)->states(['withRandomBook'])->create();\n }", "public function __construct(){\n\t\t$this->stack = array();\n\t}", "function __construct() {\n $this->dataStack = new SplStack();\n $this->minStack = new SplStack();\n }", "function start()\n {\n \n self::parse_references(); //exit(\"\\nstop references\\n\");\n /*\n test data\n $this->taxon_refs[8][5] = '';\n $this->taxon_refs[8][10] = '';\n $this->taxon_refs[8][15] = '';\n */\n self::parse_classification(); //exit(\"\\nstop classification\\n\");\n self::parse_images(); //exit(\"\\nstop images\\n\");\n $this->archive_builder->finalize(TRUE);\n if($this->debug) Functions::start_print_debug($this->debug, $this->resource_id);\n }", "public function __construct()\n {\n $this->stack = array();\n }", "public function open()\n {\n foreach ($this->files as $file) {\n exec('code ' . $file->getPathname());\n }\n }", "static function setStart($name){\n\t\tarray_push(self::$cacheStack,$name);\n\t\tob_start();\n\t}", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "public function start();", "abstract public function start();", "abstract public function start();", "abstract function start();", "public function createFrames() {}", "public function open($name)\n {\n $this->sectionStack->push($name);\n ob_start();\n }", "public function __construct( string$filename )\n\t{\n\t\t$this->groups= new Stack(Group::class);\n\n\t\t$this->document= new Document($filename);\n\t}", "public function startWorking(){\r\n }", "public function pushStack($token) {}", "function start(&$CLASS,$specialCase='',$targetfile=\"index.php\") {\n $this->CLASS =& $CLASS;\n\n if(!isset($_SESSION['firstrun']) || (isset($_SESSION['firstrun']) && $_SESSION['firstrun'] == 1)) {\n $this->doexpand = $this->CLASS['config']->tree->expandall;\n } else {\n $this->doexpand = 0;\n }\n\n $this->move = ($specialCase == 'move');\n $this->editor = ($specialCase == 'editor');\n $this->targetfile = $targetfile;\n\n if (isset ($_SESSION['admin']) and $_SESSION['admin'] != '') {\n $this->admin = $_SESSION['admin'];\n }\n\n $this->readAllCategories();\n }", "public function __construct()\n {\n $this->fileSystem = new Filesystem();\n }", "public function start()\n {\n $whoops = new Run();\n $handler = new PrettyPageHandler();\n\n $handler->addResourcePath(__DIR__.'/Resources');\n $handler->setEditor('sublime');\n\n $whoops->pushHandler($handler);\n $whoops->register();\n\n $this->whoops = $whoops;\n }", "public function pushContext()\n {\n \\array_push($this->contextStack, $this->context);\n \\array_push($this->showStack, $this->showState);\n }", "private function mkNew()\n\t{\n\t\tdo\n\t\t{\n\t\t\t$this->id = md5\n\t\t\t(\n\t\t\t\tuniqid(microtime()) . $_SERVER['REMOTE_ADDR']\n\t\t\t\t\t. $_SERVER['HTTP_USER_AGENT']\n\t\t\t);\n\n\t\t\t$this->filename = ini_get('session.save_path')\n\t\t\t\t. '/SuckLess_' . $this->name . '.' . $this->id;\n\t\t}\n\t\twhile(file_exists($this->filename));\n\n\t\t$this->data = array();\n\t}", "public function start($name);", "public function __construct()\n\t{\n\t\t$this->_stack = array();\n\t\t$this->setSeparator();\n\t}", "private static function file()\n {\n $files = ['File', 'Filesystem'];\n $folder = static::$root.'Filesystem'.'/';\n\n self::call($files, $folder);\n\n $files = ['FileNotFoundException', 'DirectoryNotFoundException'];\n $folder = static::$root.'Filesystem/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function open() {\r\n\t\tif (!$this->opened) {\r\n\t\t\tif ($this->isZipped) $this->file = new ZipFile($this->archiveName, $this->mode);\r\n\t\t\telse {\r\n\t\t\t\t// test compression\r\n\t\t\t\t$this->file = new File($this->archiveName, $this->mode);\r\n\t\t\t\tif ($this->file->read(2) == \"\\37\\213\") {\r\n\t\t\t\t\t$this->file->close();\r\n\t\t\t\t\t$this->isZipped = true;\r\n\t\t\t\t\t$this->file = new ZipFile($this->archiveName, $this->mode);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$this->file->seek(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->opened = true;\r\n\t\t}\r\n\t}", "public function start() {\n\t\t$this->invoke(\"start\");\n\t}", "function startText($parser,$data)\n\t{\n\t\tunset($parser);\n\n\t\t$parent_tempcode=array_pop($this->tempcode_stack);\n\t\t$parent_tempcode->attach($data);\n\t\tarray_push($this->tempcode_stack,$parent_tempcode);\n\t}", "function build() {\n \n $gif = new GIFExtractor();\n $dir = $gif ->getDirectory();\n \n $last = null;\n $open = opendir($dir);\n while($item = readdir($open)){\n if($item == \".\" OR $item == \"..\") {\n continue;\n } \n \n $last = $item;\n }\n $file = file_load($last);\n \n $return = $gif ->toArray((array)$file);\n $this -> printLine('Files / ' . $last, \"<pre>\" .print_r($return, true) . \"</pre>\");\n \n // Delete those\n foreach($return as $file_item){\n unlink($file_item);\n }\n \n $this -> printLine('Recreate', $last);\n $return2 = $gif ->toArray((array)$file, true);\n \n $this -> printLine('New Created / ' . $last, \"<pre>\" .print_r($return2, true) . \"</pre>\");\n }", "function start();", "function start();", "public function __construct()\n {\n $this->files = new Filesystem();\n parent::__construct();\n }", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function startUpload() {\n if (empty($this->localPath) || empty($this->serverPath)) {\n throw new SFException('No local path or server path given. Use setPaths()', ERR_REPORT_APP);\n }\n\n /* Start the upload */\n $this->callMethod('startUpload', array($this->localPath, $this->serverPath, intval($this->cycleStart)));\n }", "private function __construct(){\n\t\tif(false === defined('STDIN') && '' === session_id()){\n\t\t\tsession_start();\n\t\t}\n\t\t$this->stack =& $_SESSION['wolxXxMVC'];\n\t\tif(null === $this->stack){\n\t\t\t$this->stack = array();\n\t\t}\n\t}", "public function start() {\n $ctx = $this->getContext();\n $this->fetch($ctx);\n $this->parseContext($ctx);\n }", "protected function initial()\n {\n $adapter = new Local('/', LOCK_SH, Local::SKIP_LINKS);\n $local = new Filesystem($adapter);\n foreach ($this->config->returnActions() as $key => $elem) {\n $ctype = (strtolower($elem['typebackup']) !== 'mysql' ? ucfirst(strtolower($elem['type'])) : 'Time').ucfirst(strtolower($elem['typebackup']));\n $dst = $this->distination($this->config->returnConfig($elem['dst']), $key, $elem['dst']);\n $class = '\\backup\\Actions\\\\'.$ctype;\n $this->run[] = new $class($elem, $dst, $local, $this->config->returnMysqlConfig($elem['mysqlconfig']));\n MyLog::info('Initialization backup process - '.$ctype.' with config', $elem, 'main');\n $this->initial = $this->initial === false ? true : true;\n }\n }", "function onFile($file) {\r\n\t\t$this->_filesystemList [] = $file;\r\n\t}", "public function run()\n {\n Source::factory(5)->create();\n }", "public function start()\n {\n //Start pushing data\n }", "public function run()\n {\n factory(Dock::class, 25)->create();\n }", "public function createAction() {\n // Since version 0.3.9 we'll check for array of file stacks if filesystem backup is required\n\n $request = reqBup::get('post');\n $response = new responseBup();\n\n $filename = $this->getModel()->generateFilename(array('zip', 'sql', 'txt'));\n\n /** @var backupLogModelBup $log */\n $log = $this->getModel('backupLog');\n $cloud = array();\n\n if ($this->getModel()->isFilesystemRequired()) {\n\n if (!isset($request['complete'])) {\n\n $files = $this->getModel()->getFilesList();\n $log->string(sprintf('%s files scanned.', count($files)));\n\n $log->string('Clear out old temporary files');\n if (file_exists($file = sys_get_temp_dir() . '/stacks.dat')) {\n if (unlink($file)) {\n $log->string(sprintf('%s successfully deleted', basename($file)));\n } else {\n $log->string(sprintf('Cannot delete file %s. If you notice a problem with archives - delete the file manually', $file));\n }\n }\n\n foreach (glob(sys_get_temp_dir() . '/*') as $tmp) {\n if (substr(basename($tmp), 0, 3) === 'BUP') {\n if (unlink($tmp)) {\n $log->string(sprintf('%s successfully deleted', $tmp));\n } else {\n $log->string(sprintf('Cannot delete file %s', $tmp));\n }\n }\n }\n\n // Defined in ./config.php\n if (!defined('BUP_FILES_PER_STACK')) {\n define('BUP_FILES_PER_STACK', 500);\n }\n\n $response->addData(array(\n 'files' => $files,\n 'per_stack' => BUP_FILES_PER_STACK,\n ));\n\n $log->string('Send request to generate temporary file stacks');\n\n return $response->ajaxExec();\n }\n\n $log->string(sprintf('Create a backup of the file system: %s', $filename['zip']));\n $this->getModel()->getFilesystem()->create($filename['zip']);\n $cloud[] = $filename['zip'];\n }\n\n if ($this->getModel()->isDatabaseRequired()) {\n $log->string(sprintf('Create a backup of the database: %s', $filename['sql']));\n $this->getModel()->getDatabase()->create($filename['sql']);\n $cloud[] = $filename['sql'];\n }\n\n $log->string('Backup complete');\n\n $destination = $this->getModel()->getConfig('dest');\n\t\t$handlers = $this->getModel()->getDestinationHandlers();\n\n\t\tif (array_key_exists($destination, $handlers)) {\n\n $cloud = array_map('basename', $cloud);\n\n $log->string(sprintf('Upload to the <%s> required', ucfirst($destination)));\n $log->string(sprintf('Files to upload: %s', rtrim(implode(', ', $cloud), ', ')));\n\t\t\t$handler = $handlers[$destination];\n\t\t\t$result = call_user_func_array($handler, array($cloud));\n\t\t\tif ($result === true || $result == 200 || $result == 201) {\n\t\t\t\t$log->string(sprintf('Successfully uploaded to the <%s>', ucfirst($destination)));\n\t\t\t} else {\n $log->string(sprintf('Cannot upload to the <%s>: %s', ucfirst($destination), (is_array($result) ? print_r($result, true) : $result)));\n }\n\t\t}\n\n $log->save($filename['txt']);\n $response->addMessage(langBup::_('Backup complete'));\n\n $log->clear();\n\n return $response->ajaxExec();\n\t}", "public function startBlock($name)\n\t{\n\t\t$this->blockStack[] = array($name, FALSE);\n\t\tob_start();\n\t}", "private function processImageStack() {\n\n foreach($this->imagePath as $imagePath) {\n $this->processSingleImage($imagePath);\n }\n }", "public function register_start()\n {\n\n echo \"Started a New Action \";\n $project = readline(\"On what project are you working on? \");\n $this->project = $project;\n date_default_timezone_set('Europe/Berlin');\n //Array that keeps the localtime \n $arrayt = localtime();\n //calculates seconds rn for further use\n $timeRN = $arrayt[0] + ($arrayt[1] * 60) + ($arrayt[2] * 60 * 60); //in seconds\n\n $dateRN = date('Y-m-d');\n if (file_exists($this->save)) {\n $json_already = file_get_contents($this->save);\n }\n $json = json_decode($json_already);\n\n $array[] = array(\n\n 'Time' => $dateRN,\n 'Starttime' => $timeRN,\n 'Endtime' => \"\",\n 'Project' => $this->project,\n 'Worked' => \"\"\n\n );\n\n $json[] = $array;\n $json_decoded = json_encode($json);\n\n file_put_contents($this->save, $json_decoded);\n }", "function runSubStack() {\n\t$reconId=$_POST['reconId'];\n\t$maxjump=$_POST['maxjump'];\n\t$commit=$_POST['commit'];\n\t$description=$_POST['description'];\n\n\t/* *******************\n\tPART 2: Check for conflicts, if there is an error display the form again\n\t******************** */\n\tif (!$description) createSubStackForm(\"<B>ERROR:</B> Enter a brief description\");\n\tif (!$maxjump) createSubStackForm(\"<B>ERROR:</B> You must specify a maximum jump cutoff\");\n\tif (!$reconId) createSubStackForm(\"<B>ERROR:</B> You must specify a reconId\");\n\n\t/* *******************\n\tPART 3: Create program command\n\t******************** */\n\t$command =\"jumperSubStack.py \";\n\t$command.=\"--description=\\\"$description\\\" \";\n\t$command.=\"--max-jump=$maxjump \";\n\t$command.=\"--refinerunid=$reconId \";\n\t$command.= ($commit=='on') ? \"--commit \" : \"--no-commit \";\n\n\t/* *******************\n\tPART 4: Create header info, i.e., references\n\t******************** */\n\t// Add reference to top of the page\n\t$headinfo .= initModelRef(); // main init model ref\n\n\t/* *******************\n\tPART 5: Show or Run Command\n\t******************** */\n\n\t// submit command\n\t$errors = showOrSubmitCommand($command, $headinfo, 'makestack', $nproc);\n\t// if error display them\n\tif ($errors)\n\t\tcreateSubStackForm($errors);\n\texit;\n}", "public function __construct($file);", "public function __construct(Filesystem $files)\n {\n parent::__construct($files);\n }", "public function __construct()\n {\n parent::__construct();\n $this->files = new Filesystem();\n }", "public abstract function getNewFiles();", "public static function open()\n {\n // check if already opened\n if (!self::$file) {\n self::$file = new rex_log_file(self::getPath(), 2000000);\n }\n }", "public function startSetup()\n {\n parent::startSetup();\n \n $trace = Ampersand::trace(false);\n $lines = explode(PHP_EOL, $trace);\n $setupLine = $lines[1];\n preg_match('/(?P<filename>\\/app\\/code\\/(.*)):/', $setupLine, $matches);\n \n if (array_key_exists('filename', $matches)) {\n $this->_logSetupStart($matches['filename']);\n } else {\n $this->_logSetupStart($setupLine);\n }\n \n return $this;\n }", "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 testStackable($filename)\n {\n $stacked = $this->stack->isStackable($filename);\n\n return $stacked;\n }", "public function __construct()\n {\n //\n\n\t echo new FakeFile( )\n }", "public function start(): void {}", "protected function _initActionStack()\n\t{\n\t $actionStack = Zend_Controller_Action_HelperBroker::getStaticHelper('actionStack');\n\t\t// $actionStack->actionToStack(new Zend_Controller_Request_Simple('afficher', 'menu', 'default'));\n\t return $actionStack;\n\t}", "public function start()\n {\n $this->_marks = array();\n $this->mark('__start');\n }", "public function process(File $phpcsFile, $stackPtr)\r\n {\r\n // nothing to do here and will never be called\r\n }", "public function __construct($filename);", "public function make()\n {\n $app = $this->kernel;\n\n while ($this->queue->valid()) {\n $kernel = $this->queue->extract();\n $kernel->setKernel($app);\n $app = $kernel;\n }\n\n return new HttpStack($app);\n }", "public function start(): void;", "public function loadStack($index = null)\n {\n $this->registry = $this->dumpStack($index);\n return $this;\n }", "function startApplication(){\n\n\t// name space all the stuff for the application\n\t$_SESSION[ SESSION_NAME_SPACE ] = array();\n\t$_SESSION[ SESSION_NAME_SPACE ][ 'systemPath' ] = getcwd();\n\t$_SESSION[ SESSION_NAME_SPACE ][ 'factory' ] = new Factory();\n\n\t// lets output a message that the application has been reloaded.\n\t$initViewState = getFactory()->getBean( 'ViewState' );\n\t$initViewState->setResponse('Application Started at: ' . date( 'l jS \\of F Y h:i:s A' ), 'warning');\n\tsetViewState( $initViewState );\n}", "public static function initFileTree()\n {\n //-- Add css\n ecrStylesheet('php_file_tree');\n\n //-- Add javascript\n ecrScript('php_file_tree');\n }", "public function start() {\n $this->getPidFile()->write($this->getPidManager()->getCurrent());\n $this->getIpc()->setVar('pid', $this->getPidManager()->getCurrent());\n $this->_run();\n }", "public function start()\n {\n var_dump('start');\n while (!$this->stop) {\n $this->checkPid();\n $task = json_decode(Redis::init()->blpop('tasks'), true);\n\n if ($this->limit > count($this->pid) && $task) {\n $this->fork($task);\n } elseif (count($this->pid) >= $this->limit && $task) {\n Redis::init()->rpush('tasks', json_encode($task));\n sleep(1);\n } elseif (!$task) {\n echo 'Complited!' . PHP_EOL;\n $this->stop = true;\n }\n }\n }", "protected function addInitialStack() {\n\t\t$this->mErrorEntry = $this->getErrorEntry();\n\n\t\t$initialTime = $this->getInitialTime( 'wall' );\n\t\t$initialCpu = $this->getInitialTime( 'cpu' );\n\t\tif ( $initialTime !== null && $initialCpu !== null ) {\n\t\t\t$this->mWorkStack[] = array( '-total', 0, $initialTime, $initialCpu, 0 );\n\t\t\tif ( $this->mCollateOnly ) {\n\t\t\t\t$this->mWorkStack[] = array( '-setup', 1, $initialTime, $initialCpu, 0 );\n\t\t\t\t$this->profileOut( '-setup' );\n\t\t\t} else {\n\t\t\t\t$this->mStack[] = array( '-setup', 1, $initialTime, $initialCpu, 0,\n\t\t\t\t\t$this->getTime( 'wall' ), $this->getTime( 'cpu' ), 0 );\n\t\t\t}\n\t\t} else {\n\t\t\t$this->profileIn( '-total' );\n\t\t}\n\t}", "public function initStorage()\n {\n $this->open();\n }", "public function __construct() {\n $this->start();\n }", "public function createFileSet() {\n $this->fileset = new TarFileSet();\n $this->filesets[] = $this->fileset;\n return $this->fileset;\n }", "public function open();", "public function open();", "protected function createTree($file){\n $lexer = new ListLexer(file_get_contents($file));\n $parser = new ListParser($lexer);\n $parser->parse(); // begin parsing at rule list\n $fn = new FileNode(array('file' => $file), $parser->tree);\n $fn->file = $file;\n \n $fn->buildContent();\n\n return $fn;\n\t}", "public function start() {\n\n // TODO: Maybe sometimes\n\n }", "function startElement($parser,$name,$attributes)\n\t{\n\t\tunset($parser);\n\n\t\tarray_push($this->tag_stack,$name);\n\t\tarray_push($this->attribute_stack,$attributes);\n\t\tarray_push($this->tempcode_stack,new ocp_tempcode());\n\t\tarray_push($this->special_child_elements_stack,array());\n\t}" ]
[ "0.58902436", "0.58052313", "0.5658202", "0.562522", "0.5617183", "0.53727615", "0.53071725", "0.5266881", "0.52656454", "0.5235271", "0.52137005", "0.51750284", "0.5093454", "0.49928093", "0.49928093", "0.49928093", "0.49928093", "0.49928093", "0.49928093", "0.49928093", "0.49928093", "0.49928093", "0.49928093", "0.49928093", "0.49928093", "0.49638957", "0.49638957", "0.49393532", "0.49016592", "0.48906136", "0.4886416", "0.4873067", "0.4862926", "0.48302662", "0.48227575", "0.48176578", "0.48173505", "0.4807153", "0.48066637", "0.4782366", "0.47803408", "0.47789773", "0.4770792", "0.47472677", "0.47441784", "0.4739909", "0.4739909", "0.4717618", "0.47128266", "0.47128266", "0.47120276", "0.471148", "0.471148", "0.471148", "0.471148", "0.471148", "0.471148", "0.47112387", "0.47110522", "0.47022513", "0.4701887", "0.4697683", "0.46956083", "0.46826455", "0.46758884", "0.467167", "0.46715212", "0.46710187", "0.46546155", "0.464651", "0.46429253", "0.4634826", "0.46216244", "0.46213204", "0.4616867", "0.46093705", "0.460774", "0.46024552", "0.45990887", "0.4596328", "0.45823497", "0.45808172", "0.45789564", "0.45714384", "0.45615867", "0.45578662", "0.45546228", "0.45426023", "0.45397896", "0.45321044", "0.45246476", "0.45240006", "0.4515532", "0.45083898", "0.45081615", "0.44980478", "0.4493373", "0.4493373", "0.44928268", "0.44911054", "0.44885308" ]
0.0
-1
If the handler should swallow an error due to error_reporting settings or
private function shouldSwallow($errorCode) { return (bool) ($errorCode & error_reporting()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle_errors() {\n\t\t//error_reporting(E_ALL ^ E_STRICT | E_WARNING | E_DEPRECATED | E_ERROR | E_PARSE); //E_STRICT disabled\n\t\terror_reporting(E_WARNING | E_ERROR | E_PARSE);\n\t\tset_error_handler([$this, 'php_error_handler']);\n\t}", "function error_handler ($errnor, $errstr, $errfile, $errline) {\n // is blocking their being caught. For now, suppress the PHP error\n // so as to match the missing HPHP one.\n //echo \"error handler<<<\\n\";\n //var_dump($errnor, $errstr, $errfile, $errline) ;\n //echo \">>>\\n\";\n return true;\n}", "function errorHandlerOn()\n\t{\n\t\t$this->bErrorHandler = true;\n\t}", "protected function initializeErrorHandling() {}", "function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n // Don't catch suppressed errors with '@' sign\n // @link http://stackoverflow.com/questions/7380782/error-supression-operator-and-set-error-handler\n $error_reporting = ini_get('error_reporting');\n if (!($error_reporting & $errno)) {\n return;\n }\n throw new ErrorException($errstr, $errno, 0, $errfile, $errline);\n}", "function handleError($errno, $errstr, $errfile, $errline, array $errcontext)\n{\n // error was suppressed with the @-operator\n if (0 === error_reporting()) {\n return false;\n }\n\n throw new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}", "function handleError()\n{\n\tglobal $g_error_msg, $g_debug_msg;\n\tinclude_once(atkconfig('atkroot'). 'atk/errors/class.atkerrorhandlerbase.inc');\n\t$errorHandlers = atkconfig('error_handlers', array('mail'=>array('mailto' => atkconfig('mailreport'))));\n\tforeach ($errorHandlers as $key => $value)\n\t{\n\t\tif (is_numeric($key))\n\t\t$key = $value;\n\t\t$errorHandlerObject = atkErrorHandlerBase::get($key, $value);\n\t\t$errorHandlerObject->handle($g_error_msg, $g_debug_msg);\n\t}\n}", "function error_handler($errno, $errstr, $errfile, $errline, $errcontext)\n{\n // the error suppression operator (@), because the custom error\n // handler is still called even if errors are suppressed.\n if (error_reporting(0) === 0)\n {\n return;\n }\n \n $heading = \"\\n\" . get_error_name($errno) . \" in $errfile at line $errline\\n\";\n \n // Show the superglobal data unless the error is minor\n $show_data = !in_array($errno, array(E_NOTICE, E_USER_NOTICE, E_USER_DEPRECATED));\n \n output_error($heading, $errstr . \"\\n\", $show_data);\n}", "public static function suppressed(): bool\n {\n return @trigger_error('hello');\n }", "protected function registerErrorHandling()\n {\n error_reporting(E_ALL);\n\n //do not handle for console\n if (!$this->inConsole()) {\n ini_set('display_errors', 0);\n DebugHandler::register();\n }\n }", "function error_handler($level, $message, $file, $line, $context) \n{\t\n\tif($level === E_USER_ERROR) {\n\t\tdebug_print_backtrace();\n\t\treturn(true); //And prevent the PHP error handler from continuing\n\t} else if($level === E_USER_WARNING) {\n\t\tif(getLogLevel() >= E_USER_WARNING) echo PHP_EOL.\"WARNING: $message\";\n\t\treturn (true);\n\t} else if($level === E_USER_NOTICE) {\n\t\tif(getLogLevel() >= E_USER_NOTICE) echo PHP_EOL.\"NOTICE: $message\";\n\t\treturn(true);\n\t}\n\treturn(false); //Otherwise, use PHP's error handler\n}", "function is_config_error_reporting() {\n\treturn conditional_config('error_reporting');\n}", "public function registerErrorHandler() {\n set_error_handler(array($this, 'handleError'));\n error_reporting(E_ALL);\n }", "public function errorMode(){}", "function error_handler($error_level, $error_message, $error_file, $error_line) {\n if (error_reporting() & $error_level) {\n $this->logger->error($error_message);\n header('Location: '.$this->fallback);\n exit;\n }\n return true;\n }", "public static function tryError()\n\t{\n\t\tset_error_handler(array(__CLASS__, '_errorHandler'), E_ALL);\n\t\tself::$errorMsg = NULL;\n\t}", "private function restoreErrorHandler() {\n\n\t\terror_reporting( $this->old_error_reporting );\n\t\tif ( ! is_null( $this->old_error_handler ) ) {\n\t\t\tset_error_handler( $this->old_error_handler );\n\t\t} else {\n\t\t\trestore_error_handler();\n\t\t}\n\t}", "function iconvErrorHandler($no, $msg, $file, $line){\n if ($no === E_NOTICE) {\n $this->hasError = true;\n }\n //return true;\n }", "static function NormalErrorHandler($errno, $errstr, $errfile, $errline) {\n global $abj404logging;\n try {\n // if the error file does not contain the name of our plugin then we ignore it.\n $pluginFolder = substr(ABJ404_NAME, 0, strpos(ABJ404_NAME, '/'));\n if (strpos($errfile, $pluginFolder) === false) {\n return false;\n }\n\n switch ($errno) {\n case E_NOTICE:\n // ignore these. it happens when we use the @ symbol to ignore undefined variables.\n break;\n\n default:\n $errmsg = \"ABJ404-SOLUTION Normal error handler error: errno: \" .\n wp_kses_post(json_encode($errno)) . \", errstr: \" . wp_kses_post(json_encode($errstr)) .\n \", errfile: \" . stripcslashes(wp_kses_post(json_encode($errfile))) .\n \", errline: \" . wp_kses_post(json_encode($errline));\n if ($abj404logging != null) {\n $abj404logging->errorMessage($errmsg);\n } else {\n echo $errmsg;\n }\n break;\n }\n } catch (Exception $ex) { \n // ignored\n }\n /* Execute the PHP internal error handler anyway. */\n return false;\n }", "function fatalErrorHandler() {\n global $cfg;\n $error = error_get_last();\n if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)){\n header(\"HTTP/1.1 500 Server Error\");\n readfile($cfg['source_root'] . \"/500.html\");\n //error_log(print_r($error, true));\n //error_log(print_r(debug_backtrace(), true));\n exit();\n }\n/*\n if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)){\n $_SESSION['error'] = $error;\n header(\"Location:\".$cfg['root'].\"exception/\");\n exit;\n }\n*/\n}", "protected function restoreErrorReporting() {\n error_reporting(~E_NOTICE);\n }", "public static function setShudownHandler()\n\t{\n\t $aError = error_get_last();\n\n\t if (($aError['type'] === E_ERROR) || ($aError['type'] === E_USER_ERROR)) {\n\n\t \tself::setErrorHandler($aError['type'], $aError['message'], $aError['file'], $aError['line']);\n\t }\n\t}", "function setErrorHandling($level)\t{\n\t\t$GLOBALS['amfphp']['errorLevel'] = $level;\n\t}", "protected function registerErrorHandling()\n {\n error_reporting(E_ALL);\n set_error_handler(function ($level, $message, $file = '', $line = 0) {\n if (error_reporting() & $level) {\n throw new \\ErrorException($message, 403, $level, $file, $line);\n }\n });\n\n set_exception_handler(function ($e) {\n echo($e);\n });\n\n register_shutdown_function(function () {\n echo(error_get_last());\n });\n }", "function errorHandlerOff()\n\t{\n\t\t$this->bErrorHandler = false;\n\t}", "public static function hide_errors(){\n\t\t\tself::$SHOWING_ERRORS=false;\n\t\t\trestore_error_handler();\n\t\t\trestore_exception_handler();\n\t\t}", "private function suppressLibraryErrors()\n {\n $this->originalErrorReporting = ini_get('error_reporting');\n error_reporting(E_ERROR | E_PARSE);\n }", "function fatal_error_handler() {\n $last_error = error_get_last();\n $this->logger->error($last_error);\n if ($last_error['type'] === E_ERROR) {\n header('Location: '.$this->fallback);\n exit;\n }\n }", "private function _set_reporting() {\n //if set to true in config report and dispaly all errors else log erros in errors.log file\n if(DEBUG) {\n error_reporting(E_ALL);\n ini_set('display_errors', 1);\n } else {\n error_reporting(0);\n ini_set('display_errors', 0) ;\n ini_set('log_errors', 1);\n ini_set('error_log', ROOT . DS . 'tmp' . DS . 'logs' . DS . 'errors.log');\n }\n }", "public function IsErrorDispatched ();", "public function shouldReport() {\n\t\treturn error_reporting() & $this->getSeverity();\n\t}", "protected function enableDisplayErrors() {}", "protected function enableDisplayErrors() {}", "function debug_error_handler($errno,$errstr,$errfile,$errline){\r\n if (!(error_reporting() & $errno)) {\r\n // This error code is not included in error_reporting, so let it fall\r\n // through to the standard PHP error handler\r\n return false;\r\n }\r\n\r\n switch ($errno) {\r\n case E_USER_ERROR:\r\n echo \"<b>My ERROR</b> [$errno] $errstr<br />\\n\";\r\n echo \" Fatal error on line $errline in file $errfile\";\r\n echo \", PHP \" . PHP_VERSION . \" (\" . PHP_OS . \")<br />\\n\";\r\n echo \"Aborting...<br />\\n\";\r\n exit(1);\r\n break;\r\n\r\n case E_USER_WARNING:\r\n echo \"<b>My WARNING</b> [$errno] $errstr<br />\\n\";\r\n break;\r\n\r\n case E_USER_NOTICE:\r\n echo \"<b>My NOTICE</b> [$errno] $errstr<br />\\n\";\r\n break;\r\n\r\n default:\r\n //echo \"System generated error: [$errno] $errstr<br />\\n\";\r\n return false;\r\n break;\r\n }\r\n /* Don't execute PHP internal error handler */\r\n return true;\r\n}", "public function fatalHandler()\n {\n $lastError = error_get_last();\n $trace = isset($lastError['backtrace']) ? var_export($lastError['backtrace'], true) : null;\n if ($lastError && in_array($lastError['type'], [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR], true)) {\n $this->report($lastError['file'], $lastError['line'], Logger::CRITICAL, $lastError['message'], $trace, true);\n }\n }", "protected static function initializeBasicErrorReporting() {}", "public static function fatal_error_handler($buffer)\n {\n $error = error_get_last();\n $output = NULL;\n \n // this should never happen, but if $error isn't an array, return false\n if (!is_array($error)) return false;\n\t\t\n // The above comment is not quite true. This function is used as\n // callback for ob_start, which means it's an output processor function.\n // error_get_last() returning non-array means that no error has occurred,\n // and we should return false, specifying that we don't want to modify\n // the ob contents before sending to client.\n\n // We have an error, lets announce that with headers:\n header('HTTP/1.0 500 Internal Server Error');\n \n // we can't specify a bitmask for error logging to ob_start, so we have\n // to manually filter... (we don't want anything that the error_handler can handle)\n if (in_array($error['type'], self::$filtered_errors) || $error['type'] >= E_USER_ERROR) return false;\n \n if (!sfConfig::get('sf_debug'))\n {\n $files = array();\n\n // this is a reverse cascade = the bottom-most has precedence\n $files[] = sfConfig::get('sf_plugins_dir').'/sfErrorHandlerPlugin/errors/error500.php';\n $files[] = sfConfig::get('sf_config_dir').'/error_500.php';\n $files[] = sfConfig::get('sf_web_dir').'/errors/error500.php';\n \n // check for app/project specific error page, can only do this if we have a context\n if (sfConfig::get('sf_app_config_dir'))\n {\n $files[] = sfConfig::get('sf_app_config_dir').'/error_500.php';\n }\n\n foreach ($files as $file)\n {\n if (is_readable($file))\n {\n $output = file_get_contents($file);\n }\n }\n\n } else {\n foreach ($error as $info => $string)\n // at the moment, pretty basic, but better than nothing, eh?\n $output .= \"{$info} : {$string}\\n\";\n //self::setFatalException(new Exception($error['message'], $error['type']));\n //throw new Exception($error['message'], $error['type']);\n }\n \n return $output;\n }", "public static function show_errors(){\n\t\t\tself::$SHOWING_ERRORS=true;\n\t\t\tset_error_handler(array('Errors','handle_errors'),E_ALL | E_STRICT);\n\t\t\tset_exception_handler(array('Errors','handle_exceptions'));\n\t\t}", "function errorlog_enable() {\r\n \r\n // error-checking\r\n if (error_reporting() !== -1) { die(__FUNCTION__ . \": error_reporting() must be set to -1, not \" .error_reporting(). \"!\"); }\r\n \r\n // setup handlers\r\n set_error_handler('_errorlog_catchRuntimeErrors'); \r\n set_exception_handler('_errorlog_catchUncaughtExceptions');\r\n register_shutdown_function('_errorlog_catchFatalErrors');\r\n}", "function errorHandler($errno, $errstr = '', $errfile = '', $errline = '') {\r\n\tglobal $regex_error;\r\n\t$regex_error = \"Regular Expression Error: $errstr\";\r\n\treturn true; // dont exec internal error handler\r\n}", "public function setupErrorHandler()\n {\n $this->error_handler = set_error_handler(array($this, 'error_handler'));\n }", "private function registerErrorHandler()\n {\n if ($this->config->app->dev_mode === true) {\n $run = new Whoops\\Run;\n $handler = new PrettyPageHandler;\n\n $run->pushHandler($handler);\n\n return $run->register();\n }\n\n ini_set('display_errors', 'Off');\n\n $app = $this;\n register_shutdown_function(function () use ($app) {\n if ($error = error_get_last()) {\n $app->error(500);\n }\n });\n }", "function myErrorHandler($errno, $errstr, $errfile, $errline)\n{\n if (!(error_reporting() & $errno)) {\n \t // This error code is not included in error_reporting\n \t return;\n }\n\n printf(\n \"%s\\nError num: %d\\nMessage: %s\\nFile: %s\\nLine: %d\\n\",\n \tdate(\"d-m-Y h:i:s\"),\n \t$errno,\n \t$errstr,\n \t$errfile,\n \t$errline\n );\n\n // Halt the execution in case of E_USER_ERROR\n if (in_array($errno, [ E_USER_ERROR, E_USER_WARNING, E_ERROR, E_WARNING ])) {\n\t\t exit(1);\n }\n\n /* Don't execute PHP internal error handler */\n return true;\n}", "function errorCatcher($errno, $errstr, $errfile, $errline) {\n\tstatic $here = false;\n\tif ($here === true) {\n\t\treturn;\n\t}\n\t$here = true;\n\tif (error_reporting() === 0) {\n\t\t$here = false;\n\t\treturn;\n\t}\n\tstopForError($errstr, $errno, $errfile, $errline);\n\t$here = false;\n}", "protected function registerErrorHandling()\n {\n error_reporting(-1);\n\n set_error_handler(function ($level, $message, $file = '', $line = 0) {\n if (error_reporting() & $level) {\n throw new ErrorException($message, 0, $level, $file, $line);\n }\n });\n\n set_exception_handler(function ($e) {\n $this->handleUncaughtException($e);\n });\n\n register_shutdown_function(function () {\n $this->handleShutdown();\n });\n }", "public static function trap_errors_begin(){\n\t\t\tself::$trapprevhndlr=set_error_handler(array('Errors','handle_trap'));\n\t\t}", "function output_error() {\r\n return false;\r\n }", "protected function registerExtensionConfigurationErrorHandler() {}", "private function initErrorHandler()\n {\n $handler = new ErrorHandler();\n set_error_handler([$handler, 'handler']);\n }", "public function errorOccured();", "function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {\n $message = \"An error occurred in script '$e_file' on line $e_line:\\n$e_message\\n\";\n\n // Add the backtrace:\n $message .= \"<pre>\" .print_r(debug_backtrace(), 1) . \"</pre>\\n\";\n\n // Or just append $e_vars to the message:\n\n // $message .= \"<pre>\" . print_r ($e_vars, 1) . \"</pre>\\n\";\n if (!LIVE) { // Show the error in the browser.\n echo '<div class=\"error\">' . nl2br($message) . '</div>';\n } else { // Development (print the error).\n\n // Send the error in an email:\n error_log ($message, 1, CONTACT_EMAIL, 'From:[email protected]');\n\n // Only print an error message in the browser, if the error isnt a notice:\n if ($e_number != E_NOTICE) {\n echo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div>';\n }\n } // End of $live IF-ELSE.\n\n return true; // So that PHP doesn't try to handle the error, too.\n }", "public function is_error()\n {\n }", "private static function initErrorHandler() {\n\t\t\tset_exception_handler('ErrorHandler::handleExceptions');\n\t\t\tset_error_handler('ErrorHandler::handleErrors');\n\t\t}", "function set_error_reporting($mode) {\n \n $mode = strtolower($mode);\n \n if($mode == self::DEBUGGING) {\n // Report all PHP errors except for notices\n ini_set('error_reporting', E_ALL);\n \n // Set the display_errors directive to On\n ini_set('display_errors', 1);\n \n // Do not log errors to the web server's error log\n ini_set('log_errors', 0);\n }\n \n else if($mode == self::DEVELOPMENT) {\n // Report all PHP errors and notices\n ini_set('error_reporting', E_ALL ^ E_NOTICE);\n \n // Set the display_errors directive to On\n ini_set('display_errors', 1);\n \n // Do not log errors to the web server's error log\n ini_set('log_errors', 0);\n }\n \n else if($mode == self::PRODUCTION) {\n // Report simple running errors\n ini_set('error_reporting', E_ALL ^ E_NOTICE);\n \n // Set the display_errors directive to Off\n ini_set('display_errors', 0);\n \n // Log errors to the web server's error log\n ini_set('log_errors', 1);\n }\n \n else {\n return false;\n }\n \n return $mode;\n }", "function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {\n \n\t$message = \"An error occurred in script '$e_file' on line $e_line:\\n$e_message\\n\";\n\t\n\t// Add the backtrace:\n\t$message .= \"<pre>\" .print_r(debug_backtrace(), 1) . \"</pre>\\n\";\n\t\n\t// Or just append $e_vars to the message:\n\t//\t$message .= \"<pre>\" . print_r ($e_vars, 1) . \"</pre>\\n\";\n\n\tif (!LIVE) { // Show the error in the browser. \n echo '<div class=\"alert alert-danger\">' . nl2br($message) . '</div>';\n\t} else { \n\t\t// Send the error in an email:\n\t\terror_log ($message, 1, CONTACT_EMAIL, 'From:[email protected]');\n\t\t\t\t\t\n\t\t// echo $message; //DEBUGGIN ONLY\n\n\t\t// Only print an error message in the browser, if the error isn't a notice:\n\t\tif ($e_number != E_NOTICE) {\t\t\t\t\t\t\n\t\t\techo $message; // TESTING ONLY BELOW, DON'T DISPLAY\n\t\t\techo 'An error occured, please try again later...';\n\t\t} \n\t}\t\n\t\n\treturn true; // So that PHP doesn't try to handle the error, too.\t\n}", "function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars)\n {\n \t//detailed error message\n \t$message = \"An error occurred in script '$e_file' on line $e_line:\\n$e_message\\n\";\n\t\t\n\t\t//add backtrace info\n\t\t$message .=\"<pre>\" .print_r(debug_backtrace(), 1). \"</ore>\\n\";\n\t\t\n\t\t\n\t\t//if site not live show error in browser\n\t\t// nl2br($message) turns \\n into HTML break tags\n\t\tif(!LIVE)\n\t\t{\n\t\t\techo '<div class=\"alert alert-danger\">' . nl2br($message) .'</div>';\n\t\t}else{\n\t\t\terror_log($message, 1, CONTACT_EMAIL, 'FROM:[email protected]');\n\t\t\tif($e_number !=E_NOTICE)\n\t\t\t{\n\t\t\t\techo '<div class=\"alert alert-danger\">A system error occurred.\n\t\t\t\t we apologize for the inconvenience.</div>';\n\t\t\t}//end if !LIVE\n\t\t}//end of my_error_handler() definition\n\t\t\treturn true; //so that PHP does'nt try to handle the error , too\n}", "function errorHandler($errno,$errstr){\n\t global $errors;\n\n\t raiseError(\"We are working to solve an internal issue in our service. Please, try later.\", Constants::HTTP_INTERNAL_SERVER_ERROR);\n\t}", "function error_handler($level, $message, $file, $line, $context) {\n if($level !== E_NOTICE && $level !== E_DEPRECATED && $level !== E_USER_DEPRECATED) {\n Cartridge::set_log('Error '.$level.': '.$message .'(Line: '.$line.' - File: '.$file.')');\n Cartridge::set_log( \"\\r\\n##################################\\r\\n\");\n send_error_mail('Error '.$level.': '.$message .'(Line: '.$line.' - File: '.$file.')');\n Cartridge::remove_lock_file();\n die();\n }\n return true;\n \n}", "static function loadErrorHandlers() {\n\t\tset_error_handler('errorHandler', error_reporting());\n\t\tset_exception_handler('exceptionHandler');\n\t}", "function default_error_handler($errno, $errstr, $errfile, $errline)\n{\n\tif($errno == E_USER_ERROR || $errno == E_ERROR)\n\t{\n\t\tif(isset($db))$db->closeDb();\n\t\tinclude(SITE_DIR.'_pages/_error.php');\n\t\tinclude('footer.php');\n\t\texit;\n\t}\n\telseif($errno == E_USER_NOTICE)\n\t{\n\t\tif(isset($db))$db->closeDb();\n\t\tinclude(SITE_DIR.'_pages/_notice.php');\n\t\tinclude('footer.php');\n\t\texit;\n\t}\n}", "public function isError() {}", "public function error_handler($errno, $errstr, $errfile, $errline) {\n return TRUE;\n }", "function xthreads_catch_errorhandler() {\r\n\tif(!function_exists('_xthreads_catch_php_error')) { //paranoia\r\n\t\tfunction _xthreads_catch_php_error($errno, $errstr) {\r\n\t\t\t$GLOBALS['_previous_error'] = array($errno, $errstr);\r\n\t\t}\r\n\t}\r\n\tunset($GLOBALS['_previous_error']);\r\n\tset_error_handler('_xthreads_catch_php_error');\r\n}", "function rest_error_handler($errno, $errstr, $errfile, $errline)\r\n{\r\n\t$message = 'Unhandled php error';\r\n\t$debug = '';\r\n\tglobal $CI;\r\n\tif (DEBUG_MODE) {\r\n\t\t$debug = $errstr . \" @ $errfile @ $errline\";\r\n\t\t$CI->rest_show_error ( 'php-' . $errno, $message . \"\\n<br/>\" . $debug, TRUE );\r\n\t} else {\r\n\t\t$CI->rest_show_error ( 'php-' . $errno );\r\n\t}\r\n\treturn FALSE;\r\n}", "function __production_error_handler($code, $message, $file, $line)\n{\n // Skip non-static method called staticly type of error...\n if ($code == 2048)\n {\n return;\n } // if\n Logger::log(\"Error: $message in '$file' on line $line (error code: $code)\", Logger::ERROR);\n}", "private function _init() {\n\t\tif(YII_ENABLE_ERROR_HANDLER)\n\t\t\tset_error_handler(array($this,'handleError'),error_reporting());\n\t}", "abstract protected function handleError(\\Exception $e);", "abstract public function handleFatalError($e);", "public function fail()\n {\n return ErrorHandler::has();\n }", "protected function executeActionWithErrorHandling() {\n \n }", "function handler(Error $error)\n {\n }", "public function beforeOutputError() {\n }", "function fatal_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {\n\tdie($errstr);\n\treturn true;\n}", "function as_error_handler($errno, $errstr, $errfile, $errline){\n\t\t$msg = 'Error('.$errno.') '.$errstr.' in '. $errfile.':'. $errline;\n\t\t$this->catch_error( $msg, 'clickgs plugin crashed');\n\t}", "function myErrorHandler($errno, $errstr, $errfile, $errline)\n {\n if (!(error_reporting() & $errno)) {\n // This error code is not included in error_reporting\n return;\n }\n\n switch ($errno) {\n case E_USER_ERROR:\n echo \"<b>My ERROR</b> [$errno] $errstr<br />\\n\";\n echo \" Fatal error on line $errline in file $errfile\";\n echo \", PHP \" . PHP_VERSION . \" (\" . PHP_OS . \")<br />\\n\";\n echo \"Aborting...<br />\\n\";\n exit(1);\n break;\n\n case E_USER_WARNING:\n echo \"<b>My WARNING</b> [$errno] $errstr<br />\\n&nbsp;&nbsp;$errfile:$errline<br />\\n\";\n break;\n\n case E_USER_NOTICE:\n echo \"<b>My NOTICE</b> [$errno] $errstr<br />\\n&nbsp;&nbsp;$errfile:$errline<br />\\n\";\n break;\n\n default:\n echo \"Unknown error type: [$errno] $errstr<br />\\n&nbsp;&nbsp;$errfile:$errline<br />\\n\";\n break;\n }\n\n /* Don't execute PHP internal error handler */\n return true;\n }", "public function handle(\\Exception $error);", "static function warningHandler($errno, $errstr, $errfile, $errline, $errcontext) {\n\t if(error_reporting() == 0) return;\n\t\tif(self::$send_warnings_to) self::emailError(self::$send_warnings_to, $errno, $errstr, $errfile, $errline, $errcontext, \"Warning\");\n\t\tself::log_error_if_necessary( $errno, $errstr, $errfile, $errline, $errcontext, \"Warning\");\n\n\t\tif(Director::isDev()) {\n\t\t self::showError($errno, $errstr, $errfile, $errline, $errcontext, \"Warning\");\n\t\t}\n\t}", "public static function ignoreErrorsHandler($errno, $errstr, $errfile, $errline)\n {\n // ignore all errors!\n }", "public static function my_error_handler($code, $msg, $file, $line) {\n self::$NowErr = true;\n return true;\n }", "private function restoreErrorReporting()\n {\n error_reporting($this->originalErrorReporting);\n }", "public static function warningHandler()\n {\n }", "private static function _set_has_error_all(): void\n {\n self::$_has_error_all = true;\n }", "protected function downgradeErrorReporting() {\n error_reporting(~(E_NOTICE | E_WARNING));\n }", "protected function canBrowseError()\n {\n $error = wpjr_can_browse_err();\n \n if(!is_null($error)) {\n $this->addError($error);\n }\n }", "public function unsetNoticeErrorLevel(){\n $errorlevel = error_reporting();\n if ($errorlevel > 0) {\n error_reporting($errorlevel & ~ E_NOTICE);\n } elseif ($errorlevel < 0) {\n error_reporting(E_ALL & ~ E_NOTICE);\n }\n }", "function with_disabled_phan_error_handler(Closure $closure)\n{\n global $__no_echo_phan_errors;\n $__no_echo_phan_errors = true;\n try {\n return $closure();\n } finally {\n $__no_echo_phan_errors = false;\n }\n}", "function setReporting() {\r\n if (DEVELOPMENT_ENVIRONMENT == true) {\r\n error_reporting(E_ALL);\r\n ini_set('display_errors', 'On');\r\n } else {\r\n error_reporting(E_ALL);\r\n ini_set('display_errors', 'Off');\r\n ini_set('log_errors', 'On');\r\n ini_set('error_log', ROOT . DS . 'tmp' . DS . 'logs' . DS . 'error.log');\r\n }\r\n}", "protected function _setupNotFoundErrorHandling()\n\t{\n\t\t// we store current handler, so as to pass-thru to it if needed\n\t\t$this->joomlaErrorHandler = JError::getErrorHandling(E_ERROR);\n\n\t\t// then override Joomla! handler\n\t\tJError::setErrorHandling(E_ERROR, 'callback', array($this, 'sh404sefErrorPage'));\n\t\tset_exception_handler(array($this, 'sh404sefErrorPage'));\n\t}", "private function disableEStrict() {\n $was = error_reporting();\n error_reporting($was & ~E_STRICT);\n return $was;\n }", "public function isHandled(): bool;", "function errorHandler($errno, $errstr, $errfile, $errline)\n{\n\tif (error_reporting() == 0)\n\t{\n\t\treturn;\n\t}\n\n\t$errorType = array (\n E_ERROR => 'ERROR',\n E_WARNING => 'WARNING',\n E_PARSE => 'PARSING ERROR',\n E_NOTICE => 'NOTICE',\n E_CORE_ERROR => 'CORE ERROR',\n E_CORE_WARNING => 'CORE WARNING',\n E_COMPILE_ERROR => 'COMPILE ERROR',\n E_COMPILE_WARNING => 'COMPILE WARNING',\n E_USER_ERROR => 'USER ERROR',\n E_USER_WARNING => 'USER WARNING',\n E_USER_NOTICE => 'USER NOTICE',\n E_STRICT => 'STRICT NOTICE',\n E_RECOVERABLE_ERROR => 'RECOVERABLE ERROR'\n );\n\n\t$fatalArray = array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_RECOVERABLE_ERROR);\n\n\t$oKrullHtml =& krullHtml::getInstance();\n\n\tif(!in_array($errno,$fatalArray))\n\t{\n\t\tif($errno == E_USER_ERROR)\n\t\t{\n\t\t\t$oKrullHtml->clean(true);\n\t\t\t$oKrullHtml->addMsgBox(KRULL_COLORBOX_RED, $errorType[$errno].' : '.basename($errfile).' ,'.$errline, $errstr);\n\t\t\t$oKrullHtml->buildHtmlDocument();\n\t\t\techo $oKrullHtml->getMainBuffer();\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$oKrullHtml->addMsgBox(KRULL_COLORBOX_ORANGE, $errorType[$errno].' : '.basename($errfile).' ,'.$errline, $errstr);\n\t\t}\n\t}\n\telse\n\t{\n\t\techo $errorType[$errno].'::'.$errstr.'; A la ligne'.$errline.' dans le fichier'.$errfile.'.'.\"\\n\";\n\t}\n}", "function globalErrorHandler ($code, $message, $file, $line, $context) {\n globalExceptionHandler(new ErrorException($message, $code, E_ERROR, $file, $line));\n return true;\n}", "public function getErrorBubbling(): bool;", "function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n\tswitch ($errno) {\n\t\tcase E_NOTICE:\n\t\t\t$type = \"Notice\";\n\t\t\tbreak;\n\t\tcase E_WARNING:\n\t\t\t$type = \"Warning\";\n\t\t\tbreak;\n\t\tcase E_STRICT:\n\t\t\t$type = \"strict\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$type = \"Error\";\n\t}\n\t//echo \"<b>$type:</b> \".$errfile.':'.$errline.': '.$errstr.'<br />';\n\tthrow new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}", "public static function handle()\n {\n set_error_handler([ErrorHandler::class, 'errorToException'], E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED & ~E_USER_DEPRECATED);\n }", "function setReporting() \n{ \n if (DEVELOPMENT_ENVIRONMENT == true) \n {\n error_reporting(E_ALL);\n ini_set('display_errors', 'On');\n } \n else \n {\n error_reporting(E_ALL);\n ini_set('display_errors', 'Off');\n ini_set('log_errors', 'On');\n ini_set('error_log', ROOT . DS . 'tmp' . DS . 'logs' . DS . 'error.log');\n }\n}", "public function setErrorHandler($handler)\n {\n }", "private function setErrorMode()\n\t{\n\t\t// get PDO object and enable exception error mode\n\t\t$pdo = $this->getPdo();\n\t\t$this->_errMode = $pdo->getAttribute(PDO::ATTR_ERRMODE);\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t}", "function handleError($error_level,$error_message,$error_file,$error_line,$error_context)\n{\n}", "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n\t// Build the error message:\n\t$message = \"An error occurred in script '$e_file' on line $e_line: $e_message\\n\";\n\t\n\t// Add the date and time:\n\t$message .= \"Date/Time: \" . date('n-j-Y H:i:s') . \"\\n\";\n\t\n\tif (!LIVE) { // Development (print the error).\n\n\t\t// Show the error message:\n\t\techo '<div class=\"error\">' . nl2br($message);\n\t\n\t\t// Add the variables and a backtrace:\n\t\techo '<pre>' . print_r ($e_vars, 1) . \"\\n\";\n\t\tdebug_print_backtrace();\n\t\techo '</pre></div>';\n\t\t\n\t} else { // Don't show the error:\n\n\t\t// Send an email to the admin:\n\t\t$body = $message . \"\\n\" . print_r ($e_vars, 1);\n\t\tmail(EMAIL, 'Site Error!', $body, 'From: [email protected]');\n\t\n\t\t// Only print an error message if the error isn't a notice:\n\t\tif ($e_number != E_NOTICE) {\n\t\t\techo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div><br />';\n\t\t}\n\t} // End of !LIVE IF.\n\n}" ]
[ "0.714137", "0.67601496", "0.67596066", "0.670294", "0.6647471", "0.6637077", "0.6519738", "0.64847606", "0.6442242", "0.636666", "0.63128513", "0.629316", "0.62891674", "0.628343", "0.6253693", "0.6251037", "0.6178006", "0.6175184", "0.6172564", "0.6160238", "0.6152134", "0.61290365", "0.61077946", "0.60896504", "0.60786664", "0.6070515", "0.6066996", "0.60653985", "0.606352", "0.60476226", "0.6036434", "0.6030682", "0.60294414", "0.6025705", "0.599252", "0.59863174", "0.59802175", "0.59697825", "0.5951506", "0.5934987", "0.59308136", "0.5922383", "0.59170556", "0.590193", "0.5898336", "0.58831316", "0.5875494", "0.5873316", "0.58717793", "0.5863982", "0.58620733", "0.58610606", "0.5860984", "0.58569765", "0.58320445", "0.58285505", "0.5823837", "0.58128893", "0.58106565", "0.580786", "0.5804787", "0.5799869", "0.5798675", "0.5795662", "0.57930374", "0.5780327", "0.5772446", "0.5767794", "0.5762669", "0.5762411", "0.57530344", "0.57500166", "0.57311255", "0.5726826", "0.57254934", "0.572508", "0.5722034", "0.5718614", "0.5706818", "0.5702944", "0.56996155", "0.5695911", "0.5695346", "0.5685503", "0.56761163", "0.5673742", "0.5672738", "0.56725526", "0.5669766", "0.56604457", "0.5654474", "0.56470203", "0.56356466", "0.563217", "0.5624831", "0.56120735", "0.56096965", "0.5609371", "0.55995363", "0.55958116" ]
0.6306488
11
Determines whether the error message is a warning caused by a failed attempt to include the current file on the file stack
private function isOwnFileIncludeWarning($errorMessage) { if (empty($this->files)) { return false; } return (bool) preg_match('#'.preg_quote($this->fileName(), '#').'#', $errorMessage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasCurrentWarning()\n {\n return $this->hasCurrent(self::NAMESPACE_WARNING);\n }", "public function hasCurrentError()\n {\n return $this->hasCurrent(self::NAMESPACE_ERROR);\n }", "public function hasWarnings() {}", "public function hasError()\r\n\t{\r\n\t\treturn $this->root->hasAttribute('liberr');\r\n\t}", "protected function checkCurrentDirectoryIsInIncludePath() {}", "public function checkRootlineForIncludeSection() {}", "public function is_error() {\n\t\treturn $this->upgrader_skin->error;\n\t}", "public function hasStackTrace(){\n return $this->_has(7);\n }", "public static function hasWarnings() { return count(PNApplication::$warnings) > 0; }", "function hasWarning() {\n\t\tif (sizeof($this->warnings) > 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "function processFile($filePath, &$errorMsg) {\n\t\tassert(false);\n\t}", "protected function setWarningsExist() {}", "protected function checkForErrors(){\n if(!ModuleLoader::moduleIsLoaded($this->module)) $this->throwError('TemplateLoader01', 'Module '.$this->module.' either does not exist, or has not been installed in this theme');\n\n return null;\n }", "function errorLocation($string) {\n global $PAGE;\n\tif(in_array($string, $PAGE['error_location'])) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function message()\n {\n return 'The font files is already exists or the format is wrong.';\n }", "protected function isThereHiddenError(): bool\n {\n // TODO when phpmd found a sintaxis error finish succefully instead of error.\n // for different versions of the tool the error output is different\n // if (is_int(strpos($this->exit[3], 'No mess detected'))) {\n // return false;\n // }\n return true;\n }", "public function caused_error() : bool {\n return !empty($this->error);\n }", "function base_requirements_error() {\n\trequire_once( dirname( __FILE__ ) . '/views/system-requirements-error.php' );\n}", "public function handle($code, $message)\n\t{\n\t\tif (false === $this->shouldSwallow($code)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->isOwnFileIncludeWarning($message);\n\t}", "public function testWarningMessage()\n {\n $this->throwWarningException();\n\n // test if code actually gets here\n $this->assertTrue(true);\n }", "function checkForFiles( &$errors, &$warnings, &$resources, &$uploadsMap, &$lang ) {\n // global $mediaPath;\n $valid = 0;\n foreach( $resources as $row => $res ) {\n $filename = $res->getFilename();\n\t $tmp = checkFile( basename( $filename ), $uploadsMap );\n\t if ( $tmp === 2 ){\n\t $valid = $tmp;\n\t if( !array_key_exists( $row, $errors)) $errors[$row] = Array();\n\t if( $filename === '' ) array_push( $errors[$row], 'In Zeile ' . $row . ': Dateifeld ist leer.');\n\t else array_push( $errors[$row], sprintf($lang['xlsimport_error_file_not_found'], $row, $filename)); \n\t }\n }\n return $valid;\n}", "protected function _checkHeader() {\n\t\tif (!isset($this->tokens[1]) || !is_array($this->tokens[1])) {\n\t\t\t$this->_error(1);\n\t\t}\n\t\t$containsHeader = strstr($this->tokens[1][1], 'the most rad php framework') === false;\n\t\tif ($this->tokens[1][0] != T_DOC_COMMENT || $containsHeader) {\n\t\t\t$this->_error(1);\n\t\t}\n\t}", "public function hasWarnings()\n {\n return !empty(self::$warnings);\n }", "function requirements_error() {\n\tglobal $wp_version;\n\n\trequire_once( dirname( __FILE__ ) . '/views/requirements-error.php' );\n}", "function checkCMSPath() {\n global $_ARRLANG, $arrFiles;\n\n $statusMsg = \"\";\n\n if (!ini_get('safe_mode')) {\n if (!file_exists($_SESSION['installer']['config']['documentRoot'].$_SESSION['installer']['config']['offsetPath'].'/index.php')) {\n return str_replace(\"[PATH]\", $_SESSION['installer']['config']['documentRoot'].$_SESSION['installer']['config']['offsetPath'], $_ARRLANG['TXT_PATH_DOES_NOT_EXIST']);\n } else {\n foreach (array_keys($arrFiles) as $file) {\n if (!file_exists($_SESSION['installer']['config']['documentRoot'].$_SESSION['installer']['config']['offsetPath'].$file)) {\n $statusMsg .= str_replace(\"[FILE]\", $_SESSION['installer']['config']['documentRoot'].$_SESSION['installer']['config']['offsetPath'].$file, $_ARRLANG['TXT_CANNOT_FIND_FIlE']);\n }\n }\n if (empty($statusMsg)) {\n return true;\n } else {\n return $statusMsg;\n }\n }\n } else {\n return true;\n }\n }", "public function testMessageNormalizationWithTokenTranslation()\n {\n $message = 'Parse error: unexpected T_FILE, expecting T_STRING in test.php on line 2';\n $expected = 'Unexpected __FILE__ (T_FILE), expecting T_STRING';\n\n $error = new SyntaxError('test.php', $message);\n $this->assertSame($expected, $error->getNormalizedMessage(true));\n }", "private function validateSourceLocation()\n {\n if (!$this->location) {\n $this->setError(\n StatusMessage::REFERENCE_BREAKPOINT_SOURCE_LOCATION,\n 'Invalid breakpoint location'\n );\n return false;\n }\n\n if (!$this->resolveLocation()) {\n $this->setError(\n StatusMessage::REFERENCE_BREAKPOINT_SOURCE_LOCATION,\n 'Could not find source location: $0',\n [$this->location->path()]\n );\n return false;\n }\n\n $path = $this->resolvedLocation->path();\n $lineNumber = $this->resolvedLocation->line();\n $info = new \\SplFileInfo($path);\n\n // Ensure the file exists and is readable\n if (!$info->isReadable()) {\n $this->setError(\n StatusMessage::REFERENCE_BREAKPOINT_SOURCE_LOCATION,\n 'Invalid breakpoint location - File not found or unreadable: $0.',\n [$path]\n );\n return false;\n }\n\n // Ensure the file is a php file\n if (strtolower($info->getExtension()) !== 'php') {\n $this->setError(\n StatusMessage::REFERENCE_BREAKPOINT_SOURCE_LOCATION,\n 'Invalid breakpoint location - Invalid file type: $0.',\n [$info->getExtension()]\n );\n return false;\n }\n\n $file = $info->openFile('r');\n $file->seek($lineNumber - 1);\n $line = ltrim($file->current() ?: '');\n\n // Ensure the line exists and is not empty\n if ($line === '') {\n $this->setError(\n StatusMessage::REFERENCE_BREAKPOINT_SOURCE_LOCATION,\n 'Invalid breakpoint location - Invalid file line: $0.',\n [(string) $lineNumber]\n );\n return false;\n }\n\n // Check that the line is not a comment\n if ($line[0] == '/' || ($line[0] == '*' && $this->inMultilineComment($file, $lineNumber - 1))) {\n $this->setError(\n StatusMessage::REFERENCE_BREAKPOINT_SOURCE_LOCATION,\n 'Invalid breakpoint location - Invalid file line: $0.',\n [(string) $lineNumber]\n );\n return false;\n }\n\n return true;\n }", "public function hasWarnings()\n\t{\n\t\tif (empty($this->_warnings))\n\t\t\treturn False;\n\t\telse\n\t\t \treturn True;\n\t}", "function set_include_path(string $include_path): string\n{\n error_clear_last();\n $safeResult = \\set_include_path($include_path);\n if ($safeResult === false) {\n throw InfoException::createFromPhpError();\n }\n return $safeResult;\n}", "public function hasError();", "public function hasError();", "public function hasError();", "public function hasError();", "function myErrorHandler($errno, $errstr, $errfile, $errline)\n{\n if (strpos($errstr, 'deprecated') !== false) {\n return true;\n }\n\n return false;\n}", "public function testException() {\r\n\t\t$phpcheckstyle = $GLOBALS['PHPCheckstyle'];\r\n\r\n\t\t$phpcheckstyle->processFiles(array(\r\n\t\t\t'./test/sample/unterminated_comment.php'\r\n\t\t));\r\n\r\n\t\t$errorCounts = $phpcheckstyle->getErrorCounts();\r\n\r\n\t\t$this->assertEquals(1, $errorCounts['error'], 'We expect 1 error');\r\n\t\t$this->assertEquals(0, $errorCounts['ignore'], 'We expect 0 ignored checks');\r\n\t\t$this->assertEquals(0, $errorCounts['info'], 'We expect 0 info');\r\n\t\t$this->assertEquals(0, $errorCounts['warning'], 'We expect 0 warnings');\r\n\t}", "function myError($myFile, $myLine, $errorMsg)\n{\nif(defined('DEBUG') && DEBUG)\n{\n echo 'Error in file: <b> '.$myFile.' </b> on line: <b> '.$myLine.' </b>';\n echo 'Error message: <b> '.$errorMsg.'</b>';\n die();\n } else {\n echo ' Houston, we have a problem!';\n die();\n }\n \n \n}", "public function checkImportPrerequisites() {}", "private function backTraceError()\n {\n //Set up backtrace variables\n $backtraceStarted = null;\n $rawBacktrace = debug_backtrace();\n $cleanBacktrace = $backtraceSeparator = '';\n $i = 0;\n\n //Loop through the backtrace\n foreach ( $rawBacktrace as $a_key => $a_value )\n {\n //If a file or line is not set, skip this iteration\n if ( ! isset($a_value['file']) || ! isset($a_value['line']) )\n {\n continue;\n }\n\n //Start saving the backtrace from the file the error occurred in, skip the rest\n if ( ! isset($backtraceStarted) && basename($a_value['file']) != $this->failedOnFile )\n {\n continue;\n }\n else\n {\n $backtraceStarted = true;\n }\n\n //Add this file to the backtrace\n $cleanBacktrace .= $backtraceSeparator . basename($a_value['file']) . ' [' . $a_value['line'] . ']';\n\n //Set the separator for the next iteration\n $backtraceSeparator = ' < ';\n\n //Increment the counter\n $i ++;\n }\n\n //Return the backtrace\n return $cleanBacktrace;\n }", "private function warn($message) {\n $e = new Exception();\n array_push($this->errors, \"[DOLPHIN] Warning - $message - (\" . $e->getTraceAsString() . \")\");\n return false;\n }", "function myError($myFile, $myLine, $errorMsg)\n{\nif(defined('DEBUG') && DEBUG)\n{\n echo 'Error in file: <b> '.$myFile.' </b> on line: <b> '.$myLine.' </b>';\n echo 'Error message: <b> '.$errorMsg.'</b>';\n die();\n } else {\n echo ' Houston, we have a problem!';\n die();\n }\n}", "function myError($myFile, $myLine, $errorMsg)\n{\nif(defined('DEBUG') && DEBUG)\n{\n echo 'Error in file: <b> '.$myFile.' </b> on line: <b> '.$myLine.' </b>';\n echo 'Error message: <b> '.$errorMsg.'</b>';\n die();\n } else {\n echo ' Houston, we have a problem!';\n die();\n }\n}", "protected function detectMissingFiles() {}", "public function checkExtensions()\r\n\t{\r\n\t\treturn (strcasecmp(pathinfo($this->targetFile, PATHINFO_EXTENSION), pathinfo($this->referenceFile, PATHINFO_EXTENSION)) === 0);\r\n\t}", "function broken() { return TRUE; }", "function iconvErrorHandler($no, $msg, $file, $line){\n if ($no === E_NOTICE) {\n $this->hasError = true;\n }\n //return true;\n }", "function IncludePathFileExists($OldPath) \n{ \n\t$Paths = explode(\":\", ini_get(\"include_path\")); // get the server's configuration option \"include_path\"\n\t$Result = false; \n\t\n\twhile( (!($Result)) && (list($Key,$Value) = each($Paths)) ) \n\t{ \n\t\t$Result = file_exists($Value . \"/\" . $OldPath); \n\t} \n\t\n\treturn $Result;\n}", "public function hasError(): bool;", "public function hasError(): bool;", "protected function _checkConfirmUploadFile()\n\t{\n\t\tswitch ($this->_uploadedFile->getError()) {\n\t\t\tcase UPLOAD_ERR_OK:\n\t\t\t\tbreak;\n\t\t\tcase UPLOAD_ERR_NO_FILE:\n\t\t\t\tthrow new Exception('Empty File Upload ERROR!');\n\t\t\t\tbreak;\n\t\t\tcase UPLOAD_ERR_FORM_SIZE;\n\t\t\tcase UPLOAD_ERR_INI_SIZE;\n\t\t\t\tthrow new Exception('Too Large File Size ERROR!');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Exception('Something ERROR!');\n\t\t\t\tbreak;\n\t\t}\n\t}", "function myerror($myFile, $myLine, $errorMsg)\r\n{\r\n if(defined('DEBUG') && DEBUG)\r\n {\r\n echo \"Error in file: <b>\" . $myFile . \"</b> on line: <b>\" . $myLine . \"</b><br />\";\r\n echo \"Error Message: <b>\" . $errorMsg . \"</b><br />\";\r\n die();\r\n }else{\r\n\t\techo \"I'm sorry, we have encountered an error. Would you like to buy some socks?\";\r\n\t\tdie();\r\n }\r\n}", "public function requirements_errors() {\n\t\t$errors = $this->errors;\n\t\trequire_once( ET_CORE_DIR . 'templates/admin/errors/requirements-error.php' );\n\t}", "public static function checkPHPSyntax($filename, &$error_msg){\n $file_content = file_get_contents($filename);\n\n $check_code = \"return true; ?>\";\n $file_content = $check_code . $file_content . \"<?php \";\n\n try{\n if(!eval($file_content)) {\n $error_msg = \"Parse error in \".$filename;\n return false;\n }\n }catch (\\Error $e){\n $error_msg = $e->getMessage();\n return false;\n }\n return true;\n }", "function warning($message, array $context = array());", "protected function checkRequiremets () {\n\t\t// Check if `finfo_file()` function exists. File info extension is \n\t\t// presented from PHP 5.3+ by default, so this error probably never happened.\n\t\tif (!function_exists('finfo_file')) \n\t\t\treturn $this->handleUploadError(\n\t\t\t\tstatic::UPLOAD_ERR_NO_FILEINFO\n\t\t\t);\n\t\t\n\t\t// Check if mimetypes and extensions validator class\n\t\t$extToolsMimesExtsClass = static::MVCCORE_EXT_TOOLS_MIMES_EXTS_CLASS;\n\t\tif (!class_exists($extToolsMimesExtsClass)) \n\t\t\treturn $this->handleUploadError(\n\t\t\t\tstatic::UPLOAD_ERR_NO_MIMES_EXT\n\t\t\t);\n\n\t\t// Complete uploaded files temporary directory:\n\t\t$this->GetUploadsTmpDir();\n\t\t\n\t\treturn TRUE;\n\t}", "function ufclas_matlab_admin_notice_error(){\n\t?>\n <div class=\"notice notice-error\">\n <p><?php _e( 'There was an error importing. Please try again.', 'ufclas-matlab' ); ?></p>\n </div>\n <?php\n}", "protected function _error($tokenIndex) {\n\t\tif ($tokenIndex == 1) {\n\t\t\t$error = \"line: 1\\tNo file header found.\";\n\t\t\t$this->errors[] = \"\\t{:red}$error{:end}\";\n\t\t\treturn;\n\t\t}\n\n\t\t$error = '';\n\t\tswitch ($this->tokens[$tokenIndex][0]) {\n\t\t\tcase T_VARIABLE:\n\t\t\t\t$varname = $this->tokens[$tokenIndex][1];\n\t\t\t\t$error = \"line: {$this->tokens[$tokenIndex][2]}\\t$varname not documented.\";\n\t\t\t\tbreak;\n\t\t\tcase T_FUNCTION:\n\t\t\t\t$funcname = $this->tokens[$tokenIndex + 2][1];\n\t\t\t\t$error = \"line: {$this->tokens[$tokenIndex][2]}\\t$funcname() not documented.\";\n\t\t\t\tbreak;\n\t\t\tcase T_CLASS:\n\t\t\t\t$classname = $this->tokens[$tokenIndex + 2][1];\n\t\t\t\t$error = \"line: {$this->tokens[$tokenIndex][2]}\\tClass $classname not documented.\";\n\t\t\t\tbreak;\n\t\t}\n\t\t$this->errors[] = \"\\t{:red}$error{:end}\";\n\t}", "function flu_error($msg, $code, $back_offset = 1)\n{\n list($file, $line) = flu_error_orgin(1 + $back_offset);\n trigger_error(\"$msg in $file on line $line\", $code);\n}", "public static function suppressed(): bool\n {\n return @trigger_error('hello');\n }", "function composr_error_handler($errno, $errstr, $errfile, $errline)\n{\n if (((error_reporting() & $errno) !== 0) && (strpos($errstr, 'Illegal length modifier specified')/*Weird random error in dev PHP version*/ === false) || ($GLOBALS['DYING_BADLY'])) {\n // Strip down path for security\n if (substr(str_replace(DIRECTORY_SEPARATOR, '/', $errfile), 0, strlen(get_file_base() . '/')) == str_replace(DIRECTORY_SEPARATOR, '/', get_file_base() . '/')) {\n $errfile = substr($errfile, strlen(get_file_base() . '/'));\n }\n\n // Work out the error type\n if (!defined('E_RECOVERABLE_ERROR')) {\n define('E_RECOVERABLE_ERROR', 4096);\n }\n switch ($errno) {\n case E_RECOVERABLE_ERROR: // constant not defined in all php versions but we defined it\n case E_USER_ERROR:\n case E_PARSE:\n case E_CORE_ERROR:\n case E_COMPILE_ERROR:\n case E_ERROR:\n $type = 'error';\n $syslog_type = LOG_ERR;\n break;\n case -123: // Hacked in for the memtrack extension, which was buggy\n case E_CORE_WARNING:\n case E_COMPILE_WARNING:\n case E_USER_WARNING:\n case E_WARNING:\n $type = 'warning';\n $syslog_type = LOG_WARNING;\n break;\n case E_USER_NOTICE:\n case E_NOTICE:\n $type = 'notice';\n $syslog_type = LOG_NOTICE;\n break;\n //case E_STRICT: (constant not defined in all php versions)\n //case E_DEPRECATED: (constant not defined in all php versions)\n //case E_USER_DEPRECATED: (constant not defined in all php versions)\n default: // We don't know the error type, or we know it's incredibly minor, so it's probably best to continue - PHP will output it for staff or if display_php_errors is on\n return false;\n }\n\n $GLOBALS['DYING_BADLY'] = false; // So error suppress works again\n if (strpos($errstr, 'Allowed memory') !== false) {\n global $REQUIRED_CODE;\n if (!array_key_exists('failure', $REQUIRED_CODE)) {\n $php_error_label = $errstr . ' in ' . $errfile . ' on line ' . strval($errline) . ' @ ' . get_self_url_easy(true); // We really want to know the URL where this is happening (normal PHP error logging does not include it)!\n if ((function_exists('syslog')) && (GOOGLE_APPENGINE)) {\n syslog($syslog_type, $php_error_label);\n }\n if (php_function_allowed('error_log')) {\n @error_log('PHP ' . ucwords($type) . ': ' . $php_error_label, 0);\n }\n critical_error('EMERGENCY', $errstr . escape_html(' [' . $errfile . ' at ' . strval($errline) . ']'));\n }\n }\n require_code('failure');\n _composr_error_handler($type, $errno, $errstr, $errfile, $errline, $syslog_type);\n }\n\n return false;\n}", "public function isWarning()\n {\n return $this->getName() === 'warning';\n }", "public function formatInclude(){\r\n\t\tforeach($this->template as $k=>$v){\r\n\t\t\tif(preg_match('/{\\s+include ([\\w\\.]+)}/', $v, $matches)){\r\n\t\t\t\t$this->include_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Include format error: The blank is not allowed with \\'{\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{include ([\\w\\.]+)\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->include_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Include format error: The blank is not allowed with \\'}\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{include ([\\w\\.]+)}/', $v, $matches)){\r\n\t\t\t\tif(!file_exists($this->template_dir.'/'.\"$matches[1]\")){\r\n\t\t\t\t\t$debugPage = file_get_contents('debug.tpl');\r\n\t\t\t\t\t$debugPage = preg_replace('/error/', \"$matches[1]\".' is not exist!', $debugPage);\r\n\t\t\t\t\tfile_put_contents($this->compile_dir.'/'.md5('debug').'.php', $debugPage);\r\n\t\t\t\t\trequire $this->compile_dir.'/'.md5('debug').'.php';\r\n\t\t\t\t\texit;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function action_checkFilesExist()\n\t{\n\t\tglobal $incontext, $txt;\n\n\t\t$incontext['page_title'] = $txt['install_welcome'];\n\t\t$incontext['sub_template'] = 'welcome_message';\n\n\t\t$exist_files = array(\n\t\t\t'db_last_error.sample.txt' => 'db_last_error.txt',\n\t\t\t'Settings.sample.php' => 'Settings.php',\n\t\t\t'Settings_bak.sample.php' => 'Settings_bak.php'\n\t\t);\n\t\t$missing_files = array();\n\n\t\tforeach ($exist_files as $orig => $file)\n\t\t{\n\t\t\t// First thing (for convenience' sake) if they are not there yet,\n\t\t\t// try to rename Settings and Settings_bak and db_last_error\n\t\t\tif (!file_exists(TMP_BOARDDIR . '/' . $file))\n\t\t\t{\n\t\t\t\t// Silenced because the source file may or may not exist\n\t\t\t\t@rename(TMP_BOARDDIR . '/' . $orig, TMP_BOARDDIR . '/' . $file);\n\n\t\t\t\t// If it still doesn't exist, add it to the missing list\n\t\t\t\tif (!file_exists(TMP_BOARDDIR . '/' . $file))\n\t\t\t\t{\n\t\t\t\t\t$missing_files[$orig] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (empty($missing_files))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t$rename_array = array();\n\t\tforeach ($missing_files as $orig => $file)\n\t\t{\n\t\t\t$rename_array[] = '<li>' . $orig . ' => ' . $file . '</li>';\n\t\t}\n\n\t\t$incontext['error'] = sprintf($txt['error_settings_do_not_exist'], implode(', ', $missing_files), implode('', $rename_array));\n\n\t\t$incontext['retry'] = 1;\n\n\t\treturn false;\n\t}", "function check_file_error($file_error) {\nif ($file_error === 0) {\nreturn true;\n}else {\necho \"There is an error uploading the file\";\n}\n}", "function checkInstallationStatus() {\n global $configFile, $_PATHCONFIG;\n\n $result = @include_once'..'.$configFile;\n if ($result === false) {\n return false;\n } else {\n return (defined('CONTREXX_INSTALLED') && CONTREXX_INSTALLED);\n }\n }", "public function testIsVendorFileReturnsFalseIfFileThatIsReferencedByFileObjectIsNotLocatedInVendorDirectory()\n {\n $this->assertFalse(VendorResources::isVendorFile(new \\SplFileInfo(__FILE__)));\n }", "public function is_error()\n {\n }", "public function check_suspect_duplicate_file($data, &$error_message)\r\n\t{\r\n\t\t$error_list = $this->interface_customer_fulfillment_import_service->get_list_of_interface_record_in_suspect_mode($data);\r\n\r\n\t\tforeach ($error_list as $data)\r\n\t\t{\r\n\t\t\t$error_message .= \"Err with order_number = \" . $data->get_order_number() . \" & ext_sku = \" . $data->get_ext_sku() . \", record probably processed before with trans_id=\" . $data->get_trans_id() . \"\\n\";\r\n\t\t}\r\n\r\n\t\treturn $error_list;\r\n\t}", "private function hasXMLErrorOccured()\n {\n return (\\libxml_get_last_error() !== false);\n }", "function we_include_tag_file($name){\n\t$fn = 'we_tag_' . $name;\n\n\t// as default: all tag_functions are in this file.\n\tif(function_exists($fn)){\n\t\t// do noting\n\t\treturn true;\n\t}\n\tif(file_exists(WE_INCLUDES_PATH . 'we_tags/' . $fn . '.inc.php')){\n\t\trequire_once (WE_INCLUDES_PATH . 'we_tags/' . $fn . '.inc.php');\n\t\treturn true;\n\t}\n\t//error check is only required for custom tags\n\tif(file_exists(WE_INCLUDES_PATH . 'we_tags/custom_tags/' . $fn . '.inc.php')){\n\t\trequire_once (WE_INCLUDES_PATH . 'we_tags/custom_tags/' . $fn . '.inc.php');\n\t\treturn function_exists($fn) ? true : parseError(sprintf(g_l('parser', '[tag_not_known]'), trim($name)));\n\t}\n\n\t$toolinc = '';\n\tif(we_tool_lookup::getToolTag($name, $toolinc, true)){\n\t\trequire_once ($toolinc);\n\t\treturn function_exists($fn) ? true : parseError(sprintf(g_l('parser', '[tag_not_known]'), trim($name)));\n\t}\n\tif(strpos(trim($name), 'if') === 0){ // this ifTag does not exist\n\t\techo parseError(sprintf(g_l('parser', '[tag_not_known]'), trim($name)));\n\t\treturn false;\n\t}\n\treturn parseError(sprintf(g_l('parser', '[tag_not_known]'), trim($name)));\n}", "public static function missing() {\n\t\t// -- Construct the 404 error template path\n\t\t$file = APP_ROOT . 'errors' . DS . Error::$not_found . EXT_PHP;\n\n\t\t// -- Check if the 404 error template exists. \n\t\t// -- If it does, require it to the screen. \n\t\t// -- Otherwise, display a simple text message.\n\t\tif( file_exists( $file ) ) {\n\t\t\trequire_once $file;\n\t\t} else {\n\t\t\techo Error::$not_found . ' : Internal Error!';\n\t\t}\n\n\t\texit;\n\t}", "function template_ecl_warning_above ()\n{\n\tglobal $context;\n\n\techo '\n\t<div id=\"ecl_notification\">\n\t\t', $context['ecl_main_notice'], '\n\t</div>';\n}", "function errorlog_inCallerStack() {\r\n $functionStack = array_column( debug_backtrace(), 'function' );\r\n $inCallerStack = array_search('_errorlog_logErrorRecord', $functionStack) !== false;\r\n return $inCallerStack;\r\n}", "public function checkVersionsAndWarn() {\n\t\t//PHP\n\t\t$php = $this->checkPHPVersion();\n\t\tif ($php == self::VERSION_DEPRECATED) {\n\t\t\t$this->_alertEmail(\n\t\t\t\t'phpVersionCheckDeprecationEmail_' . self::PHP_DEPRECATING,\n\t\t\t\t__('PHP version too old', 'wordfence'),\n\t\t\t\tsprintf(__('Your site is using a PHP version (%s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of PHP 7.x or 5.6 but will currently support PHP versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), phpversion(), self::PHP_DEPRECATING) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_PHP))\n\t\t\t);\n\t\t\t\n\t\t\t$this->_adminNotice(\n\t\t\t\t'phpVersionCheckDeprecationNotice_' . self::PHP_DEPRECATING,\n\t\t\t\t'phpVersionCheck',\n\t\t\t\tsprintf(__('<strong>WARNING: </strong> Your site is using a PHP version (%s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of PHP 7.x or 5.6 but will currently support PHP versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), phpversion(), self::PHP_DEPRECATING) . ' <a href=\"' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_PHP) . '\" target=\"_blank\" rel=\"noopener noreferrer\">' . __('Learn More', 'wordfence') . '</a>'\n\t\t\t);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\telse if ($php == self::VERSION_UNSUPPORTED) {\n\t\t\t$this->_alertEmail(\n\t\t\t\t'phpVersionCheckUnsupportedEmail_' . self::PHP_MINIMUM,\n\t\t\t\t__('PHP version too old', 'wordfence'),\n\t\t\t\tsprintf(__('Your site is using a PHP version (%s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of PHP 7.x or 5.6 but will currently support PHP versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), phpversion(), self::PHP_DEPRECATING) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_PHP))\n\t\t\t);\n\t\t\t\n\t\t\t$this->_adminNotice(\n\t\t\t\t'phpVersionCheckUnsupportedNotice_' . self::PHP_MINIMUM,\n\t\t\t\t'phpVersionCheck',\n\t\t\t\tsprintf(__('<strong>WARNING: </strong> Your site is using a PHP version (%s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of PHP 7.x or 5.6 but will currently support PHP versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), phpversion(), self::PHP_DEPRECATING) . ' <a href=\"' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_PHP) . '\" target=\"_blank\" rel=\"noopener noreferrer\">' . __('Learn More', 'wordfence') . '</a>'\n\t\t\t);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\twfAdminNoticeQueue::removeAdminNotice(false, 'phpVersionCheck');\n\t\t}\n\t\t\n\t\t//OpenSSL\n\t\t$openssl = $this->checkOpenSSLVersion();\n\t\tif ($openssl == self::VERSION_DEPRECATED) {\n\t\t\t$this->_alertEmail(\n\t\t\t\t'opensslVersionCheckDeprecationEmail_' . self::OPENSSL_DEPRECATING,\n\t\t\t\t__('OpenSSL version too old', 'wordfence'),\n\t\t\t\tsprintf(__('Your site is using an OpenSSL version (%s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of OpenSSL but will currently support OpenSSL versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), self::openssl_make_text_version(), self::OPENSSL_DEPRECATING) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_OPENSSL))\n\t\t\t);\n\t\t\t\n\t\t\t$this->_adminNotice(\n\t\t\t\t'opensslVersionCheckDeprecationNotice_' . self::OPENSSL_DEPRECATING,\n\t\t\t\t'opensslVersionCheck',\n\t\t\t\tsprintf(__('<strong>WARNING: </strong> Your site is using an OpenSSL version (%s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of OpenSSL but will currently support OpenSSL versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), self::openssl_make_text_version(), self::OPENSSL_DEPRECATING) . ' <a href=\"' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_OPENSSL) . '\" target=\"_blank\" rel=\"noopener noreferrer\">' . __('Learn More', 'wordfence') . '</a>'\n\t\t\t);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\telse if ($openssl == self::VERSION_UNSUPPORTED) {\n\t\t\t$this->_alertEmail(\n\t\t\t\t'opensslVersionCheckUnsupportedEmail_' . self::PHP_MINIMUM,\n\t\t\t\t__('OpenSSL version too old', 'wordfence'),\n\t\t\t\tsprintf(__('Your site is using an OpenSSL version (%s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of OpenSSL but will currently support OpenSSL versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), self::openssl_make_text_version(), self::OPENSSL_DEPRECATING) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_OPENSSL))\n\t\t\t);\n\t\t\t\n\t\t\t$this->_adminNotice(\n\t\t\t\t'opensslVersionCheckUnsupportedNotice_' . self::PHP_MINIMUM,\n\t\t\t\t'opensslVersionCheck',\n\t\t\t\tsprintf(__('<strong>WARNING: </strong> Your site is using an OpenSSL version (%s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of OpenSSL but will currently support OpenSSL versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), self::openssl_make_text_version(), self::OPENSSL_DEPRECATING) . ' <a href=\"' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_OPENSSL) . '\" target=\"_blank\" rel=\"noopener noreferrer\">' . __('Learn More', 'wordfence') . '</a>'\n\t\t\t);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\twfAdminNoticeQueue::removeAdminNotice(false, 'opensslVersionCheck');\n\t\t}\n\t\t\n\t\t//WordPress\n\t\t$wordpress = $this->checkWordPressVersion();\n\t\tif ($wordpress == self::VERSION_DEPRECATED) {\n\t\t\trequire(ABSPATH . 'wp-includes/version.php'); /** @var string $wp_version */\n\t\t\t\n\t\t\t$this->_alertEmail(\n\t\t\t\t'wordpressVersionCheckDeprecationEmail_' . self::WORDPRESS_DEPRECATING,\n\t\t\t\t__('WordPress version too old', 'wordfence'),\n\t\t\t\tsprintf(__('Your site is using a WordPress version (%s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of WordPress but will currently support WordPress versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), $wp_version, self::WORDPRESS_DEPRECATING) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_WORDPRESS))\n\t\t\t);\n\t\t\t\n\t\t\t$this->_adminNotice(\n\t\t\t\t'wordpressVersionCheckDeprecationNotice_' . self::WORDPRESS_DEPRECATING,\n\t\t\t\t'wordpressVersionCheck',\n\t\t\t\tsprintf(__('<strong>WARNING: </strong> Your site is using a WordPress version (%s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of WordPress but will currently support WordPress versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), $wp_version, self::WORDPRESS_DEPRECATING) . ' <a href=\"' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_WORDPRESS) . '\" target=\"_blank\" rel=\"noopener noreferrer\">' . __('Learn More', 'wordfence') . '</a>'\n\t\t\t);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\telse if ($wordpress == self::VERSION_UNSUPPORTED) {\n\t\t\trequire(ABSPATH . 'wp-includes/version.php'); /** @var string $wp_version */\n\t\t\t\n\t\t\t$this->_alertEmail(\n\t\t\t\t'wordpressVersionCheckUnsupportedEmail_' . self::WORDPRESS_MINIMUM,\n\t\t\t\t__('WordPress version too old', 'wordfence'),\n\t\t\t\tsprintf(__('Your site is using a WordPress version (%s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of WordPress but will currently support WordPress versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), $wp_version, self::WORDPRESS_DEPRECATING) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_WORDPRESS))\n\t\t\t);\n\t\t\t\n\t\t\t$this->_adminNotice(\n\t\t\t\t'wordpressVersionCheckUnsupportedNotice_' . self::WORDPRESS_MINIMUM,\n\t\t\t\t'wordpressVersionCheck',\n\t\t\t\tsprintf(__('<strong>WARNING: </strong> Your site is using a WordPress version (%s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of WordPress but will currently support WordPress versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), $wp_version, self::WORDPRESS_DEPRECATING) . ' <a href=\"' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_WORDPRESS) . '\" target=\"_blank\" rel=\"noopener noreferrer\">' . __('Learn More', 'wordfence') . '</a>'\n\t\t\t);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\twfAdminNoticeQueue::removeAdminNotice(false, 'wordpressVersionCheck');\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public static function warning()\n {\n static::returnCode(static::CODE_WARNING);\n }", "function warning($message);", "public function wrongTypeFile()\n {\n return 'This type of file is not allowed';\n }", "public function errorToMessage() {\n\t\t if($_FILES[$this->fileName]['error'] == 3) {\n\t\t\tif (file_exists($this->imgRoot . $_FILES[$this->fileName]['name'])) {\n\t\t\t\t//Remove the wrong file that is not completed.\n\t\t\t\tunlink($this->imgRoot . $_FILES[$this->fileName]['name']);\n\t\t\t}\t\n\t\t\treturn self::$ErrorUPLOAD_ERR_NO_TMP_DIR;\n\t\t }\n\t\t\t// error message 2 & 3 for the file is big or the file length is bigger than is php ini supported.\n\t else if($_FILES[$this->fileName]['error'] == 2 || $_FILES[$this->fileName]['error'] == 1) {\n\t\t\t\treturn self::$ErrorUPLOAD_ERR_FORM_SIZE;\n\t\t\t}\n\t\t\t// error file 4 is that the user trying to upload widthout file.\n\t else if($_FILES[$this->fileName]['error'] == 4) {\n\t\t \treturn self::$ErrorUPLOAD_ERR_NO_FILE;\n\t\t }\n\t\n \t}", "function show_error ()\n {\n global $errormessage;\n global $lang;\n global $ts_template;\n if (!empty ($errormessage))\n {\n eval ($ts_template['show_error']);\n }\n\n }", "function wmf_redirect_template_warning_notice() {\n\t$screen = get_current_screen();\n\tif ( ! isset( $screen ) ) {\n\t\treturn;\n\t}\n\n\tif ( 'edit' !== $screen->parent_base || 'page' !== $screen->post_type ) {\n\t\treturn;\n\t}\n\n\tif ( ! wmf_is_redirect_template_page( get_the_ID() ) ) {\n\t\treturn;\n\t}\n\n\t?>\n\t<div class=\"notice notice-warning\">\n\t\t<p>\n\t\t\t<?php esc_html_e( 'This page is using the \"Redirect Page\" page template.', 'shiro-admin' ); ?>\n\t\t\t<?php esc_html_e( 'It will redirect to the newest child page which declares this page as its parent.', 'shiro-admin' ); ?>\n\t\t\t<?php esc_html_e( 'Change the template if you wish to edit this page directly.', 'shiro-admin' ); ?>\n\t\t</p>\n\t</div>\n\t<?php\n}", "private function getInitialErrors()\n\t{\n\t\t$errors = [];\n\n\t\t// Make sure our file doesn't exist (unless we're appending)\n\t\tif(file_exists($this->config['file']) && ! $this->append)\n\t\t{\n\t\t\t$errors[] = 'File exists';\n\t\t}\n\n\t\t// Create our file\n\t\tif( ! touch($this->config['file']))\n\t\t{\n\t\t\t$errors[] = 'Could not create file';\n\t\t}\n\n\t\t// Make sure we can write to our file\n\t\tif( ! is_writable($this->config['file']))\n\t\t{\n\t\t\t$errors[] = 'Cannot write to file';\n\t\t}\n\n\t\treturn empty($errors) ? false : $errors;\n\t}", "function admin_critical_warnings_present() {\n global $SESSION;\n\n if (!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {\n return 0;\n }\n\n if (!isset($SESSION->admin_critical_warning)) {\n $SESSION->admin_critical_warning = 0;\n if (ini_get_bool('register_globals')) {\n $SESSION->admin_critical_warning = 1;\n } else if (is_dataroot_insecure(true) === INSECURE_DATAROOT_ERROR) {\n $SESSION->admin_critical_warning = 1;\n }\n }\n\n return $SESSION->admin_critical_warning;\n}", "private function checkRequirements()\n {\n if (!function_exists('mime_content_type') && !function_exists('finfo_file') && version_compare(PHP_VERSION, '5.3.0') < 0){\n add_action('admin_notices', array($this, 'displayFunctionMissingNotice'));\n return TRUE;\n }\n return TRUE;\n }", "function get_error_message()\n {\n if ( is_object($this->__mime)\n && is_a($this->__mime, 'pear_error'))\n {\n return $this->__mime->getMessage();\n }\n return false;\n }", "function tideways_last_fatal_error()\n{\n}", "public function message()\n {\n return 'Must upload file.';\n }", "function care_template_include( $templatepath ) {\n\t$loc = __FUNCTION__;\n\terror_log( \"$loc-->template path= $templatepath\" );\n\t$GLOBALS['care_current_theme_template'] = basename( $templatepath );\n return $templatepath;\n}", "function checkWarnings(){ \n $this->warnings = array();\n if ($this->feedwater->massFlow>0){\n if ($this->outletSteam->phase<>'Gas' and $this->outletSteam->quality<>1){\n $this->warnings[] = \"Outlet Steam Contains Condensate\";\n }\n if ($this->fuelEnergy<0){\n $this->warnings[] = \"Boiler Using Negative Energy\";\n }\n }\n if ($this->feedwater->massFlow<0){\n $this->warnings[] = \"Steam Flow Negative\";\n }\n return count($this->warnings);\n }", "function notSoFatalError($errStr, $options = array()){\n\t\t$image_dir = (empty($this->image_dir) ? \"\" : $this->image_dir);\n\t\tif (!empty($this->error_function)){\n\t\t\t$errf = $this->error_function;\n\t\t\t$errf(\"[base class]: $errStr\");\n\t\t} else {\n\t\t\t$tittel = \"Følgende feil oppstod:\";\n\t\t\tif (isset($options['customHeader'])) $tittel = $options['customHeader'];\n\t\t\t$errm = \"\n\t\t\t\t<div class='errorMessage' style=\\\"border: 1px solid #FF0000; color: #FF0000; background: url(\".$image_dir.\"warning2.gif) no-repeat #FFFFFF; padding: 10px 10px 10px 70px; margin: 5px;\\\">\n\t\t\t\t\t<strong style='padding-top:8px; padding-bottom:3px; display: block;'>$tittel</strong>\n\t\t\t\t\t$errStr\n\t\t\t\t\t<br />&nbsp;\n\t\t\t\t</div>\n\t\t\t\";\n\t\t\tif (isset($options['logError'])) $logError = ($options['logError'] == true);\n\t\t\telse $logError = true;\n\t\t\tif ($logError) $this->addToErrorLog($errStr);\n\t\t\tif (isset($options['print'])) \n\t\t\t\tprint $errm;\n\t\t\telse \n\t\t\t\treturn $errm;\n\t\t}\n\t}", "static function handleError($eLevel,$eStr,$eFile,$eLine){\n\t\tif(ini_get('error_reporting') == 0){# @ Error control operator used\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$code = self::getLine($eFile,$eLine);\n\t\t$eFile = preg_replace('@'.PU.'@','',$eFile);\n\t\t$eFile = preg_replace('@'.PR.'@','',$eFile);\n\t\t$err = \"+=+=+=+ \".date(\"Y-m-d H:i:s\").' | '.Config::$x['instanceName'].\" | ERROR | \".self::abbreviateFilePath($eFile).\":$eLine +=+=+=+\\n$eStr\\n\";\n\t\t\n\t\tif(Config::$x['errorDetail'] > 0){\n\t\t\t$bTrace = debug_backtrace();\n\t\t\t\n\t\t\t//php has some odd backtracing so need various conditions to remove excessive data\n\t\t\tif($bTrace[0]['file'] == '' && $bTrace[0]['class'] == 'Debug'){\n\t\t\t\tarray_shift($bTrace);\n\t\t\t}\n\t\t\t\n\t\t\tif(Config::$x['debugAssumePerfection']){\n\t\t\t\t//Exclude system files (presume they are errorless)\n\t\t\t\tforeach($bTrace as $k=>$v){\n\t\t\t\t\tif(preg_match('@'.Config::$x['systemFolder'].'@',$v['file'])){\n\t\t\t\t\t\t$systemFileFound = true;\n\t\t\t\t\t\tarray_shift($bTrace);\n\t\t\t\t\t\tif($nullFileFound){\n\t\t\t\t\t\t\tarray_shift($bTrace);\n\t\t\t\t\t\t}\n\t\t\t\t\t}elseif($systemFileFound && !$v['file']){\n\t\t\t\t\t\t$nullFileFound = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach($bTrace as $v){\n\t\t\t\t$err .= \"\\n\".'(-'.$v['line'].'-) '.self::abbreviateFilePath($v['file']).\"\\n\";\n\t\t\t\t$code = self::getLine($v['file'],$v['line']);\n\t\t\t\tif($v['class']){\n\t\t\t\t\t$err .= \"\\t\".'Class: '.$v['class'].$v['type'].\"\\n\";\n\t\t\t\t}\n\t\t\t\t$err .= \"\\t\".'Function: '.$v['function'].\"\\n\";\n\t\t\t\tif($code){\n\t\t\t\t\t$err .= \"\\t\".'Line: '.$code.\"\\n\";\n\t\t\t\t}\n\t\t\t\tif($v['args'] && Config::$x['errorDetail'] > 1){\n\t\t\t\t\t$err .= \"\\t\".'Arguments: '.\"\\n\";\n\t\t\t\t\tob_start();\n\t\t\t\t\tvar_export($v['args']);\n\t\t\t\t\t$err .= preg_replace(\n\t\t\t\t\t\t\tarray(\"@^array \\(\\n@\",\"@\\n\\)$@\",\"@\\n@\"),\n\t\t\t\t\t\t\tarray(\"\\t\\t\",'',\"\\n\\t\\t\"),\n\t\t\t\t\t\t\tob_get_clean()).\"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Config::$x['errorDetail'] > 2){\n\t\t\t\t$err.= \"\\nServer Var:\\n:\".var_export($_SERVER,1);\n\t\t\t\t$err.= \"\\nRequest-----\\nUri:\".$_SERVER['REQUEST_URI'].\"\\nVar:\".var_export($_REQUEST,1);\n\t\t\t\t$err.= \"\\n\\nFile includes:\\n\".var_export(Files::getIncluded(),1);\n\t\t\t}\n\t\t\t$err.= \"\\n\";\n\t\t}\n\t\t\n\t\t$file = Config::$x['logLocation'];\n\t\tif(!file_exists($file) || filesize($file)>Tool::byteSize(Config::$x['maxLogSize'])){\n\t\t\t$mode = 'w';\n\t\t}else{\n\t\t\t$mode = 'a+';\n\t\t}\n\t\t$fh = fopen($file,$mode);\n\t\tfwrite($fh,$err);\n\t\t\n\t\tif(Config::$x['errorPage']){\n\t\t\tConfig::loadUserFiles(Config::$x['errorPage']);\n\t\t}elseif(Config::$x['errorMessage']){\n\t\t\tif(is_array(Config::$x['errorMessage'])){\n\t\t\t\t$message = Config::$x['errorMessage'][rand(0,count(Config::$x['errorMessage'])-1)];\n\t\t\t}else{\n\t\t\t\t$message = Config::$x['errorMessage'];\n\t\t\t}\n\t\t\techo $message;\n\t\t}\n\t\tif(Config::$x['displayErrors']){\n\t\t\tself::sendout($err);\n\t\t}\n\t\texit;\n\t\t\n\t}", "public function getMissingDbWarning()\n {\n $warning = '';\n if (!$this->checkDatabaseFile()) {\n $warning = $this->__('Hycube GeoIP extension: GeoIP.dat file is missing. Please, update the GeoIP database.');\n }\n\n return $warning;\n }", "public function warning(string $text);", "function _fatal($errno, $errmsg, $filename, $linenum, $vars)\n {\n if ($errno == E_STRICT) {\n return false;\n }\n\n $fatal = array(E_ERROR,\n E_PARSE,\n E_CORE_ERROR,\n E_COMPILE_ERROR,\n E_USER_ERROR);\n\n if (in_array($errno, $fatal)) {\n $code = OUT_STDOUT | OUT_LOG | EX_UNAVAILABLE;\n $msg = 'CRITICAL: You hit a fatal bug in the mail filter: ' . $errmsg;\n } else {\n $code = 0;\n $msg = 'PHP Error: ' . $errmsg;\n }\n\n $error = new \\PEAR_Error($msg, $code);\n $this->_handle($error);\n\n return false;\n }", "function myerror($myFile, $myLine, $errorMsg)\n{\n if(defined('DEBUG') && DEBUG)\n {\n echo \"Error in file: <b>\" . $myFile . \"</b> on line: <b>\" . $myLine . \"</b><br />\";\n echo \"Error Message: <b>\" . $errorMsg . \"</b><br />\";\n die();\n }else{\n\t\techo \"I'm sorry, we have encountered an error. Would you like to buy some socks?\";\n\t\tdie();\n }\n}", "function myerror($myFile, $myLine, $errorMsg)\n{\n if(defined('DEBUG') && DEBUG)\n {\n echo \"Error in file: <b>\" . $myFile . \"</b> on line: <b>\" . $myLine . \"</b><br />\";\n echo \"Error Message: <b>\" . $errorMsg . \"</b><br />\";\n die();\n }else{\n\t\techo \"I'm sorry, we have encountered an error. Would you like to buy some socks?\";\n\t\tdie();\n }\n}", "protected function warning()\n {\n return $this->warn(\"You have no commands to run !\");\n }", "static public function IncludeFile($fileName)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// if file does not exist, then an exception would be generated\r\n\t\t\tif (! file_exists ( Site::$m_indexRoot . $fileName ))\r\n\t\t\t{\r\n\t\t\t\t// if class ExceptionMissFile exist the generate it's instance\r\n\t\t\t\tif (class_exists ( 'ExceptionMissFile' ))\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new ExceptionMissFile ( $fileName, $fileName );\r\n\t\t\t\t}\r\n\t\t\t\t// generates regular exception\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception ( $fileName );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn include_once Site::$m_indexRoot . $fileName;\r\n\t\t}\r\n\t\tcatch ( Exception $e )\r\n\t\t{\r\n\t\t\tprint (\"The missed file: \" . $e->getMessage () . \"<br />\\n\") ;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "protected static function checkFileinfoExtension()\n {\n // Make sure that the \"fileinfo\" extension is loaded/enabled\n if (!extension_loaded('fileinfo')) {\n throw new RuntimeException('Required \"fileinfo\" extension not loaded');\n }\n }", "public function displayFunctionMissingNotice()\n {\n $currentUser = wp_get_current_user();\n if (!get_user_meta($currentUser->ID, 'AssignmentAttachmentIgnoreNag') && current_user_can('install_plugins')){\n $this->displayAdminError((sprintf(\n __('Regarding WPLMS Assignments Upload Assignment Functionality : It seems like your PHP installation is missing \"mime_content_type\" or \"finfo_file\" functions which are crucial '.\n 'for detecting file types of uploaded attachments. Please update your PHP installation OR be very careful with allowed file types, so '.\n 'intruders won\\'t be able to upload dangerous code to your website! | <a href=\"%1$s\">Hide Notice</a>','wplms-assignments'), '?AssignmentAttachmentIgnoreNag=1')), 'updated');\n }\n }", "function errorInfo($p_full = \\false)\n {\n }", "public static function twig_files_not_found_notification() {\n\t\techo '<div class=\"error\"><p><b>Warning:</b> TwigPress cannot find the Twig autoloader.php file. This is required!</p></div>';\n\t}" ]
[ "0.59897447", "0.58843595", "0.58781743", "0.5702138", "0.56243175", "0.5583711", "0.5367599", "0.5357272", "0.5339168", "0.5324316", "0.53085685", "0.52843356", "0.5236822", "0.5211165", "0.52100885", "0.51961493", "0.5192927", "0.51896095", "0.51565886", "0.513116", "0.5119174", "0.51084733", "0.51052415", "0.5096863", "0.50796425", "0.50775963", "0.5070491", "0.50699365", "0.5059499", "0.5039675", "0.5039675", "0.5039675", "0.5039675", "0.5034302", "0.5031887", "0.50253564", "0.50171405", "0.501508", "0.50100195", "0.49983835", "0.49983835", "0.49769628", "0.49595308", "0.49559778", "0.49404955", "0.4937233", "0.49234515", "0.49234515", "0.49224612", "0.49215263", "0.49194846", "0.49188", "0.49121726", "0.4908274", "0.48992974", "0.48946902", "0.4893178", "0.48927185", "0.48824164", "0.48799497", "0.48778564", "0.4877755", "0.48775342", "0.48764905", "0.48736927", "0.48696244", "0.48599532", "0.48534325", "0.48461434", "0.48405886", "0.4836346", "0.48356465", "0.48346904", "0.4831378", "0.48293582", "0.48244274", "0.4816837", "0.48093602", "0.47921553", "0.47868246", "0.47854814", "0.47853553", "0.47833884", "0.47783226", "0.477351", "0.47691375", "0.47628644", "0.47579628", "0.4752662", "0.47526518", "0.47505957", "0.47504964", "0.47497633", "0.47497633", "0.47489926", "0.47483504", "0.47460645", "0.47427964", "0.47382268", "0.47359908" ]
0.6660301
0
Handles a PHP error
public function handle($code, $message) { if (false === $this->shouldSwallow($code)) { return false; } return $this->isOwnFileIncludeWarning($message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle_errors() {\n\t\t//error_reporting(E_ALL ^ E_STRICT | E_WARNING | E_DEPRECATED | E_ERROR | E_PARSE); //E_STRICT disabled\n\t\terror_reporting(E_WARNING | E_ERROR | E_PARSE);\n\t\tset_error_handler([$this, 'php_error_handler']);\n\t}", "function rest_error_handler($errno, $errstr, $errfile, $errline)\r\n{\r\n\t$message = 'Unhandled php error';\r\n\t$debug = '';\r\n\tglobal $CI;\r\n\tif (DEBUG_MODE) {\r\n\t\t$debug = $errstr . \" @ $errfile @ $errline\";\r\n\t\t$CI->rest_show_error ( 'php-' . $errno, $message . \"\\n<br/>\" . $debug, TRUE );\r\n\t} else {\r\n\t\t$CI->rest_show_error ( 'php-' . $errno );\r\n\t}\r\n\treturn FALSE;\r\n}", "abstract public function handleFatalError($e);", "abstract protected function handleError(\\Exception $e);", "function fatalErrorHandler() {\n global $cfg;\n $error = error_get_last();\n if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)){\n header(\"HTTP/1.1 500 Server Error\");\n readfile($cfg['source_root'] . \"/500.html\");\n //error_log(print_r($error, true));\n //error_log(print_r(debug_backtrace(), true));\n exit();\n }\n/*\n if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)){\n $_SESSION['error'] = $error;\n header(\"Location:\".$cfg['root'].\"exception/\");\n exit;\n }\n*/\n}", "public function handle(\\Exception $error);", "function error(){}", "abstract public function error();", "public function error();", "function errorHandler($errno,$errstr){\n\t global $errors;\n\n\t raiseError(\"We are working to solve an internal issue in our service. Please, try later.\", Constants::HTTP_INTERNAL_SERVER_ERROR);\n\t}", "function as_error_handler($errno, $errstr, $errfile, $errline){\n\t\t$msg = 'Error('.$errno.') '.$errstr.' in '. $errfile.':'. $errline;\n\t\t$this->catch_error( $msg, 'clickgs plugin crashed');\n\t}", "public function _errorHandler($errno,$errstr) {\n $this->_phpErrorStr = $errstr;\n }", "public function handle_error() {\n $last_operation = $this->add_last_operation;\n $data = array(\n 'function_name' => is_array($last_operation[0]) ? $last_operation[0][1] : $last_operation[0],\n 'function_name_complete' => is_array($last_operation[0]) ? (is_string($last_operation[0][0]) ? $last_operation[0][0].':' : get_class($last_operation[0][0]).'->').$last_operation[0][1] : $last_operation[0],\n 'args' => $last_operation[1]\n );\n\n switch (strtolower($data['function_name'])) {\n case 'autoexecute':\n $data['table'] = $data['args'][0];\n $data['fields'] = $data['args'][1];\n $data['operation'] = $data['args'][2];\n break;\n }\n\n $data['debug'] = $last_operation;\n if (class_exists('e_database'))\n throw new e_database($this->adodb->ErrorMsg(),$data,$this->adodb->ErrorNo());\n else\n throw new Exception($this->adodb->ErrorMsg(),$this->adodb->ErrorNo());\n }", "function handleError($error_level,$error_message,$error_file,$error_line,$error_context)\n{\n}", "function handlePhpError($errno = null, $errmsg, $filename, $linenum, $vars) {\n\t\t\n\t $dt = date(\"Y-m-d H:i:s (T)\");\n\t \n\t // set of errors for which a var trace will be saved\n\t\t//$user_errors = array(E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, E_STRICT);\n\t \n\t\t$err = \"<errorentry>\\n\";\n\t\t$err .= \"\\t<datetime>\" . $dt . \"</datetime>\\n\";\n\t\t$err .= \"\\t<errornum>\" . $errno . \"</errornum>\\n\";\n\t\t$err .= \"\\t<errormsg>\" . $errmsg . \"</errormsg>\\n\";\n\t\t$err .= \"\\t<scriptname>\" . $filename . \"</scriptname>\\n\";\n\t\t$err .= \"\\t<scriptlinenum>\" . $linenum . \"</scriptlinenum>\\n\";\n\t\n\t\t//if (in_array($errno, $user_errors)) {\n\t\t//\t$err .= \"\\t<vartrace>\" . wddx_serialize_value($vars, \"Variables\") . \"</vartrace>\\n\";\n\t\t//}\n\t\t\n\t\t$err .= \"</errorentry>\\n\\n\";\n\t \n\t $this->debug( $err );\n\t}", "public function errorOccured();", "function errorHandler($message, $code){\n echo '{\"errors\":\"'.$message.'\"}';\n http_response_code($code);\n return false;\n }", "function fatal_error_handler() {\n $last_error = error_get_last();\n $this->logger->error($last_error);\n if ($last_error['type'] === E_ERROR) {\n header('Location: '.$this->fallback);\n exit;\n }\n }", "public function fatal_handler()\n {\n $error = error_get_last();\n\n if ($error !== null && is_array($error) && $error['type'] == E_ERROR)\n {\n $settings = require CODE_ROOT . '/src/settings.php';\n $app = new \\Slim\\App($settings);\n\n require CODE_ROOT . '/src/dependencies.php';\n\n $view = $app->getContainer()->get('view');\n\n $logger = $app->getContainer()->get('logger');\n $logger->emergency('An unrecoverable error has ocurred!', $error);\n\n echo $view->fetch('error.twig');\n }\n\n exit;\n }", "function error_handler ($errnor, $errstr, $errfile, $errline) {\n // is blocking their being caught. For now, suppress the PHP error\n // so as to match the missing HPHP one.\n //echo \"error handler<<<\\n\";\n //var_dump($errnor, $errstr, $errfile, $errline) ;\n //echo \">>>\\n\";\n return true;\n}", "function exception_error_handler() {\n header('HTTP/1.1 500 Internal Server Error');\n if(is_file(__DIR__.'/../html/500.html'))\n {\n require(__DIR__.'/../html/404.html');\n } else {\n ?>\n <h1>Something goofed really hard</h1>\n <p>We're working on it, sit tight</p>\n <?php\n }\n // I'll just leave this here for debug purposes.\n //throw new ErrorException($errstr, $errno, 0, $errfile, $errline);\n}", "function customError($errno, $errstr)\n {\n $_SESSION['err_msg'] = \"<b>Error:</b> [$errno] $errstr<br />\"; \n header(\"location: ../_php_fail.php\");\n die();\n }", "function handleError()\n{\n\tglobal $g_error_msg, $g_debug_msg;\n\tinclude_once(atkconfig('atkroot'). 'atk/errors/class.atkerrorhandlerbase.inc');\n\t$errorHandlers = atkconfig('error_handlers', array('mail'=>array('mailto' => atkconfig('mailreport'))));\n\tforeach ($errorHandlers as $key => $value)\n\t{\n\t\tif (is_numeric($key))\n\t\t$key = $value;\n\t\t$errorHandlerObject = atkErrorHandlerBase::get($key, $value);\n\t\t$errorHandlerObject->handle($g_error_msg, $g_debug_msg);\n\t}\n}", "function handle_error($errno, $error){\r\n $res = new Result('array');\r\n $res->error_number = $errno;\r\n $res->error_desc = $error;\r\n $res->print_result();\r\n Logger::close();\r\n die;\r\n}", "function error_handler($errno, $string, $file, $line, $context) {\n throw new Trails_Exception(500, $string);\n }", "function handleError($errorNo, $message, $filename, $lineNo) {\r\n\tif (error_reporting() != 0) {\r\n\t\t$type = 'error';\r\n\t\tswitch ($errorNo) {\r\n\t\t\tcase 2: $type = 'warning';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8: $type = 'notice';\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tthrow new SystemException('PHP '.$type.' in file '.$filename.' ('.$lineNo.'): '.$message, 0);\r\n\t}\r\n}", "function my_error($msg) {\n\theader('HTTP/1.1 500 Internal Server Error');\n\ttrigger_error($msg,E_USER_ERROR);\n}", "function handle_error($exception) {\n try {\n print $this->encode(array(\n 'error' => $exception->getMessage(),\n 'message' => $exception->getMessage(), // Should be a i18n end user message\n 'data' => @$exception->data,\n 'status' => @$exception->status\n ));\n } catch(Exception $e) {\n echo 'Error: '.$e->getmessage();\n }\n }", "function handler(Error $error)\n {\n }", "function api_err_handler($buffer) {\n if (!empty($GLOBALS['api_fn_complete'])) return '';\n return api_error(-32000, \"Unexpected error\", $buffer, $GLOBALS['api_req']['id']);\n}", "function error_handler ($errno, $error, $file, $line)\r\n{\r\n\tthrow new Error ($error . sprintf (' (%s %u)', $file, $line));\r\n}", "function error500($html = \"\")\n{\n header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error');\n exit();\n}", "function ErrorHandler($error_level, $error_message, $error_file, $error_line)\n{\n\theader('HTTP/1.1 500 Internal Server Error');\n\tob_get_clean();\n\techo '<div style=\"background: #f1f1f1;padding: 20px;\">';\n\techo '<h3 style=\"margin-left:30px\">Ops there a Error</h3>';\n\techo '<b style=\"margin-left:30px\">Error:</b> ' . $error_message . '<br>';\n\techo '<b style=\"margin-left:30px\">Level:</b> ' . $error_level . '<br>';\n\techo '<b style=\"margin-left:30px\">File:</b> ' . $error_file . '<br>';\n\techo '<b style=\"margin-left:30px\">Line:</b> ' . $error_line . '<br>';\n\techo '<b style=\"margin-left:30px\">PHP:</b> ' . PHP_VERSION . ' (' . PHP_OS . ')<br>';\n\techo '</div>';\n\tdie();\n}", "protected function callError($message) {\n if ($this->quit_on_error) {\n header('HTTP/1.0 500 Internal Server Error');\n echo(\"<h3>A system error occured, Please try again later.</h3>\");\n if ($this->debug)\n echo (\"<br>Crash Information:<br><p style=\\\"font-family: monospace;\\\">\" . $message . \"</p>\");\n exit();\n } else {\n $this->error_handler($message);\n }\n }", "private static function handleError($sql)\n\t{\n\t\t\n\t\t/*\n\t\tif(some condition ie. \"on development server\")\n\t\t{\n\t\t\techo '<div style=\"font-weight:bold; white-space:pre; border:1px dashed red;\"><span style=\"color:blue;\">' . $sql . '</span><br/>gave an error of: <span style=\"color:red;\">' . self::$link->error . '</span></div>';\n\t\t}\n\t\t*/\n\t\t\n\t\tlog_error($sql);\n\t}", "function error( $error, $code = '500' ) {\n\t \n\t if ( is_object( $error ) && method_exists( $error, 'get_message' ) ) {\n\t $error = $error->get_message();\n\t }\n\t\n\t\thttp_response_code( $code );\n\t\tdie( $error );\n\t\treturn false;\n\n\t}", "function handleError($message) {\r\n var_dump($message);\r\n}", "function debug_error_handler($errno,$errstr,$errfile,$errline){\r\n if (!(error_reporting() & $errno)) {\r\n // This error code is not included in error_reporting, so let it fall\r\n // through to the standard PHP error handler\r\n return false;\r\n }\r\n\r\n switch ($errno) {\r\n case E_USER_ERROR:\r\n echo \"<b>My ERROR</b> [$errno] $errstr<br />\\n\";\r\n echo \" Fatal error on line $errline in file $errfile\";\r\n echo \", PHP \" . PHP_VERSION . \" (\" . PHP_OS . \")<br />\\n\";\r\n echo \"Aborting...<br />\\n\";\r\n exit(1);\r\n break;\r\n\r\n case E_USER_WARNING:\r\n echo \"<b>My WARNING</b> [$errno] $errstr<br />\\n\";\r\n break;\r\n\r\n case E_USER_NOTICE:\r\n echo \"<b>My NOTICE</b> [$errno] $errstr<br />\\n\";\r\n break;\r\n\r\n default:\r\n //echo \"System generated error: [$errno] $errstr<br />\\n\";\r\n return false;\r\n break;\r\n }\r\n /* Don't execute PHP internal error handler */\r\n return true;\r\n}", "protected function error()\n {\n $this->response = $this->response->withStatus(500);\n $this->jsonBody([\n 'input' => $this->payload->getInput(),\n 'error' => $this->payload->getOutput(),\n ]);\n }", "function error($msg)\n{\n header('HTTP/1.1 500 ' . $msg);\n die($msg);\n}", "public static function fatal_error_handler($buffer)\n {\n $error = error_get_last();\n $output = NULL;\n \n // this should never happen, but if $error isn't an array, return false\n if (!is_array($error)) return false;\n\t\t\n // The above comment is not quite true. This function is used as\n // callback for ob_start, which means it's an output processor function.\n // error_get_last() returning non-array means that no error has occurred,\n // and we should return false, specifying that we don't want to modify\n // the ob contents before sending to client.\n\n // We have an error, lets announce that with headers:\n header('HTTP/1.0 500 Internal Server Error');\n \n // we can't specify a bitmask for error logging to ob_start, so we have\n // to manually filter... (we don't want anything that the error_handler can handle)\n if (in_array($error['type'], self::$filtered_errors) || $error['type'] >= E_USER_ERROR) return false;\n \n if (!sfConfig::get('sf_debug'))\n {\n $files = array();\n\n // this is a reverse cascade = the bottom-most has precedence\n $files[] = sfConfig::get('sf_plugins_dir').'/sfErrorHandlerPlugin/errors/error500.php';\n $files[] = sfConfig::get('sf_config_dir').'/error_500.php';\n $files[] = sfConfig::get('sf_web_dir').'/errors/error500.php';\n \n // check for app/project specific error page, can only do this if we have a context\n if (sfConfig::get('sf_app_config_dir'))\n {\n $files[] = sfConfig::get('sf_app_config_dir').'/error_500.php';\n }\n\n foreach ($files as $file)\n {\n if (is_readable($file))\n {\n $output = file_get_contents($file);\n }\n }\n\n } else {\n foreach ($error as $info => $string)\n // at the moment, pretty basic, but better than nothing, eh?\n $output .= \"{$info} : {$string}\\n\";\n //self::setFatalException(new Exception($error['message'], $error['type']));\n //throw new Exception($error['message'], $error['type']);\n }\n \n return $output;\n }", "private function handle_error($err) {\n $this->error .= $err . \"rn\";\n }", "function xthreads_catch_errorhandler() {\r\n\tif(!function_exists('_xthreads_catch_php_error')) { //paranoia\r\n\t\tfunction _xthreads_catch_php_error($errno, $errstr) {\r\n\t\t\t$GLOBALS['_previous_error'] = array($errno, $errstr);\r\n\t\t}\r\n\t}\r\n\tunset($GLOBALS['_previous_error']);\r\n\tset_error_handler('_xthreads_catch_php_error');\r\n}", "function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n // Build the error message:\n $message = \"An error occurred in script '$e_file' on line $e_line: $e_message\\n\";\n\n // Append $e_vars to $message:\n $message .= print_r ($e_vars, 1);\n\n if (!LIVE) { // Development (print the error).\n echo '<pre>' . $message . \"\\n\";\n debug_print_backtrace();\n echo '</pre><br>';\n } else { // Don't show the error.\n echo '<div class=\"error\">A system error occurred. We apologize for the\n inconvenience.</div><br>';\n }\n\n }", "public function error()\n\t{\n\t}", "protected function error($msg) {\n \t parent::error($msg); //log in error msg\n throw new Exception ($msg); // <-- TESTS php4\n }", "public function error(){\n\t}", "public function error500(){\n\t\theader('HTTP/1.0 500 Internal Server Error');\n\t\tdie('500 internal server error');\n\t}", "function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {\n \n\t$message = \"An error occurred in script '$e_file' on line $e_line:\\n$e_message\\n\";\n\t\n\t// Add the backtrace:\n\t$message .= \"<pre>\" .print_r(debug_backtrace(), 1) . \"</pre>\\n\";\n\t\n\t// Or just append $e_vars to the message:\n\t//\t$message .= \"<pre>\" . print_r ($e_vars, 1) . \"</pre>\\n\";\n\n\tif (!LIVE) { // Show the error in the browser. \n echo '<div class=\"alert alert-danger\">' . nl2br($message) . '</div>';\n\t} else { \n\t\t// Send the error in an email:\n\t\terror_log ($message, 1, CONTACT_EMAIL, 'From:[email protected]');\n\t\t\t\t\t\n\t\t// echo $message; //DEBUGGIN ONLY\n\n\t\t// Only print an error message in the browser, if the error isn't a notice:\n\t\tif ($e_number != E_NOTICE) {\t\t\t\t\t\t\n\t\t\techo $message; // TESTING ONLY BELOW, DON'T DISPLAY\n\t\t\techo 'An error occured, please try again later...';\n\t\t} \n\t}\t\n\t\n\treturn true; // So that PHP doesn't try to handle the error, too.\t\n}", "public function get_error();", "public function get_error();", "function handleError($errno, $errstr, $errfile, $errline, array $errcontext)\n{\n // error was suppressed with the @-operator\n if (0 === error_reporting()) {\n return false;\n }\n\n throw new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}", "function error_handler($msg) {\r\n print(\"My Site Error\");\r\n print(\"Description:\");\r\n printf(\"%s\", $msg);\r\n exit;\r\n }", "private function _error() {\n\t\trequire $this->_controllerPath . $this->_errorFile;\n\t\t$this->_controller = new Error();\n\t\t$this->_controller->index('Esta página no existe');\n\t\texit;\n\t}", "function error($code_or_codes, $callback = NULL)\n{\n\n}", "function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n throw new \\ErrorException($errstr, 0, $errno, $errfile, $errline);\n}", "protected function errorAction() {}", "public function fatalErrorHandler()\n {\n $error = error_get_last();\n if( $error !== NULL) {\n $code = $error[\"type\"];\n $file = $error[\"file\"];\n $line = $error[\"line\"];\n $message = $error[\"message\"];\n $exception = new \\ErrorException($message, $code, 0, $file, $line);\n $this->displayException($exception, \"FATAL_ERROR\");\n exit(1);\n }\n }", "function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {\n $message = \"An error occurred in script '$e_file' on line $e_line:\\n$e_message\\n\";\n\n // Add the backtrace:\n $message .= \"<pre>\" .print_r(debug_backtrace(), 1) . \"</pre>\\n\";\n\n // Or just append $e_vars to the message:\n\n // $message .= \"<pre>\" . print_r ($e_vars, 1) . \"</pre>\\n\";\n if (!LIVE) { // Show the error in the browser.\n echo '<div class=\"error\">' . nl2br($message) . '</div>';\n } else { // Development (print the error).\n\n // Send the error in an email:\n error_log ($message, 1, CONTACT_EMAIL, 'From:[email protected]');\n\n // Only print an error message in the browser, if the error isnt a notice:\n if ($e_number != E_NOTICE) {\n echo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div>';\n }\n } // End of $live IF-ELSE.\n\n return true; // So that PHP doesn't try to handle the error, too.\n }", "private function error($response) {\n\t\tif(property_exists($response, \"error\") AND $response->code != 200) {\n\t\t\tthrow new MystoreAPI_exception(\"Error \".$response->code.\"<br />\".$response->error->message);\n\t\t}\n\t}", "public function error() \n\t{\n\t\trequire $this->view('error', 'error');\n\t\texit;\n\t}", "public static function customErrorMsg()\n {\n echo \"\\n<p>An error occured, The error has been reported.</p>\";\n exit();\n }", "public function handleError($e)\n {\n $code = (int) $e->getCode();\n $message = $e->getMessage();\n if ( !in_array($code, $this->_allowedErrorCodes) && $this->isDebugging ) {\n $code = self::ERROR_UNKNOWN;\n }\n \n $this->_server->fault($message, $code, null);\n \n /*\n * Due to a bug in Zend_Json_Server_Error, we have to modify the error\n * response to make sure the custom error code makes it to the client.\n */\n $badJson = $this->_server->getResponse()->toJson();\n \n $decoded = Zend_Json::decode($badJson);\n if ( isset($decoded['error']) \n && isset($decoded['error']['code']) ) {\n $decoded['error']['code'] = $code;\n }\n \n $json = Zend_Json::encode($decoded);\n \n if ($code == self::ERROR_CREDENTIALS_INVALID \n || $code == self::ERROR_DIGEST_INVALID \n || $code == self::ERROR_DIGEST_MISSING) {\n $this->sendAuthChallengeHeader();\n }\n \n header('Content-Type: application/json');\n if (isset($_GET['d'])) die($_GET['jsoncallback'].\"(\".$json.\")\");\n else die($json);\n }", "function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {\r\n // Build the error message:\r\n $message = \"An error occurred in script '$e_file' on line $e_line: $e_message\\n\";\r\n // Append $e_vars to $message:\r\n $message .= print_r ($e_vars, 1);\r\n if (!LIVE) { // Development (print the error).\r\n echo '<pre>' . $message . \"\\n\";\r\n debug_print_backtrace();\r\n echo '</pre><br>';\r\n } else { // Don't show the error.\r\n echo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div><br>';\r\n }\r\n}", "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n\t// Build the error message:\n\t$message = \"An error occurred in script '$e_file' on line $e_line: $e_message\\n\";\n\t\n\t// Add the date and time:\n\t$message .= \"Date/Time: \" . date('n-j-Y H:i:s') . \"\\n\";\n\t\n\tif (!LIVE) { // Development (print the error).\n\n\t\t// Show the error message:\n\t\techo '<div class=\"error\">' . nl2br($message);\n\t\n\t\t// Add the variables and a backtrace:\n\t\techo '<pre>' . print_r ($e_vars, 1) . \"\\n\";\n\t\tdebug_print_backtrace();\n\t\techo '</pre></div>';\n\t\t\n\t} else { // Don't show the error:\n\n\t\t// Send an email to the admin:\n\t\t$body = $message . \"\\n\" . print_r ($e_vars, 1);\n\t\tmail(EMAIL, 'Site Error!', $body, 'From: [email protected]');\n\t\n\t\t// Only print an error message if the error isn't a notice:\n\t\tif ($e_number != E_NOTICE) {\n\t\t\techo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div><br />';\n\t\t}\n\t} // End of !LIVE IF.\n\n}", "function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars)\n {\n \t//detailed error message\n \t$message = \"An error occurred in script '$e_file' on line $e_line:\\n$e_message\\n\";\n\t\t\n\t\t//add backtrace info\n\t\t$message .=\"<pre>\" .print_r(debug_backtrace(), 1). \"</ore>\\n\";\n\t\t\n\t\t\n\t\t//if site not live show error in browser\n\t\t// nl2br($message) turns \\n into HTML break tags\n\t\tif(!LIVE)\n\t\t{\n\t\t\techo '<div class=\"alert alert-danger\">' . nl2br($message) .'</div>';\n\t\t}else{\n\t\t\terror_log($message, 1, CONTACT_EMAIL, 'FROM:[email protected]');\n\t\t\tif($e_number !=E_NOTICE)\n\t\t\t{\n\t\t\t\techo '<div class=\"alert alert-danger\">A system error occurred.\n\t\t\t\t we apologize for the inconvenience.</div>';\n\t\t\t}//end if !LIVE\n\t\t}//end of my_error_handler() definition\n\t\t\treturn true; //so that PHP does'nt try to handle the error , too\n}", "public function _handleException($e)\n\t{\n\t\tif(!$this->_inError && $handler = $this->_application->errorHandler())\n\t\t{\n\t\t\t$this->_inError = true;\n\t\t\t$handler->handle($e);\n\t\t\t$this->_inError = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(php_sapi_name() == 'cli')\n\t\t\t{\n\t\t\t\techo $e->__toString();\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\theader('HTTP/1.1 500 Internal Server Error');\n\n\t\t\t\techo \"<h1>Error: \".$e->getMessage().'</h1>';\n\t\t\t\techo '<pre>'.$e->__toString().'</pre>';\n\t\t\t\texit(1);\n\t\t\t}\n\t\t}\n\t}", "public static function handleError(& $error) {\r\t\t\t\t\r\t\t// Get JApplication object\r\t\t$mainframe = JFactory::getApplication();\t\r\t\t\r\t\t// Render custom error page in Administrator part of site\r\t\tif($mainframe->isAdmin()){\r\t\t\t// Render the error page.\r\t\t\tJError::customErrorPage($error);\r\t\t\t\r\t\t\t// Return false to not run the plugin\r\t\t\treturn false;\r\t\t}\r\t\t\r\t\t// Get instance of JDocument\r\t\t$document =& JFactory::getDocument();\r\t\t\r\t\t// Force to be html\r\t\t$document->setType('html');\r\t\t\r\t\t// Set the Error status before any content is output to screen\r\t\tJResponse::setHeader('status', $error->get('code').' '.str_replace( \"\\n\", ' ', $error->get('message') ));\r\t\t\r\t\t// Lets load joomla default javascript libraries if not already loaded\r\t\tJHTML::_('behavior.mootools');\r\t\tJHTML::_('behavior.caption');\r\t\t\r\t\t// First get the mainframe scope\r\t\t$scope = $mainframe->scope;\r\t\t\r\t\t// Change the scope to our component\r\t\t$mainframe->scope = 'com_qlue404';\r\t\t\r\t\t// Create path to our component\r\t\t$path = JPATH_BASE.DS.'components'.DS.'com_qlue404'.DS.'qlue404.php';\r\t\t\r\t\t// Render our component\r\t\t$contents = plgSystemQlue404::_renderComponent($path, $error);\r\t\t\r\t\t// Revert the scope back to original\r\t\t$mainframe->scope = $scope;\r\t\t\r\t\t// Set the document buffer\r\t\t$document->setBuffer($contents, 'component');\r\t\t\r\t\t// Get the template\r\t\t$template = $mainframe->getTemplate();\r\t\t\r\t\t// Set params for the template to load\r\t\t$params = array(\r\t\t\t'template' \t=> $template->template,\r\t\t\t'file'\t\t=> 'index.php',\r\t\t\t'directory'\t=> JPATH_THEMES,\r\t\t\t'params' => $template->params\r\t\t);\r\t\t\r\t\t// Render the template\r\t\t$data = $document->render($mainframe->getCfg('caching'), $params );\r\t\t\r\t\t// Set the new body data\r\t\tJResponse::setBody($data);\r\t\t\r\t\t// Display the new layout\r\t\techo JResponse::toString();\r\t\t\r\t\t// Close gracefully\r\t\t$mainframe->close(0);\r\r\t}", "function php_upload_error($code)\n{\n\t $message = \"\";\n\t \n switch ($code) {\n case UPLOAD_ERR_INI_SIZE:\n $message = \"The uploaded file exceeds the upload_max_filesize directive in php.ini\";\n break;\n case UPLOAD_ERR_FORM_SIZE:\n $message = \"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form\";\n break;\n case UPLOAD_ERR_PARTIAL:\n $message = \"The uploaded file was only partially uploaded\";\n break;\n case UPLOAD_ERR_NO_FILE:\n $message = \"No file was uploaded\";\n break;\n case UPLOAD_ERR_NO_TMP_DIR:\n $message = \"Missing a temporary folder\";\n break;\n case UPLOAD_ERR_CANT_WRITE:\n $message = \"Failed to write file to disk\";\n break;\n case UPLOAD_ERR_EXTENSION:\n $message = \"File upload stopped by extension\";\n break;\n\n default:\n $message = \"Unknown upload error\";\n break;\n }\n return \"<p class='alert alert-danger'>$message</p>\";\n}", "function error($sql) {\n\tif (defined('DEBUG')) {\n\t\tdie($sql);\n\t}\n\theader('Content-Type: application/json');\n\tdie('{\"result\":\"error\"}');\n}", "public function actionError() {\n if ($error = Yii::app()->errorHandler->error) {\n\t\t\t$this->sendRestResponse(500,array(\n\t\t\t\t'status' => false,\n\t\t\t\t'message' => $error['message'],\n\t\t\t\t'data' => $error,\n\t\t\t));\t\t\t\n }\n\t}", "public function sql_error() {}", "public function sql_error() {}", "function JPSpan_ExceptionHandler($exception) {\r\n\r\n $name = 'Server_Error';\r\n $file = addcslashes($exception->getFile(),\"\\000\\042\\047\\134\");\r\n\r\n if ( !JPSPAN_ERROR_MESSAGES ) {\r\n $message = 'Server unable to respond';\r\n } else {\r\n $message = strip_tags($exception->getMessage());\r\n $message = wordwrap($message, 60, '\\n', 1);\r\n }\r\n\r\n $code = 2005;\r\n\r\n $error = \"var e = new Error('$message');e.name = '$name';e.code = '$code';\";\r\n if ( JPSPAN_ERROR_DEBUG ) {\r\n $error .= \"e.file = '$file';e.line = '\".$exception->getLine().\"';\";\r\n }\r\n $error .= \"throw e;\";\r\n echo 'new Function(\"'.addcslashes($error,\"\\000\\042\\047\\134\").'\");';\r\n\r\n if ( !defined('JPSPAN') ) {\r\n define ('JPSPAN',dirname(__FILE__).'/');\r\n }\r\n require_once JPSPAN . 'Monitor.php';\r\n $M = & JPSpan_Monitor::instance();\r\n $M->announceError($name, $code, $message, $file, $exception->getLine());\r\n\r\n exit();\r\n\r\n}", "public function error($message) {}", "public static function error500()\n {\n // Set 500 HTTP status code\n Http::setHeadersByCode(500);\n\n // Prevent caching in the browser\n (new Browser)->noCache();\n\n // Inclusion of the HTML Internal Server Error page\n include PH7_PATH_SYS . 'global/views/' . PH7_DEFAULT_THEME . '/error/500.html.php';\n\n // Stop script\n exit;\n }", "function fatal_handler()\n{\n $error = error_get_last();\n if ($error)\n {\n echo $error['message'], \"\\n\";\n }\n}", "public function errorAction()\n {\n $errors = $this->_getParam('error_handler');\n\n switch ($errors->type) {\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n\n // 404 error -- controller or action not found\n $this->getResponse()->setHttpResponseCode(404);\n $this->view->message = 'Page not found';\n break;\n default:\n // Generic application error\n $this->getResponse()->setHttpResponseCode(500);\n $this->view->message = 'Application error';\n break;\n }\n\n $this->view->exception = $errors->exception;\n $this->view->request = $errors->request;\n $this->_response->clearBody();\n }", "function default_error_handler($errno, $errstr, $errfile, $errline)\n{\n\tif($errno == E_USER_ERROR || $errno == E_ERROR)\n\t{\n\t\tif(isset($db))$db->closeDb();\n\t\tinclude(SITE_DIR.'_pages/_error.php');\n\t\tinclude('footer.php');\n\t\texit;\n\t}\n\telseif($errno == E_USER_NOTICE)\n\t{\n\t\tif(isset($db))$db->closeDb();\n\t\tinclude(SITE_DIR.'_pages/_notice.php');\n\t\tinclude('footer.php');\n\t\texit;\n\t}\n}", "private function handleError($error)\n {\n $status = $this->response->getStatusCode();\n if (! $status || $status < 400) {\n $this->response->setStatusCode(500);\n }\n\n if ($error instanceof Exception\n && ($error->getCode() >= 400 && $error->getCode() < 600)\n ) {\n $this->response->setStatusCode($error->getCode());\n }\n\n $escaper = new Escaper();\n $message = $this->response->getReasonPhrase() ?: 'Unknown Error';\n if (! isset($this->options['env'])\n || $this->options['env'] !== 'production'\n ) {\n if ($error instanceof Exception) {\n $message = $error->getTraceAsString();\n } elseif (is_object($error) && ! method_exists($error, '__toString')) {\n $message = sprintf('Error of type \"%s\" occurred', get_class($error));\n } else {\n $message = (string) $error;\n }\n $message = $escaper->escapeHtml($message);\n }\n\n if (isset($this->options['onerror'])\n && is_callable($this->options['onerror'])\n ) {\n $onError = $this->options['onerror'];\n $onError($error, $this->request, $this->response);\n }\n\n $this->response->end($message);\n }", "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\r\n\r\n\tglobal $debug, $contact_email;\r\n\r\n\t// Build the error message.\r\n\t$message = \"An error occurred in script '$e_file' on line $e_line: \\n<br />$e_message\\n<br />\";\r\n\r\n\t// Add the date and time.\r\n\t$message .= \"Date/Time: \" . date('n-j-Y H:i:s') . \"\\n<br />\";\r\n\r\n\t// Append $e_vars to the $message.\r\n\t$message .= \"<pre>\" . print_r ($e_vars, 1) . \"</pre>\\n<br />\";\r\n\r\n\tif ($debug) { // Show the error.\r\n\r\n\t\techo '<p class=\"error\">' . $message . '</p>';\r\n\r\n\t} else {\r\n\r\n\t\t// Log the error:\r\n\t\t// error_log ($message, 1, $contact_email); // Send email.\r\n\r\n\t\t// Only print an error message if the error isn't a notice or strict.\r\n\t\tif ( ($e_number != E_NOTICE) && ($e_number < 2048)) {\r\n\t\t\t// echo '<p class=\"error\">A system error occurred. We apologize for the inconvenience.</p>';\r\n\t\t}\r\n\r\n\t} // End of $debug IF.\r\n\r\n}", "function fatal_error($sErrorMessage = '') {\n header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error');\n die($sErrorMessage);\n}", "function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n throw new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}", "function throw_user_error($error_code, $error_text) {\n http_response_code($error_code);\n echo $error_text;\n exit;\n}", "function customError($errno, $errstr)\n {\n echo \"<b>Error:</b> [$errno] $errstr\";\n }", "function customError($errno, $errstr)\n {\n echo \"<b>Error:</b> [$errno] $errstr\";\n }", "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n // Build the error message:\n $message = \"Error $e_number occurred in script '$e_file' on line $e_line:\n $e_message\\n\";\n\n // Append $e_vars to $message:\n $message .= print_r ($e_vars, 1);\n\n if (!LIVE) { // Development (print the error).\n echo '<pre>' . $message . \"\\n\";\n debug_print_backtrace();\n echo '</pre><br />';\n } else { // Don't show the error.\n echo '<div style=\"color:red;\">A system error occurred.\n We apologize for the inconvenience.</div><br />';\n }\n\n}", "function errorHandler($errno, $errstr, $errfile, $errline) {\n if ($errno != 2 && $errno != 8) {\n throw new Exception(\"Fatal Error Detected: [$errno] $errstr line: $errline\", 1);\n }\n }", "function error_handler($errno, $errstr, $errfile, $errline, $errcontext)\n{\n // the error suppression operator (@), because the custom error\n // handler is still called even if errors are suppressed.\n if (error_reporting(0) === 0)\n {\n return;\n }\n \n $heading = \"\\n\" . get_error_name($errno) . \" in $errfile at line $errline\\n\";\n \n // Show the superglobal data unless the error is minor\n $show_data = !in_array($errno, array(E_NOTICE, E_USER_NOTICE, E_USER_DEPRECATED));\n \n output_error($heading, $errstr . \"\\n\", $show_data);\n}", "function error_404() {\n header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');\n exit(); //don't do any additional php, we are done\n }", "function error_handler($error_num,$error_msg,$error_file,$error_line,$error_vars)\n\t {\n\t if(LIVE)\n\t \t {\n\t \t \n\t \t \techo \"<p class='error'> Something Went Wrong.We're Fixing it.</p>\";\n\t \t \n } \n\t elseif(!LIVE)\n\t {\t\n\t\t\t\t\n\t\t\t\t$message=\"error # :{$error_num} on line {$error_line} and of the file {$error_file}, and variables are {$error_vars}<br />error message :{$error_msg} \";\n\t\t\t\techo \"<b>\".$message.\"</b><br />\";\n\t\t\t\t\n\t \n }\n }", "public function errorcode();", "function JPSpan_ErrorHandler($level, $message, $file, $line) {\r\n $name = 'Server_Error';\r\n $message = strip_tags($message);\r\n $message = wordwrap($message, 60, '\\n', 1);\r\n $file = addcslashes($file,\"\\000\\042\\047\\134\");\r\n\r\n $replevel = error_reporting();\r\n if( ( $level & $replevel ) != $level ) {\r\n // ignore error\r\n return;\r\n }\r\n\r\n switch ( $level ) {\r\n case E_USER_NOTICE:\r\n $code = 2001;\r\n break;\r\n case E_USER_WARNING:\r\n $code = 2002;\r\n break;\r\n case E_USER_ERROR:\r\n $code = 2003;\r\n break;\r\n case E_STRICT:\r\n if ( JPSPAN_IGNORE_STRICT ) {\r\n return;\r\n }\r\n $code = 2004;\r\n default:\r\n if ( !JPSPAN_ERROR_MESSAGES ) {\r\n $message = 'Server unable to respond';\r\n }\r\n $code = 2000;\r\n break;\r\n }\r\n\r\n $error = \"var e = new Error('$message');e.name = '$name';e.code = '$code';\";\r\n if ( JPSPAN_ERROR_DEBUG ) {\r\n $error .= \"e.file = '$file';e.line = '$line';\";\r\n }\r\n $error .= \"throw e;\";\r\n echo 'new Function(\"'.addcslashes($error,\"\\000\\042\\047\\134\").'\");';\r\n\r\n if ( !defined('JPSPAN') ) {\r\n define ('JPSPAN',dirname(__FILE__).'/');\r\n }\r\n require_once JPSPAN . 'Monitor.php';\r\n $M = & JPSpan_Monitor::instance();\r\n $M->announceError($name, $code, $message, $file, $line);\r\n\r\n // Must exit on any error in case of multiple errors\r\n // causing Javascript syntax errors\r\n exit();\r\n\r\n}", "function errorHandler($errno, $errstr = '', $errfile = '', $errline = '') {\r\n\tglobal $regex_error;\r\n\t$regex_error = \"Regular Expression Error: $errstr\";\r\n\treturn true; // dont exec internal error handler\r\n}", "function ReturnServerError()\n{\n header('HTTP/1.1 500 Internal Server Error');\n die(\"A server error occured while saving your request.\\r\\nPlease check our API status page at http://status.prybar.io and try again later\");\n}", "function getError();", "function getError();", "public function errorAction()\r\n {\r\n $errors = $this->_getParam('error_handler');\r\n $messages = array();\r\n\r\n switch ((string)$errors->type) {\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\r\n // 404 error -- controller or action not found\r\n $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');\r\n\r\n $messages[] = Zoo::_(\"The page you requested was not found.\");\r\n if (ZfApplication::getEnvironment() == \"development\" || ZfApplication::getEnvironment() == \"staging\") {\r\n $messages[] = $errors->exception->getMessage();\r\n }\r\n break;\r\n\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_OTHER:\r\n case 0:\r\n // application error\r\n //$messages[] = Zoo::_(\"An unexpected error occurred with your request. Please try again later.\");\r\n $messages[] = $errors->exception->getMessage();\r\n if (ZfApplication::getEnvironment() == \"development\" || ZfApplication::getEnvironment() == \"staging\") {\r\n $trace = $errors->exception->getTrace();\r\n foreach (array_keys($trace) as $i) {\r\n if ($trace[$i]['args']) {\r\n foreach ($trace[$i]['args'] as $index => $arg) {\r\n if (is_object($arg)) {\r\n $trace[$i]['args'][$index] = get_class($arg);\r\n }\r\n elseif (is_array($arg)) {\r\n $trace[$i]['args'][$index] = \"array\";\r\n }\r\n }\r\n }\r\n $trace[$i]['file_short'] = \"..\".substr($trace[$i]['file'], strrpos(str_replace(\"\\\\\", DIRECTORY_SEPARATOR, $trace[$i]['file']), DIRECTORY_SEPARATOR));\r\n }\r\n $this->view->assign('trace', $trace);\r\n }\r\n break;\r\n\r\n default:\r\n // application error\r\n $this->getResponse()->setRawHeader('HTTP/1.1 '.$errors->type);\r\n $messages[] = $errors->exception->getMessage();\r\n break;\r\n }\r\n\r\n // Clear previous content\r\n $this->getResponse()->clearBody();\r\n\r\n $this->view->assign('errormessages', $messages);\r\n }", "function pasta_errorHandling_handleException($exception)\n{\n $trace = $exception->getTrace();\n // Add artificial frame to make the trace identical to that generated by\n // debug_backtrace() in pasta_errorHandling_handleError\n $frame = array(\n 'file' => $exception->getFile(),\n 'line' => $exception->getLine());\n array_unshift($trace, $frame);\n\n require_once 'Pasta/Debug/Error.class.php';\n try {\n $error = new Pasta_Debug_Error();\n $error->message = $exception->getMessage();\n $error->errorNumber = E_USER_ERROR;\n $error->filename = $exception->getFile();\n $error->lineNumber = $exception->getLine();\n $error->stackTrace = $trace;\n\n // Handle exits the script, unless an exception is thrown\n $error->handle(true);\n } catch (Exception $e) {\n // The error handler should not throw exceptions, even if the\n // database is unavailable, so this is just an extra precaution\n if (isset($_SERVER['PEYTZ_DEV'])) {\n print '<p><b>Error</b>: Error handler threw an exception:</p>';\n print Pasta_Debug::stackTraceToHtml($e->getTrace(), true);\n print '<p>Original exception was:</p>';\n print Pasta_Debug::stackTraceToHtml($trace, true);\n }\n }\n print(\"\\nInternal server error (while executing error handler)\\nexit(75)\");\n exit(75); // 75 makes postfix keep mail on its queue and try again instead of bouncing it\n}", "function exception_error_handler( $errno, $errstr, $errfile, $errline ) {\n throw new ErrorException( $errstr, $errno, 0, $errfile, $errline );\n}", "function myErrorHandler($errno, $errstr, $errfile, $errline)\n{\n if (!(error_reporting() & $errno)) {\n \t // This error code is not included in error_reporting\n \t return;\n }\n\n printf(\n \"%s\\nError num: %d\\nMessage: %s\\nFile: %s\\nLine: %d\\n\",\n \tdate(\"d-m-Y h:i:s\"),\n \t$errno,\n \t$errstr,\n \t$errfile,\n \t$errline\n );\n\n // Halt the execution in case of E_USER_ERROR\n if (in_array($errno, [ E_USER_ERROR, E_USER_WARNING, E_ERROR, E_WARNING ])) {\n\t\t exit(1);\n }\n\n /* Don't execute PHP internal error handler */\n return true;\n}" ]
[ "0.71627796", "0.7149882", "0.71099895", "0.7060257", "0.68443406", "0.6691333", "0.66343576", "0.66316104", "0.65705436", "0.65269166", "0.65123147", "0.65024596", "0.64939594", "0.64938885", "0.6492973", "0.64730275", "0.64509696", "0.64303243", "0.6425486", "0.64104706", "0.64098066", "0.6407546", "0.64016473", "0.6401397", "0.63922536", "0.63802785", "0.63648313", "0.6352447", "0.63493425", "0.63420707", "0.63282615", "0.6319949", "0.631635", "0.6310702", "0.62717897", "0.62710595", "0.62471545", "0.62460846", "0.62447506", "0.62437934", "0.6241421", "0.62224495", "0.62221795", "0.62074226", "0.6192681", "0.61900216", "0.6173962", "0.6172235", "0.61623526", "0.61441195", "0.61441195", "0.6112351", "0.6112031", "0.61073726", "0.6106842", "0.6087485", "0.6085648", "0.60842407", "0.6084061", "0.60814", "0.6072728", "0.60667056", "0.6056776", "0.6052855", "0.6046331", "0.60361767", "0.60234696", "0.60232055", "0.60196126", "0.60174876", "0.6016892", "0.6016502", "0.6016502", "0.6016215", "0.6014187", "0.6009118", "0.6000557", "0.5999223", "0.5991644", "0.59913373", "0.5991324", "0.5987458", "0.5987328", "0.59862536", "0.5985359", "0.5985359", "0.59820646", "0.5981697", "0.59728086", "0.597158", "0.5968233", "0.59613484", "0.59600776", "0.5956195", "0.5954563", "0.5954171", "0.5954171", "0.5953663", "0.5951712", "0.59481436", "0.5945709" ]
0.0
-1
/ get class by class id
public function getClassById($id = 0) { if ($id === 0) { $query = $this->db->get('class'); return $query->result_array(); } $query = $this->db->get_where('class', array('class_id' => $id)); return $query->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_class($classid){\r\n\t\r\n}", "function getclassbyid($id){\n $q = \"select * from class where id=$id\";\n $r = mysql_query($q);\n \n return $r;\n }", "public function class_from_id($id)\n {\n $table = $this->return_table();\n $this->db->where(\"id\",$id);\n $query = $this->db->get($table);\n foreach ($query->result() as $key => $value) {\n $class = $value->class_name;\n return $class;\n }\n \n }", "public function getClass(string $class);", "function get_chtrm_by_class($classid){\r\n\r\n}", "static private function getClassNameFromId($id) {\n list($className, $rest) = explode(self::ID_CLASS_NAME_SEPARATOR, $id, 2);\n return $className;\n }", "public function getClass($className);", "function getClass();", "public function getClassById($class_id)\r\n {\r\n try {\r\n $query = 'SELECT * FROM class INNER JOIN program ON class.program_id = program.program_id WHERE class.class_id = \"' . $class_id . '\"';\r\n $stmt = $this->conn->prepare($query);\r\n $stmt->execute();\r\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n if ($row == false) {\r\n return false;\r\n } else {\r\n return $row;\r\n }\r\n } catch (PDOException $e) {\r\n echo $e;\r\n die();\r\n }\r\n }", "public function fetch_class()\n\t{\n\t\treturn $this->route_stack[self::SEG_CLASS];\n\t}", "public function findClass($class);", "function resolve($id, $className);", "public function getClass($typeId);", "public function uc_get_classname($id)\n\t{\n\t\tif (isset($this->class_tree[$id]))\n\t\t{\n\t\t\treturn $this->class_tree[$id]['userclass_name'];\n\t\t}\n\t\tif (isset($this->fixed_classes[$id]))\n\t\t{\n\t\t\treturn $this->fixed_classes[$id];\n\t\t}\n\n\t\tif($id < 0)\n\t\t{\n\t\t\t$val = abs($id);\n\t\t\t$name = isset($this->class_tree[$val]['userclass_name']) ? $this->class_tree[$val]['userclass_name'] : $this->fixed_classes[$val];\n\t\t\treturn str_replace('--CLASS--', $name, UC_LAN_INVERT);\n\t\t}\n\t\treturn '';\n\t}", "public static function getClass($class)\n\t{\n\t\tif(! self::hasClass($class)) {\n\t\t\tself::createClass($class);\n\t\t}\n\n\t\treturn self::$classes[$class];\n\t}", "function tc_get_post_class( $class = '', $post_id = null ) {\r\n // Separates classes with a single space, collates classes for post DIV\r\n return 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\r\n }", "function category_id_class($classes) {\n\tglobal $post;\n\tforeach((get_the_category($post->ID)) as $category)\n\t\t$classes [] = 'cat-' . $category->cat_ID . '-id';\n\t\treturn $classes;\n}", "function wpf_get_class( $class ) {\n\tglobal $wpf_classes;\n\t\n\tif ( isset($wpf_classes[$class]) )\n\t\treturn $wpf_classes[$class];\n\t\n\tif ( isset($wpf_classes['admin'][$class]) )\n\t\treturn $wpf_classes['admin'][$class];\n\t\n\tif ( isset($wpf_classes['static'][$class]) )\n\t\treturn $wpf_classes['static'][$class];\n\t\n\tif ( isset($wpf_classes['autoload'][$class]) )\n\t\treturn $wpf_classes['autoload'][$class];\n\t\n\tif ( isset($wpf_classes['contextual'][$class]) )\n\t\treturn $wpf_classes['contextual'][$class];\n\t\n\treturn false;\n}", "public function getCssClass(): string;", "function getActClass() {\n $class = Appl::getMember(\"actClass\");\n if ($class!==null)\n return $class;\n global $db;\n if (isset($_SESSION['actClass'])) {\n return $db->getClassById(intval($_SESSION['actClass']));\n }\n return null;\n}", "function category_id_class($classes) {\n\t\tglobal $post;\n\t\tforeach((get_the_category($post->ID)) as $category)\n\t\t\t$classes [] = 'cat-' . $category->cat_ID . '-id';\n\t\t\treturn $classes;\n\t}", "function bfa_category_id_class($classes) {\r\n\t global $post;\r\n\t if (is_single()) {\t\r\n\t \tforeach((get_the_category($post->ID)) as $category)\r\n\t \t$classes[] = 'category-'.$category->slug;\r\n\t\t}\r\n\t\treturn $classes;\r\n\t}", "public function getClass($name = null);", "function getClass()\n\t{\n\t\tif (is_object($this->mob_node))\n\t\t{\n\t\t\t$mal_node = $this->mob_node->first_child();\n\t\t\tif (is_object($mal_node))\n\t\t\t{\n\t\t\t\t$class = $mal_node->get_attribute(\"Class\");\n\t\t\t\treturn $class;\n\t\t\t}\n\t\t}\n\t}", "function getActClassId() {\n if (isset($_SESSION['actClass'])) {\n return intval($_SESSION['actClass']);\n } else {\n return -1;\n }\n}", "function wp_theme_get_element_class_name($element)\n {\n }", "function category_id_class($classes) {\n\tglobal $post;\n\tforeach((get_the_category($post->ID)) as $category)\n\t\t$classes[] = 'cat-' . $category->cat_ID . '-id';\n\t\t$classes[] = $post->post_type . '-' . $post->post_name;\n\t\treturn $classes;\n}", "public function fetchClass()\n {\n return $this->class;\n }", "function getClass(){\n\t\treturn $this->_class;\n\t}", "private function getClass($objId) {\r\n\t\tif($objId == $this->_currentPage) {\r\n\t\t\treturn \"current\";\r\n\t\t} else {\r\n\t\t\treturn \"non_current\";\r\n\t\t}\r\n\t}", "public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }", "static function getClassNameFromRecordId($rid) {\n\n if(!ctype_digit(trim($rid)))\n throw new Exception(\"Invalid record ID!\");\n \n\n $id = IdaDB::select(\"_sys_classes_join\", array(\"subject\"=>$rid), \"property\",\"\",\"onecell\");\n \n if(!isset($id))\n throw new Exception('No classname found for record!');\n\n $res = XML::getClassID($id);\n\n return $res;\n }", "static function Get($className, $id)\n {\n $content = self::findOne(['object_model' => $className, 'object_id' => $id]);\n if ($content != null) {\n return $className::findOne(['id' => $id]);\n }\n return null;\n }", "public function selectClass(){\n\t\t\t$query = new Query();\n\n\t\t\t$query->tables = array(\"classi\");\n\t\t\t$query->fields = array(\"id\", \"_Desc\");\n\t\t\t\n\t\t\tif ($query->Open()){\n\t\t\t\twhile ($row = $query->GetNextRecord(true)){\n\t\t\t\t\t$classes[] = $row;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $classes;\n\t\t}", "function get_comment_class($css_class = '', $comment_id = \\null, $post = \\null)\n {\n }", "public function find($class);", "public function getClass() {\n \treturn $this->_class;\n }", "public function getClass()\n {\n \treturn $this->class;\n }", "public function find($class, $id)\n {\n $hash = $this->hash($class, $id);\n\n if (isset($this->saveStack[$hash])) {\n return $this->saveStack[$hash];\n }\n\n return null;\n }", "function resolveClass( $classID )\n\t\t{\n\t\t\t$return = NULL;\n\t\t\t\n\t\t\t//connect to mysql database and fetch test information\n\t\t\t$conn = mysql_connect($dbHost, $dbUser, $dbPass) or die(mysql_error());\n\t\t\tmysql_select_db($dbName) or die(mysql_error());\n\t\n\t\t\t// Select this test from the database and its information\n\t\t\t$query_result = mysql_query(\"SELECT ClassID, ClassName FROM Class WHERE ClassID = \".$classID)\n\t\t\t\tor die(mysql_error()); \n\t\n\t\t\t// If a test exists with the given test id\n\t\t\tif( mysql_num_rows( $query_result ) > 0 )\n\t\t\t{\n\t\t\t\t$row = mysql_fetch_array( $query_result );\n\t\t\t\t\n\t\t\t\t$return = $row;\n\t\t\t}\n\t\t\t\n\t\t\tmysql_close($conn);\n\t\t\t\n\t\t\t// return the test metadata and the metadata about the questiosn on this test.\n\t\t\treturn $return;\n\t\t}", "public function get_response_class($classid) {\n if (!isset($this->responseclasses[$classid])) {\n debugging('Unexpected class id ' . $classid . ' encountered.');\n $this->responseclasses[$classid] = new analysis_for_class('[Unknown]', $classid);\n }\n return $this->responseclasses[$classid];\n\n }", "private function findClassInfo ($class_id)\r\n {\r\n $class = new Acad_Model_Class();\r\n $class->setClass_id($class_id);\r\n $info = $class->fetchInfo();\r\n if ($info instanceof Acad_Model_Class) {\r\n $class_info = array();\r\n $class_info['class_id'] = $info->getClass_id();\r\n $class_info['batch_id'] = $info->getBatch_id();\r\n $class_info['semester_id'] = $info->getSemester_id();\r\n $class_info['semester_type'] = $info->getSemester_type();\r\n $class_info['semester_duration'] = $info->getSemester_duration();\r\n $class_info['handled_by_dept'] = $info->getHandled_by_dept();\r\n $class_info['start_date'] = $info->getStart_date();\r\n $class_info['completion_date'] = $info->getCompletion_date();\r\n $class_info['is_active'] = $info->getIs_active();\r\n return $class_info;\r\n } else {\r\n return false;\r\n }\r\n }", "public function getCssClass(): ?string;", "function get_class() {\n\t\t$args = func_get_args();\n\t\treturn strtolower(call_user_func_array(\"get_class\", $args));\n\t}", "public function getCls() {}", "function getClass() {\n\t\treturn $this->classname ? $this->classname : \"theme\".\"1\";//rand(1, 6);\n\t}", "public function getClass() {\r\n\t\treturn $this->class;\r\n\t}", "public function getClass()\t{\n\t\treturn $this->class;\n\t}", "public function uc_get_classicon($id)\n\t{\n\t\tif (isset($this->class_tree[$id]))\n\t\t{\n\t\t\treturn $this->class_tree[$id]['userclass_icon'];\n\t\t}\n\t\treturn '';\n\t}", "public function getClass( $classIdentifier )\n {\n $classBlacklist = self::getClassBlacklist();\n if ( isset( $classBlacklist[$classIdentifier] ) )\n {\n return false;\n }\n $class = eZContentClass::fetchByIdentifier( $classIdentifier ); \n return $class;\n }", "function studiare_get_class_attribute($value) {\n\treturn studiare_get_inline_attr($value, 'class', ' ');\n}", "public static function getClass($class): string\n {\n return \\is_string($class) ? $class : \\get_class($class);\n }", "public function getFactoryClass($class) {\n\t\treturn isset($this->map[$class]) ? $this->map[$class] : null;\n\t}", "function get_uml_classname($class) {\n\t\t$sql = \"SELECT DISTINCT name FROM xplan_uml.uml_classes WHERE LOWER(name) = '\" . $class . \"'\";\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4, 0);\n\t\t$uml_class = pg_fetch_row($ret[1]);\n\t\treturn $uml_class[0];\n\t}", "public function getClass()\n {\n return $this->_className;\n }", "public function getClass()\n\t{\n\t\treturn $this->class;\n\t}", "public function getClass()\n\t{\n\t\treturn $this->class;\n\t}", "public function cssClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public static function getClassName($tag) {}", "public static function getClassName($tag) {}", "public function fetchLoadedClass( $class )\n\t{\n\t\treturn ( is_object( $this->loaded_classes[ $class ] ) ) ? $this->loaded_classes[ $class ] : NULL;\n\t}", "static function get($class, $id, $notFoundMsg = \"Record %d not found\")\n\t{\n\t\tif (! array_key_exists($class, self::$_list))\n\t\t\tself::$_list[$class] = array();\n\t\t\n\t\tif (array_key_exists($id, self::$_list[$class]))\n\t\t\treturn self::$_list[$class][$id];\n\t\t\n\t\t$r = new $class();\n\t\tif (! $r->load($id))\n\t\t\tthrow new Naf_Exception_404(get_class($rec) . \": \" . sprintf($notFoundMsg, $id));\n\t\t\n\t\treturn self::$_list[$class][$id] = $r;\n\t}", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "public function getClass()\n {\n return $this->class;\n }", "static public function getClass();", "function jnews_post_class( $class = '', $post_id = null ) {\n return 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n }", "public function findModel($class, $id)\n {\n $model = call_user_func([$class, 'findOne'], $id);\n if (!$model) {\n $this->raise404();\n }\n return $model;\n }", "function get_next_level_class($workspace, $id){\n //echo \"FUNCTION get_next_level_class(workspace,id) workspaces_model.php<br />\";\n\n $store_Mysql = $this->connect_workspace($workspace);\n \n $query = '\n SELECT *\n WHERE {\n {\n ?uri <http://www.w3.org/2002/07/owl#equivalentClass> <'.$id.'> .\n }\n UNION\n {\n ?uri <http://www.w3.org/2000/01/rdf-schema#subClassOf> <'.$id.'> .\n }\n FILTER isIRI(?uri) .\n }\n ORDER BY ?uri\n '; \n \n $child_classes = $store_Mysql->query($query,'rows');\n \n $sort_classes = array();\n \n if( $child_classes != array() ){\n $this->load->model('prefixes_model');\n\n for($i=0;$i<count($child_classes);$i++){\n $class_info = $this->prefixes_model->get_prefix_and_uri($child_classes[$i]['uri']);\n $child_classes[$i]['class'] = $class_info['class'];\n }\n \n $sort_classes = $this->sortmulti($child_classes, 'class', 'asc');\n }\n \n //echo \"END FUNCTION get_next_level_class(workspace,id) Workspaces_model.php<br />\";\n \n return $sort_classes;\n }", "public function getClass()\n\t{\n\t\treturn $this->_class;\n\t}", "public function getClass()\n\t{\n\t\treturn $this->_class;\n\t}", "public function get_class()\n {\n return $this->class;\n }", "function get_stdygds($classid){\r\n\r\n}", "function get_instance($class)\n {\n }", "public function getClass() {\n return $this->class;\n }", "function post_class( $class = '', $post_id = null ) {\n\t\techo 'class=\"' . join( ' ', get_post_class( $class, $post_id ) ) . '\"';\n\t}", "public function getClass(): string\n {\n return $this->class;\n }", "function get_classroom($id)\n {\n return $this->db->get_where('classrooms',array('id'=>$id))->row_array();\n }", "function getClassByGuid($guid) {\n $sql = \"SELECT module_guid, module_class, module_type\n FROM %s\n WHERE module_type = 'connector'\n AND module_guid = '%s'\n ORDER BY module_class ASC\";\n $sqlParams = array($this->tableModules, $guid);\n $result = NULL;\n if ($res = $this->databaseQueryFmt($sql, $sqlParams)) {\n if ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $result = $row['module_class'];\n }\n }\n return $result;\n }", "function getClassForTenantStatus($status_id)\n{\n $status_list = getTenantStatuses();\n return $status_list[$status_id]['class'];\n}", "public function get_class() {\n\t\tif ( ! $this->is_class_set ) {\n\t\t\t$this->set_class( $this->derive_class() );\n\t\t}\n\t\treturn $this->class;\n\t}", "public function viewClass(){\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM clazz ORDER BY id DESC\");\n\t\t\t$query->execute();\n\t\t\treturn $query->fetchAll();\n\t\t}", "public function get_css_class() {\n\t\treturn $this->css_class;\n\t}", "public function addClass(string $class): HtmlElementInterface;", "function getClassName($classpath, $class=true)\n{\n\treturn atkClassLoader::getClassName($classpath, $class);\n}", "public static function getClassFor($data){\n return null;\n }", "public function getClass();", "public function getClass();", "public function getClass();" ]
[ "0.82497346", "0.7960964", "0.7825464", "0.72200114", "0.6902062", "0.67769337", "0.6584788", "0.652874", "0.6481079", "0.6449908", "0.64095366", "0.64044195", "0.634317", "0.62611365", "0.62599516", "0.6184864", "0.615867", "0.61577266", "0.6152336", "0.6146866", "0.61463994", "0.61230457", "0.61149335", "0.6076562", "0.6055498", "0.60533506", "0.60480696", "0.6045507", "0.604343", "0.6032953", "0.6029042", "0.6025954", "0.6025602", "0.5975204", "0.5959367", "0.59536356", "0.59532624", "0.5950343", "0.5923221", "0.59195334", "0.5919296", "0.590811", "0.5906017", "0.5905655", "0.5899259", "0.5891351", "0.5875101", "0.58650076", "0.5852346", "0.58474606", "0.5843923", "0.5827395", "0.5818722", "0.5813767", "0.58028", "0.5788904", "0.5788904", "0.5776258", "0.5771156", "0.57657474", "0.57657474", "0.57656866", "0.5763931", "0.57389635", "0.57389635", "0.57389635", "0.57389635", "0.57389635", "0.57389635", "0.57389635", "0.57389635", "0.57389635", "0.57389635", "0.57389635", "0.57389635", "0.57389635", "0.573504", "0.57318455", "0.57301456", "0.5730056", "0.57282645", "0.57282645", "0.57247794", "0.57226515", "0.57113904", "0.5704968", "0.5704939", "0.5690518", "0.56786156", "0.5674943", "0.5674678", "0.56680214", "0.56665015", "0.5656714", "0.5653572", "0.56423223", "0.56400657", "0.5634774", "0.5634774", "0.5634774" ]
0.6909798
4
/ get class by grade id
public function getClassByGrade($gradeId = 0) { $query = $this->db->get_where('class', array('grade_id' => $gradeId)); return $query->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getclassbyid($id){\n $q = \"select * from class where id=$id\";\n $r = mysql_query($q);\n \n return $r;\n }", "public function class_from_id($id)\n {\n $table = $this->return_table();\n $this->db->where(\"id\",$id);\n $query = $this->db->get($table);\n foreach ($query->result() as $key => $value) {\n $class = $value->class_name;\n return $class;\n }\n \n }", "function get_professor_by_class($classid){\r\n\t\r\n}", "function get_class($classid){\r\n\t\r\n}", "public function getClassById($class_id)\r\n {\r\n try {\r\n $query = 'SELECT * FROM class INNER JOIN program ON class.program_id = program.program_id WHERE class.class_id = \"' . $class_id . '\"';\r\n $stmt = $this->conn->prepare($query);\r\n $stmt->execute();\r\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n if ($row == false) {\r\n return false;\r\n } else {\r\n return $row;\r\n }\r\n } catch (PDOException $e) {\r\n echo $e;\r\n die();\r\n }\r\n }", "function get_classroom($id)\n {\n return $this->db->get_where('classrooms',array('id'=>$id))->row_array();\n }", "function get_chtrm_by_class($classid){\r\n\r\n}", "public function getClassGrades($courseId){\n\t\t\t\n\t\t\t//construct query to grab peer reviews done for\n\t\t\t//the currently active course\n\t\t\t$query = \"SELECT * FROM review WHERE forClass='\" . $courseId . \"'\";\n\t\t\t//echo $query;\n\t\t\t//execute query\n\t\t\t$result = $this->db->query($query);\n\t\t\t\n\t\t\t//check the result to see if it worked\n\t\t\tif($result){\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\t//query failed\n\t\t\telse{\n\t\t\t\techo 'Error getting class grades!';\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}", "public function getStudentClass($student,$educationGrade,$nextGrade,$classes){\n $studentClass = $this->institution_class_students->getStudentNewClass($student);\n if(!is_null($studentClass)){\n return array_search(str_replace($educationGrade['name'],$nextGrade->name,$studentClass->name),array_column($classes,'name'));\n }else{\n return false;\n }\n\n }", "public function getStudentClass($student, $educationGrade, $nextGrade, $classes)\n {\n $studentClass = $this->institution_class_students->getStudentNewClass($student);\n if (!is_null($studentClass)) {\n $class = array_search(str_replace($educationGrade['name'], $nextGrade->name, $studentClass->name), array_column($classes, 'name'));\n if(!($class)){\n $nextGradeName = explode(\" \",$nextGrade->name)[0];\n $educationGrade['name'] = explode(\" \",$educationGrade['name'])[0];\n $class = array_search(str_replace($educationGrade['name'], $nextGradeName, $studentClass->name), array_column($classes, 'name'));\n }\n return $class;\n } else {\n return false;\n }\n }", "public function getGradesForClass($class_id) {\n return $this->get('get_grades_for_class', ['class_id' => $class_id]);\n }", "function get_classes_by_professor($profid){\r\n\t\r\n}", "function get_stdygds($classid){\r\n\r\n}", "public function getClassById($id = 0)\n {\n if ($id === 0)\n {\n $query = $this->db->get('class');\n return $query->result_array();\n }\n\n $query = $this->db->get_where('class', array('class_id' => $id));\n return $query->row_array();\n }", "public function getClass($feeClassId){\n \n \t$query = \"SELECT \n\t\t classId, studyPeriodId ,batchId, isActive,\n (SELECT studyPeriodId FROM class WHERE classId='$feeClassId') AS feeStudyPeriodId\n\t\t FROM \n\t\t\t class cc\n\t\t WHERE\n \t CONCAT_WS(',',cc.batchId,cc.degreeId,cc.branchId) \n\t\t\t IN \n\t\t\t (SELECT CONCAT_WS(',',c.batchId,c.degreeId,c.branchId) FROM class c WHERE c.classId = '$feeClassId')\n\t\t\t ORDER BY \n classId DESC\";\n\t\t\n\t return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "function getclass_autoid($school_id,$classid,$sectionid)\n\t{\n\t\t$this->db->distinct();\n\t\t$this->db->select('id');\n $this->db->from('schoolnew_section_group');\n $this->db->where('school_key_id',$school_id);\n\t\t$this->db->where('class_id',$classid);\n\t\t$this->db->where('section',$sectionid);\n $query = $this->db->get();\n\t $result = $query->first_row();\n\t\t// $result = $query->result();\n return $result->id;\n\t}", "public function getClass(string $class);", "public function show($id)\n {\n $grade = Grade::find($id);\n return $grade;\n\n }", "public function getGradeById($id = 0)\n {\n if ($id === 0)\n {\n $query = $this->db->get('grade');\n return $query->result_array();\n }\n\n $query = $this->db->get_where('grade', array('grade_id' => $id));\n return $query->row_array();\n }", "public function getClasse($id){\n \n $stm = $this->db->query(\n \"SELECT A.AQCL_ID_CLASSE, A.AQCL_ID_AQAS, A.AQCL_CD_CLASSE,\n A.AQCL_DS_CLASSE, A.AQCL_DH_CRIACAO, A.AQCL_DH_FIM\n FROM SAD.SAD_TB_AQCL_CLASSE A WHERE AQCL_ID_AQAS = $id\"\n );\n return $stm->fetchAll(); \n \n }", "public function fetchSemesterClassId ($batch_id, $semester_id)\r\n {\r\n $class_object = new Acad_Model_Class();\r\n $class_object->setBatch_id($batch_id);\r\n $class_object->setSemester_id($semester_id);\r\n return $class_object->fetchClassIds(true, true);\r\n }", "function getclass($search){\n $q = \"select * from class where course like '%$search%' or year like '%$search%' or section like '%$search%' or sem like '%$search%' or subject like '%$search%' order by course,year,section,sem asc\";\n $r = mysql_query($q);\n \n return $r;\n }", "static function getClassNameFromRecordId($rid) {\n\n if(!ctype_digit(trim($rid)))\n throw new Exception(\"Invalid record ID!\");\n \n\n $id = IdaDB::select(\"_sys_classes_join\", array(\"subject\"=>$rid), \"property\",\"\",\"onecell\");\n \n if(!isset($id))\n throw new Exception('No classname found for record!');\n\n $res = XML::getClassID($id);\n\n return $res;\n }", "private function findClassInfo ($class_id)\r\n {\r\n $class = new Acad_Model_Class();\r\n $class->setClass_id($class_id);\r\n $info = $class->fetchInfo();\r\n if ($info instanceof Acad_Model_Class) {\r\n $class_info = array();\r\n $class_info['class_id'] = $info->getClass_id();\r\n $class_info['batch_id'] = $info->getBatch_id();\r\n $class_info['semester_id'] = $info->getSemester_id();\r\n $class_info['semester_type'] = $info->getSemester_type();\r\n $class_info['semester_duration'] = $info->getSemester_duration();\r\n $class_info['handled_by_dept'] = $info->getHandled_by_dept();\r\n $class_info['start_date'] = $info->getStart_date();\r\n $class_info['completion_date'] = $info->getCompletion_date();\r\n $class_info['is_active'] = $info->getIs_active();\r\n return $class_info;\r\n } else {\r\n return false;\r\n }\r\n }", "function show_classes( $student )\n{\n\n\t$psid = $student->getPsid();\n\t$pword = file(\"quotes3.txt\");\n\t$pass = rtrim( $pword[0] );\n\t$db = new mysqli('localhost', 'BeersA', $pass , 'BeersA');\n\t\n\tif ( $db->connect_error):\n\t\tdie (\" Could not connect to db: \" . $db->connect_error);\n\tendif;\n\n\t$result = $db->query(\"select * from Courses where Courses.psid = '$psid' order by Courses.Term\");\n\t\n\techo \"<br/>Here are the classes taken ( term by term ), with the respective grades:<br/>\";\n\t\n\t$rows = $result->num_rows;\n\tfor( $i = 0; $i < $rows; $i++ )\n\t{\n\t\t$row = $result->fetch_array();\n\t\techo \"Term: \". $row['Term'] . \" Class: \".$row['Department'].$row['Class_Number'].\" Grade: \".$row['Grade'].\"<br/>\";\n\t\n\t}\n\n\t$result = $db->query(\"select * from Courses where Courses.psid = '$psid' order by Courses.Department, Courses.Class_Number\");\n\n\techo \"<br/>Here are the classes taken ( alphabetically ), with the respective grades:<br/>\";\n\t\n\t$rows = $result->num_rows;\n\t\n\tfor( $i = 0; $i < $rows; $i++ )\n\t{\n\t\t$row = $result->fetch_array();\n\t\techo \"Term: \". $row['Term'] . \" Class: \".$row['Department'].$row['Class_Number'].\" Grade: \".$row['Grade'].\"<br/>\";\t\n\t}\n\t\n\t/* Report card approach:\n\t\t1. get all the courses that the student has taken\n\t\t2. query for the course number and id in the reqs table\n\t\t3. store solution in array keyed by the req.requirement\n\t\t\ta.) if the req is an elective then number them until 5\n\t\t4.) query distinct for each req\n\t\t5.) search req array for the key of the requirement, if found print with grades, else N\n\t*/\n\t\n\techo \"<br/>Here is the progress on required courses:<br/>\";\n\t$coursesTaken = $student->getCourses();\n\t$requiredCourses = array();\n\t$electiveCount = 0;\n\tfor ( $i = 0; $i < count( $coursesTaken ); $i++ )\n\t{\n\t\t$currNumber = $coursesTaken[$i]->getNumber();\n\t\t$currDepartment = $coursesTaken[$i]->getDepartment();\n\t\t$result = $db->query(\"select * from Reqs where Reqs.Class_Number = '$currNumber' and Reqs.Department = '$currDepartment'\");\n\t\t\n\t\t$rows = $result->num_rows;\n\t\t\n\t\t\n\t\t\n\t\tif ( $rows >0 )\n\t\t{\n\t\t\tif ( $coursesTaken[$i]->getGPA() >= 2.00 )\n\t\t\t{\n\t\t\t\t$req = $result->fetch_array();\n\t\t\t\t\n\t\t\t\tif ( preg_match ( \"/CSElec/\", $req['Requirement'] ) )\n\t\t\t\t{\n\t\t\t\t\tif ( $electiveCount < 5 )\n\t\t\t\t\t{\t\n\t\t\t\t\t\t$electiveCount++;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$courseString = \"S - Req: CSElec\".$electiveCount. \" \". $coursesTaken[$i];\n\t\t\t\t\t\t$requiredCourses[\"CSElec$electiveCount\"] = $courseString;\n\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$courseString = \"S - Req: \".$req['Requirement']. \" \". $coursesTaken[$i];\n\t\t\t\t\t$requiredCourses[$req['Requirement']] = $courseString;\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"Course denied: $coursesTaken[$i]</br>\";\n\t\t\t\t$courseString = \"N - Req: \".$req['Requirement'].\"</br>\";\n\t\t\t\t$requiredCourses[$req['Requirement']] = $courseString;\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t}\n\n\t$result = $db->query(\"select distinct Requirement from Reqs\");\n\t\n\t$rows = $result->num_rows;\n\t\n\tfor ( $i = 0; $i < $rows; $i++ )\n\t{\n\t\t$req = $result->fetch_array();\n\t\tif( array_key_exists( $req['Requirement'], $requiredCourses ) )\n\t\t{\n\t\t\techo $requiredCourses[$req['Requirement']];\n\t\t\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\techo \"N - \" . $req['Requirement'] . \"</br>\";\n\t\t\n\t\t}\n\t\n\t\n\t\n\t}\n\t\n\treturn ;\n\t\t\n}", "public function Grade_Classes(){\n return $this->hasMany( 'App\\Models\\Classroom', 'grade_id');\n }", "private function load_target_grade($id)\r\n {\r\n global $DB;\r\n $sql = \"SELECT * FROM {block_bcgt_target_grades} WHERE id = ?\";\r\n $record = $DB->get_record_sql($sql, array($id));\r\n if($record)\r\n {\r\n $this->extract_params($record);\r\n }\r\n }", "static function get($class, $id, $notFoundMsg = \"Record %d not found\")\n\t{\n\t\tif (! array_key_exists($class, self::$_list))\n\t\t\tself::$_list[$class] = array();\n\t\t\n\t\tif (array_key_exists($id, self::$_list[$class]))\n\t\t\treturn self::$_list[$class][$id];\n\t\t\n\t\t$r = new $class();\n\t\tif (! $r->load($id))\n\t\t\tthrow new Naf_Exception_404(get_class($rec) . \": \" . sprintf($notFoundMsg, $id));\n\t\t\n\t\treturn self::$_list[$class][$id] = $r;\n\t}", "function getClass();", "static function retrieveByClassroomId($value) {\n\t\treturn static::retrieveByColumn('classroom_id', $value);\n\t}", "public function getStudentsByClassIdAndSubGen($lastSeasonId,$classe){\n // $this->db->select('students.*,points.subject,points.sc,points.te');\n $this->db->select('students.*');\n $this->db->join('classes','students.classe=classes.id');\n // $this->db->join('points','points.student=students.id');\n // $this->db->where('students.classe',$classeId);\n $filter = array(\n 'students.season'=>$lastSeasonId,\n 'classes.id'=>$classe\n // 'points.subject'=>$sub\n );\n $this->db->where($filter);\n // $this->db->where_in('points.subject',$ids);\n return $this->db->get('students')->result();\n }", "public function getOne($gradeId)\n {\n return\n DB::table('grades')\n ->select(\n 'id',\n 'eff_begin as effBegin',\n 'eff_end as effEnd',\n 'code',\n 'name',\n 'ordinal',\n 'work_month as workMonth',\n 'bottom_rate as bottomRate',\n 'mid_rate as midRate',\n 'top_rate as topRate'\n )\n ->selectRaw('(bottom_rate+top_rate)/2 as \"midRate\"')\n ->where([\n ['tenant_id', $this->requester->getTenantId()],\n ['company_id', $this->requester->getCompanyId()],\n ['id', $gradeId]\n ])\n ->first();\n }", "public static function enrolled($id)\r\n\t{\r\n\t\t$classes = DB::query('SELECT e.course_id AS id,\r\n\t\t\t\t\t\t\t\tc.crn_num AS crn,\r\n\t\t\t\t\t\t\t\tc.course_name AS name,\r\n\t\t\t\t\t\t\t\te.class_grade AS grade\r\n\t\t\t\t\t\t\tFROM grad_app.enrolls e\r\n\t\t\t\t\t\t\tINNER JOIN grad_app.course c ON e.course_id = c.id\r\n\t\t\t\t\t\t\tINNER JOIN grad_app.student s ON e.student_id = s.id\r\n\t\t\t\t\t\t\tWHERE e.student_id = ?', array($id));\r\n\t\treturn $classes;\r\n\t}", "public function searchClass($class){\n\n\n\t\t// this will add a space if one is missing inbetween the course letters and numbers\n\t\t// if a space already exists then nothing will be changed\n\t\tpreg_match('/(\\w{1,4})\\s?(\\d{0,3})/', $class, $Sarray);\n\n\t\tif ($Sarray[2] !=\"\"){\n\t\t\t$class= $Sarray[1] . \" \" . $Sarray[2];\n\t\t}\n\t\telse {\n\t\t\t$class=$Sarray[1];\n\t\t}\n\n\t\t$sql = \"SELECT * FROM CoursesOffered WHERE courseName LIKE '%\". $class .\"%' LIMIT 20\"; //search the DB for matches\n\t\tmysqli_free_result($result);\n\t\t$result = mysqli_query($this->db,$sql);\n\n\t\t// prints the results\n\t\tif($result){//If query successfull\n\n\t\t\techo\t\"\t<thead>\n\t\t\t\t\t\t\t<tr class = 'results'>\n\t\t\t\t\t\t\t\t<th>Course Name</th>\n\t\t\t\t\t\t\t\t<th>Course Title</th>\n\t\t\t\t\t\t\t\t<th>Prerequisites</th>\n\t\t\t\t\t\t\t\t<th>Semester Offered</th>\n\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody class='connectedSortable'>\";\n\t\t\t\t\n\t\t\twhile ($row = mysqli_fetch_assoc($result)) { //Creates a loop to loop through results\n\t\t\t\t\t\n\t\t\t\techo \"<tr class='results'><td>\" . $row ['courseName'] . \"</td><td>\" . $row ['courseTitle'] . \"</td>\" . \"<td>\" . $row ['pre_reqs'] . \"</td>\" . \"<td>\" . $row ['semester_offered'] . \"</td></tr>\";\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\techo \"No Results Found\";\n\t\t}\n\n\t}", "function resolveClass( $classID )\n\t\t{\n\t\t\t$return = NULL;\n\t\t\t\n\t\t\t//connect to mysql database and fetch test information\n\t\t\t$conn = mysql_connect($dbHost, $dbUser, $dbPass) or die(mysql_error());\n\t\t\tmysql_select_db($dbName) or die(mysql_error());\n\t\n\t\t\t// Select this test from the database and its information\n\t\t\t$query_result = mysql_query(\"SELECT ClassID, ClassName FROM Class WHERE ClassID = \".$classID)\n\t\t\t\tor die(mysql_error()); \n\t\n\t\t\t// If a test exists with the given test id\n\t\t\tif( mysql_num_rows( $query_result ) > 0 )\n\t\t\t{\n\t\t\t\t$row = mysql_fetch_array( $query_result );\n\t\t\t\t\n\t\t\t\t$return = $row;\n\t\t\t}\n\t\t\t\n\t\t\tmysql_close($conn);\n\t\t\t\n\t\t\t// return the test metadata and the metadata about the questiosn on this test.\n\t\t\treturn $return;\n\t\t}", "public function fetchClassInfo ($class_id)\r\n {\r\n $member_id = $this->getMember_id(true);\r\n $student_class_object = new Acad_Model_StudentClass();\r\n $student_class_object->setMember_id($member_id);\r\n $student_class_object->setClass_id($class_id);\r\n return $student_class_object->fetchInfo();\r\n }", "public function getGrdStudents( $grdID, $sessionID ){\r\n\t\t$this->DDB = $this->load->database(\"default\",TRUE);\r\n\t\t\r\n\t\t$where = array(\"grade_id\" => $grdID, \"std_status_category\"=>\"Student\");\r\n\t\t$this->DDB->select(\"`id`,`official_name`,`abridged_name`, `gender`, `gs_id`,`section_dname` AS `section`,`student_status_name` AS `status`\");\r\n\t\t$this->DDB->from(\"`class_list`\");\r\n\t\t$this->DDB->where( $where );\r\n\t\t//$this->DDB->where(\"(std_status_category='Student' OR std_status_category='Fence')\", NULL, FALSE);\r\n\t\t$this->DDB->order_by(\"section_id\", \"ASC\");\r\n\t\t$this->DDB->order_by(\"call_name\", \"ASC\"); \r\n\t\t$query = $this->DDB->get();\r\n\t\tif( $query->num_rows() > 0 ){\r\n\t\t\t$results = $query->result_array();\r\n\t\t\treturn $results;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t\t\r\n\t}", "public function selectClass(){\n\t\t\t$query = new Query();\n\n\t\t\t$query->tables = array(\"classi\");\n\t\t\t$query->fields = array(\"id\", \"_Desc\");\n\t\t\t\n\t\t\tif ($query->Open()){\n\t\t\t\twhile ($row = $query->GetNextRecord(true)){\n\t\t\t\t\t$classes[] = $row;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $classes;\n\t\t}", "public function get_class_name($prntid)\n\t{\n\t\t$this->db->select('cls.cls_name, std.*');\n\t\t$this->db->from('cms_students std');\n\t\t$this->db->join('cms_classes cls','std.cls_id=cls.cls_id','left');\n\t\t$this->db->where('std.prnt_id', $prntid);\n\t\t$query = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $query->result();\n\t}", "function getClassByGuid($guid) {\n $sql = \"SELECT module_guid, module_class, module_type\n FROM %s\n WHERE module_type = 'connector'\n AND module_guid = '%s'\n ORDER BY module_class ASC\";\n $sqlParams = array($this->tableModules, $guid);\n $result = NULL;\n if ($res = $this->databaseQueryFmt($sql, $sqlParams)) {\n if ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $result = $row['module_class'];\n }\n }\n return $result;\n }", "public function get_data($class_id, $key);", "function getClassInfo($classId, $fields = '*') {\r\n $this->db->select($fields);\r\n $this->db->where('id', $classId);\r\n return $this->db->get('class')->row();\r\n }", "function get_user_class_name($i)\n{\n global $CURUSER, $pdo;\n if ($i == $CURUSER[\"class\"]) {\n return $CURUSER[\"level\"];\n }\n\n $res = $pdo->run(\"SELECT level FROM groups WHERE group_id=\" . $i . \"\");\n $row = $res->fetch(PDO::FETCH_LAZY);\n return $row[0];\n}", "public function get_classes_by_courseid() {\n $courseid = $this->input->post('courseid');\n $this->load->helper('common_helper');\n\n $classes = getclasses_by_courseid($courseid);\n\n $states_arr = array();\n foreach ($classes as $item) {\n $classes_arr[] = $item;\n }\n\n echo json_encode($classes_arr);\n exit;\n }", "function load_grade_item() {\n if (empty($this->grade_item) && !empty($this->itemid)) {\n $this->grade_item = grade_item::fetch('id', $this->itemid);\n }\n return $this->grade_item;\n }", "public function get_class_info($class_id)\n {\n $class = \\App\\Classes::find($class_id);\n if(!is_null($class)){\n return $class->toJson();\n }else{\n echo \"null\";\n }\n }", "function getGunClasses()\r\n\t{\r\n\t\tglobal $debug;\r\n\t\tglobal $msg;\r\n\t\t\r\n\t\t$dbh = getOpenedConnection();\r\n\t\t$list = array();\r\n\t\t\r\n\t\tif ($dbh == null) {\r\n\t\t\t$dbh = openDB();\r\n\t\t\tif ($dbh == null)\r\n\t\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t\r\n\t\t//$sql = \"select Id, Grade, Description from tbl_Pistol_GunClassification\";\r\n\t\t$sql = \"select Id, Grade, Description from tbl_Pistol_GunClassification \r\n\t\t\t\twhere ForScoreType LIKE\r\n\t\t\t\t\t\tCONCAT('%', \r\n\t\t\t\t\t\t\t(select ScoreType from tbl_Pistol_Competition comp, tbl_Pistol_CompetitionDay cDay \r\n\t\t\t\t\t\t\twhere cDay.Id = $this->id and cDay.CompetitionId = comp.Id)\r\n\t\t\t\t\t\t\t, '%') \";\r\n\t\t\r\n\t\tif ($debug)\r\n\t\t\tprint_r($sql . \"<br><br>\");\r\n\t\t\t\r\n\t\t$result = mysqli_query($dbh,$sql);\r\n\t\t$rc = mysqli_affected_rows($dbh);\r\n\t\t\r\n\t\tif ($rc < 0)\r\n\t\t{\r\n\t\t\t$msg = mysqli_error($dbh);\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\twhile ($obj = mysqli_fetch_object($result))\r\n\t\t{\r\n\t\t\tunset($row);\r\n\t\t\t$row[\"Id\"] = $obj->Id;\r\n\t\t\t$row[\"Grade\"] = $obj->Grade;\r\n\t\t\t$row[\"Description\"] = $obj->Description;\r\n\t\t\t\r\n\t\t\t$list[] = $row;\r\n\t\t}\r\n\r\n\t\tmysqli_free_result($result);\r\n\r\n\t\treturn $list;\r\n\t}", "public function getAssignedRubricAsClass($studentID)\n {\n $sql = \"SELECT * FROM assignedRubrics where studentID = :studentID\";\n if ($stmt = $this->dbHandle->prepare($sql))\n {\n // Bind variables to the prepared statement as parameters\n $stmt->bindParam(\":studentID\", $param_studentID, PDO::PARAM_STR);\n // Set parameters\n $param_studentID = trim($studentID);\n // Attempt to execute the prepared statement\n $stmt->execute();\n $assignedRubric = [];\n\n while ($row = $stmt->fetch()) {\n $assignedRubric[] = $row;\n }\n \n return $assignedRubric;\n }\n else\n {\n return false;\n }\n //Close statement\n unset($stmt);\n //Close connection\n unset($pdo);\n }", "public function getClassRoomByID($id)\n {\n if ($id) {\n global $wpdb;\n $sql = \"SELECT * FROM \" . $this->class_room . ' where id = ' . esc_sql(trim($id));\n $rows = $wpdb->get_row($sql);\n return $rows;\n } else {\n return null;\n }\n }", "private function findClassIds ($class_id = null, $semester_id = null, \r\n $is_active = null)\r\n {\r\n $class_id_basis = null;\r\n $semester_id_basis = null;\r\n $is_active_basis = null;\r\n $class = new Acad_Model_Class();\r\n if ($class_id) {\r\n $class_id_basis = true;\r\n $class->setBatch_id($class_id);\r\n }\r\n if ($semester_id) {\r\n $semester_id_basis = true;\r\n $class->setSemester_id($semester_id);\r\n }\r\n if ($is_active) {\r\n $is_active_basis = true;\r\n $class->setIs_active($is_active);\r\n }\r\n $class_ids = $class->fetchClassIds($class_id_basis, $semester_id_basis, \r\n $is_active_basis);\r\n if (is_array($class_ids)) {\r\n return $class_ids;\r\n } else {\r\n return false;\r\n }\r\n }", "function update_class($class_id){\n $query=\"SELECT * FROM edu_class WHERE class_id='$class_id'\";\n $resultset=$this->db->query($query);\n return $resultset->result();\n }", "function getActClassId() {\n if (isset($_SESSION['actClass'])) {\n return intval($_SESSION['actClass']);\n } else {\n return -1;\n }\n}", "function get_student_class_attendance($class_id)\n\t\t{\n\t\t\t$array = array(\"attendance.status\"=>2,\"attendance.student_id !=\"=>0,\"attendance.attandence_class\"=>$class_id);\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('attendance');\n\t\t\t$this->db->join('student', 'student.student_id = attendance.student_id');\n\t\t\t$this->db->where($array);\n\t\t\t$query = $this->db->get();\n\t\t\t$attendance =$query->result();\n\t\t\tforeach($attendance as $row){\n\t\t\t\techo '<tr class=\"gradeA\"><td>' .date(\"d-M-Y\", strtotime($row->date)) . '</td>\n\t\t\t\t<td>'. $row->class_id.'</td>\t\n\t\t\t\t<td>'. $row->name.'</td>\n\t\t\t\t<td>'. $row->description.'</td>\n\t\t\t\t</tr>';\n\t\t\t} \n\t\t}", "public function getClasseCodigo($id){\n \n $stm = $this->db->query(\n \"SELECT aqcl_cd_classe\n FROM sad_tb_aqcl_classe \n WHERE aqcl_id_classe = $id\"\n );\n return $stm->fetchAll(); \n \n }", "public function getClassByOID(string $oid): string;", "private static function get_course_class( $the_course, $args = array() ) {\n\t\t\t$course_id = absint( $the_course->ID );\n\t\t\t$type = $the_course->post_type;\n\n\t\t\t$class_name = self::get_class_name_from_course_type( $type );\n\n\t\t\t// Filter class name so that the class can be overridden if extended.\n\t\t\treturn apply_filters( 'learn-press/course/object-class', $class_name, $type, $course_id );\n\t\t}", "function bfa_category_id_class($classes) {\r\n\t global $post;\r\n\t if (is_single()) {\t\r\n\t \tforeach((get_the_category($post->ID)) as $category)\r\n\t \t$classes[] = 'category-'.$category->slug;\r\n\t\t}\r\n\t\treturn $classes;\r\n\t}", "public function selectOneToFive($class, $term, $year, $student_id){\n\t\ttry {\n\n\t\t\t$stmt = $this->con->prepare(\"select * from onetofivemark where class=:class and term=:term and year=:year and student_id=:student_id and status=1 \");\n\t\t\t$stmt->bindValue(':class', $class, PDO::PARAM_STR);\n\t\t\t$stmt->bindValue(':term', $term, PDO::PARAM_STR);\n\t\t\t$stmt->bindValue(':year', $year, PDO::PARAM_STR);\n\t\t\t$stmt->bindValue(':student_id', $student_id, PDO::PARAM_STR);\n\t\t\t$stmt->execute();\n\t\t\treturn $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\n\t\t} catch (PDOException $e) {\n\t\t\techo \"Error: \".$e->getMessage().\"<br>\";\n\t\t\tdie();\n\t\t}\n\t}", "public static function getGradeById($id)\n\t\t{\n\t\t\t$connection = Connection::getConnection();\n\t\t\t$statement = $connection->prepare(\"SELECT id,name_fr as name,age FROM scholar_level WHERE id = ?\");\n\t\t\t$statement->setFetchMode(PDO::FETCH_ASSOC);\n\t\t\t$statement->bindParam(1, $id);\n\t\t\t$statement->execute();\n\n\t\t\t$content = [];\n\n\t\t\tif ($row = $statement->fetch()) {\n\t\t\t\t$content = $row;\n\t\t\t\t// $content[$row[\"id\"]] = $row;\n\t\t\t}\n\n\t\t\treturn $content;\n\t\t}", "function getvalClass(){\n\t\t$nodepal=$this->getMainNode();\n\t\t$cant_clases=$this->cant_clases;\n\t\t$valor=$this->clases[$nodepal][$cant_clases];\n\n\t\tif($valor!=''){\n\t\t\treturn $valor;\n\t\t}\n\t\telse{\n\t\t\treturn -1;\n\t\t}\n\t}", "public function get_grade($memberid) {\n if (isset($this->grades[$memberid])) {\n return $this->grades[$memberid];\n }\n }", "public function getClass($className);", "public function getClass($typeId);", "function resolve($id, $className);", "public function fetch_class()\n\t{\n\t\treturn $this->route_stack[self::SEG_CLASS];\n\t}", "function get_num_students($classid){\r\n\t\r\n}", "function category_id_class($classes) {\n\tglobal $post;\n\tforeach((get_the_category($post->ID)) as $category)\n\t\t$classes [] = 'cat-' . $category->cat_ID . '-id';\n\t\treturn $classes;\n}", "function category_id_class($classes) {\n\t\tglobal $post;\n\t\tforeach((get_the_category($post->ID)) as $category)\n\t\t\t$classes [] = 'cat-' . $category->cat_ID . '-id';\n\t\t\treturn $classes;\n\t}", "static private function getClassNameFromId($id) {\n list($className, $rest) = explode(self::ID_CLASS_NAME_SEPARATOR, $id, 2);\n return $className;\n }", "public function class_wise_student_list($class_id){\n\t $this->db->select('users.class_name,users.name,users.u_id')->from('users');\n\t\t $this->db->where('users.class_name',$class_id);\n\t\t $this->db->where('users.role_id',7);\n\t\t $this->db->where('users.status',1);\n\t\t $this->db->where('users.bus_transport','Yes');\n\t\t return $this->db->get()->result_array(); \n\t }", "function get_classes($class_id)\n\t\t{\n\t\t\t$get_student_list = $this->db->get_where('student' , array('class_id' => $class_id))->result_array();\n\t\t\techo '<option value=\"\">Select student</option>';\n\t\t\tforeach ($get_student_list as $row_value){\n\t\t\t\techo '<option value=\"'.$row_value['student_id'].'\">'.$row_value['name'].'</option>';\n\t\t\t}\n\t\t}", "public function checkInClass($degreeId) {\n \n $query = \"SELECT COUNT(*) AS found \n FROM class\n WHERE degreeId=$degreeId\";\n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "public function get_student_member($class_id = '') {\n $this->db->select(\"c.id, b.id as 'class_member_id', a.fullname, a.profile_picture, a.phone, a.gender, a.date_of_birth, sb.name as subgroup\");\n $this->db->from('user_profiles a');\n $this->db->join('class_members b', 'a.user_id = b.student_id');\n $this->db->join('users c', 'a.user_id = c.id');\n $this->db->join('classes d', 'b.class_id = d.id');\n $this->db->join('subgroup sb', 'sb.id = a.subgroup_id');\n $this->db->where('b.class_id', $class_id);\n $this->db->where('c.status', 'active');\n $this->db->where('d.id', $class_id);\n return $this->db->get()->result();\n }", "function category_id_class($classes) {\n\tglobal $post;\n\tforeach((get_the_category($post->ID)) as $category)\n\t\t$classes[] = 'cat-' . $category->cat_ID . '-id';\n\t\t$classes[] = $post->post_type . '-' . $post->post_name;\n\t\treturn $classes;\n}", "protected function getSchoolClass() {\n return Schoolclass::orderBy('class_name')->lists('class_name', 'id')->all();\n }", "protected function getClass_pagenum($id=0){\n\t\t\n\t\t\tif($id){//only change one class\n\t\t\t\t\n\t\t\t\t\t$nums=XhTitle::model()->count(\"cl_id={$id}\");\n\t\n\t\t\t\t\tYii::app()->db->createCommand(\"update xh_class set cl_articles={$nums} where cl_id={$id}\");\t\t\n\t\t\t\t\t\n\t\t\t}else{\n\n\t\t\t\t\t$nums=Yii::app()->db->createCommand(\"select cl_id,count(cl_id) as allnum from xh_title \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t where tt_visible=1 group by cl_id\")->query()->readAll();\n\t\t\tprint_r($nums);\n\t\t\t\t\tforeach($nums as $key=>$row){\n\t\t\t\t\t\t\n\t\t\t\t\t\tYii::app()->db->createCommand(\"update xh_class set cl_articles={$row['allnum']} where cl_id={$row['cl_id']}\")->query();\t\n\t\t\t\t\t\t\n\t\t\t\t \t\t}\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\n\t}", "public function getClassesByProgram($program_id)\r\n {\r\n try {\r\n $query = 'SELECT * FROM class INNER JOIN program ON class.program_id = program.program_id WHERE class.program_id = \"' . $program_id . '\"';\r\n $stmt = $this->conn->prepare($query);\r\n $stmt->execute();\r\n $row = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n if ($row == false) {\r\n return false;\r\n } else {\r\n return $row;\r\n }\r\n } catch (PDOException $e) {\r\n echo $e;\r\n die();\r\n }\r\n }", "public function getrate($id)\n {\n return CoursesRate::find($id);\n }", "function viewClass($classId){\n try {\n $db = getConnection();\n\n $sql2 = \"SELECT categoryId, categoryName, percentage FROM category WHERE classId=:classId\";\n $stmt2 = $db->prepare($sql2);\n $stmt2->bindParam('classId', $classId);\n $stmt2->execute();\n $categories = $stmt2->fetchAll(PDO::FETCH_OBJ);\n\n echo '{\"Categories\": [' ;\n $i = 0;\n foreach($categories as $category) {\n if($i != 0) {\n echo ',';\n } else {\n $i++;\n }\n $categoryId = $category->categoryId;\n $categoryName = $category->categoryName;\n $percentage = $category->percentage;\n $sql3 = \"SELECT gradeId, gradeName, percentage FROM grades WHERE categoryId=:categoryId\";\n $stmt3 = $db->prepare($sql3);\n $stmt3->bindParam('categoryId', $categoryId);\n $stmt3->execute();\n $grades = $stmt3->fetchAll(PDO::FETCH_OBJ);\n echo '{\"categoryId\": \"'. $categoryId .'\", \"categoryName\": \"'. $categoryName .'\", \"categoryPercentage\": \"'. $percentage .'\"';\n echo ', \"grades\": ['; \n $j =0;\n foreach($grades as $grade) {\n if($j != 0) {\n echo ',';\n } else {\n $j++;\n }\n echo json_encode($grade);\n }\n echo ']}';\n }\n echo ']}}';\n\n $db = null;\n\n } catch(PDOExection $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}';\n }\n}", "public function get_grade_letter($courseid, $grade) {\n global $remotedb;\n $sql = \"SELECT l.letter, con.id\n FROM {grade_letters} l\n JOIN {context} con ON l.contextid = con.id AND con.contextlevel=50\n AND con.instanceid=? AND l.lowerboundary <=? \n ORDER BY l.lowerboundary DESC limit 1\";\n $params = array($courseid, $grade);\n $letters = $remotedb->get_record_sql($sql, $params);\n if ($letters) {\n $letter = $letters->letter;\n } else {\n $defaultletters = grade_get_letters();\n $val = (int) $grade;\n foreach ($defaultletters as $boundary => $value) {\n if ($val >= $boundary) {\n $letter = format_string($value);\n break;\n }\n }\n }\n return $letter;\n }", "public function get()\n\t{\n\t\tif(isset( $this->_id ))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$sql = 'select * from class where id = :id';\n\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t$stmt->execute();\n\t\t\t\t$result = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t\treturn $result;\t\t\t\n\t\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\theader(\"HTTP/1.0 500 Internal server error\");\n\t\t\t\techo $e;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$sql = 'select * from class order by section';\n\t\t\t\t$data = [\n\t\t\t\t\t'id' => $this->_id,\n\n\t\t\t\t];\n\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t$stmt->execute($data);\n\t\t\t\t$result = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t\treturn $result;\t\t\t\n\t\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\theader(\"HTTP/1.0 400 Bad request\");\n\t\t\t\techo $e;\n\t\t\t}\n\t\t}\n\t}", "public function get_feedback_entry($gradeid) {\n global $DB;\n return $DB->get_record('assignfeedback_helixfeedback', array('grade' => $gradeid));\n }", "function getActClass() {\n $class = Appl::getMember(\"actClass\");\n if ($class!==null)\n return $class;\n global $db;\n if (isset($_SESSION['actClass'])) {\n return $db->getClassById(intval($_SESSION['actClass']));\n }\n return null;\n}", "public function show($id)\n\t{\n\t\t$grade = Grade::with('teacher')->findOrFail($id);\n\n\t\treturn $grade;\n\t}", "function getStudent($class_id){\n \t$result = array();\n \t$owner_id = $this->model->selectWhere(array('owner_id'),\"id = \".\"'$class_id'\"); \t \n \tif(isset($class_id)){\n \t\t$UserClassModel = new User_Class_Model(); \t\t\n \t\t$user_id = $UserClassModel->selectWhere(array('user_id'),\"class_id = \".\"'$class_id'\");\n \t\tif(isset($user_id)){\n \t\t\tforeach ($user_id as $key => $value) {\n \t\t\t\t$UserModel = new User_Model(); \t\t\t\t\n \t\t\t\t$user_id = $value['user_id'];\n \t\t\t\tif($owner_id[0]['owner_id']==$user_id)\n \t\t\t\t\tcontinue;\n \t\t\t\t$user = $UserModel->selectWhere('*',\"\tid = \".\"'$user_id'\");\n \t\t\t\tarray_push($result, $user);\n \t\t\t}\n \t\t\techo json_encode($result[0]);\n \t\t}\n \t}else{\n \t\techo json_encode('failed');\n \t} \t\t\n \t\n }", "public function getFeatureClass ($feature);", "function getClassInfoForUser($userId) {\r\n $regEx = '/^[0-9]+$/';\r\n // first check that the user id only contains numbers\r\n if (!preg_match($regEx, $userId)) {\r\n return false;\r\n } else {\r\n $query = $this->db->query(\"SELECT class.* FROM class WHERE class.id IN (SELECT s.subscriptionClass FROM subscription s WHERE s.subscriptionStartDate <= CURRENT_DATE AND s.subscriptionEndDate >= CURRENT_DATE AND s.subscriptionUser = $userId) UNION SELECT class.* FROM class WHERE class.classAdmins IN (SELECT g1.group_id FROM group_has_user g1 WHERE g1.user_id = $userId) UNION SELECT class.* FROM class, lecture l WHERE class.id = l.lectureClass AND l.lectureAdmin = $userId GROUP BY id ORDER BY id;\");\r\n\r\n return $query->result();\r\n }\r\n }", "function addClassURI(){\n\t\t$classURIs = $this->classArray;\n\t\t$output = \"\";\n\t\t$db = $this->startDB();\n\t\t$sql = \"SELECT class_uuid, class_label\n\t\tFROM sp_classes\n\t\tWHERE 1\n\t\t\";\n\t\t$result = $db->fetchAll($sql);\n\t\tforeach($result as $row){\n\t\t\t$uuid = $row[\"class_uuid\"];\n\t\t\t$label = $row[\"class_label\"];\n\t\t\t$lcLabel = strtolower($label);\n\t\t\tforeach($classURIs as $lkey => $luri){\n\t\t\t\t$lclkey = strtolower($lkey);\n\t\t\t\tif($lclkey == $lcLabel){\n\t\t\t\t\t$uriex = explode(\"/\", $luri);\n\t\t\t\t\t$suffix = $uriex[count($uriex)-1];\n\t\t\t\t\t$prefURI = \"oc-gen:\".$suffix;\n\t\t\t\t\t$where = \"class_uuid = '$uuid' \";\n\t\t\t\t\t$data = array(\"class_uri\" => $prefURI);\n\t\t\t\t\t$db->update(\"sp_classes\", $data, $where);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function g(string $sClass)\n {\n return $this->offsetGet($sClass);\n }", "function getGradeTransaction($grade_id){\n $school_id = '';\n if(($this->session->userdata('school_id'))) {\n $school_id = $this->session->userdata('school_id');\n if($school_id > 0){\n $this->db->where('school_id',$school_id);\n } \n }\n $transaction = 0;\n $count = 0;\n \n \n //Grade Evaluation table\n $result_array = $this->db->get_where(\"grading_evaluation\", array(\"grade_id\" => $grade_id))->result_array();\n $count = count($result_array);\n \n if($count)\n { \n $transaction = 1;\n return $transaction;\n } \n \n return $transaction;\n }", "public function getUpgrade($class, $id) {\n\t\t$batch = $this->getBatch($class);\n\n\t\tif (!$batch) {\n\t\t\treturn;\n\t\t}\n\n\t\t$version = $batch->getVersion();\n\t\t$upgrade_id = \"{$id}:{$version}\";\n\n\t\t// Database holds the information of which upgrades have been processed\n\t\tif ($this->upgradeExists($upgrade_id)) {\n\t\t\t$this->logger->info(\"Upgrade $id has already been processed\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Create a new ElggUpgrade to represent the upgrade in the database\n\t\t$object = new ElggUpgrade();\n\t\t$object->setId($upgrade_id);\n\t\t$object->setClass($class);\n\t\t$object->title = \"{$id}:upgrade:{$version}:title\";\n\t\t$object->description = \"{$id}:upgrade:{$version}:description\";\n\t\t$object->offset = 0;\n\n\t\ttry {\n\t\t\t$object->save();\n\t\t\treturn $object;\n\t\t} catch (\\UnexpectedValueException $ex) {\n\t\t\t$this->logger->error($ex->getMessage());\n\t\t}\n\t}", "function getClassForTenantStatus($status_id)\n{\n $status_list = getTenantStatuses();\n return $status_list[$status_id]['class'];\n}", "public function getClassInfo($classId) {\n\n $res = XML::getClassID($classId);\n\n if(!$res) {\n $res = XML::attributeQuery(\"//rdfs:Class\", \"rdf:ID\", $classId, \"rdf:ID\", $this->G->CRM);\n }\n $this->classId = $res[\"id\"];\n $this->className = $res[\"title\"];\n $this->classNameFull = implode(\".\", $res);;\n $this->unique = $this->G->getUniqueFlag($this->classId);\n $this->mapId = 0;\n \n\n }", "function is_group_at_risk( $class_id ) {\n\t$class_id = get_post_meta( $group_id, 'class', true );\n\n\treturn is_class_at_risk( $school_id );\n}", "public function selectSingleGpaTotal($class, $term, $year, $student_id){\n\t \ttry {\n\n\t \t\t$stmt = $this->con->prepare(\"select totalmark + gpa from sixtoeightmarksheet where class=:class and term=:term and year=:year and student_id=:student_id and status=1 \");\n\t \t\t \n\t \t\t$stmt->bindValue(':class', $class, PDO::PARAM_STR);\n\t \t\t$stmt->bindValue(':term', $term, PDO::PARAM_STR);\n\t \t\t$stmt->bindValue(':year', $year, PDO::PARAM_STR);\n\t \t\t$stmt->bindValue(':student_id', $student_id, PDO::PARAM_STR);\n\t \t\t$stmt->execute();\n\n\t \t\treturn $stmt->fetch(PDO::FETCH_ASSOC);\n\t \t\t \n\t \t\t\n\t \t} catch (PDOException $e) {\n\t \t\techo \"Error: \".$e->getMessage().\"<br />\";\n\t \t\tdie();\n\t \t}\n\t }", "function studiare_class_attribute($value) {\n\techo studiare_get_class_attribute($value);\n}", "public function getClassStudent($batch, $class)\n {\n// FROM setclasses s\n// INNER JOIN student st\n// ON s.std_ID = st.stid\n// WHERE s.batch='{$batch}' AND s.class={'$class'}\";\n\n $query = \"SELECT s.batch , s.class ,s.created_year , st.fname FROM setclasses s \n INNER JOIN student st \n ON s.std_ID = st.stid \n WHERE s.batch='{$batch}' AND s.class='{$class}'\";\n\n $sth = $this->db->prepare($query);\n $sth->execute() or die(print_r($sth->errorInfo(), true));\n $final = $sth->fetchAll();\n return $final;\n\n }", "public function handleClassSchoolChange($classId = \"all\", $schoolId = null)\n {\n if ($schoolId == \"all\") {\n unsetActSchool();\n return ;\n }\n\n if ($schoolId != null) {\n unsetActClass();\n setActSchool($schoolId);\n }\n $class = null;\n if (null != $classId) {\n if ('all' == $classId) {\n unsetActClass();\n return null;\n }\n $class = $this->getClassById(intval($classId));\n if ($class==null) {\n $classId = str_replace(\" \", \"\", $classId);\n $classId = str_replace(\"-\", \"\", $classId);\n if (strlen($classId) == 7) {\n $class = $this->getClassByText(substr($classId, 0, 4) . ' ' . substr($classId, 4, 3));\n if ($class == null)\n $class = $this->getClassByText(substr($classId, 3, 4) . ' ' . substr($classId, 0, 3));\n }\n }\n }\n if ($class==null) {\n $class = getActClass();\n } else {\n setActClass($class[\"id\"],$class[\"schoolID\"]);\n }\n return $class;\n }", "public function getOneByCode($gradeCode)\n {\n return\n DB::table('grades')\n ->select(\n 'id',\n 'eff_begin as effBegin',\n 'eff_end as effEnd',\n 'code',\n 'name',\n 'ordinal',\n 'work_month as workMonth',\n 'bottom_rate as bottomRate',\n 'mid_rate as midRate',\n 'top_rate as topRate'\n )\n ->selectRaw('(bottom_rate+top_rate)/2 as \"midRate\"')\n ->where([\n ['tenant_id', $this->requester->getTenantId()],\n ['company_id', $this->requester->getCompanyId()],\n ['code', $gradeCode]\n ])\n ->first();\n }", "public function getStudent($id){\n\t\t$this->db->where('id',$id);\n\t\t$query = $this->db->get('students');\n\t\treturn $query->row();\n\t}" ]
[ "0.67843014", "0.6700869", "0.66379195", "0.64641935", "0.63689137", "0.6306242", "0.6274677", "0.62539315", "0.624929", "0.61943233", "0.6159662", "0.6152666", "0.609955", "0.6036327", "0.6018728", "0.59580636", "0.5871087", "0.58137476", "0.5803317", "0.57713073", "0.57241505", "0.5610497", "0.5607248", "0.5604697", "0.55825186", "0.5562863", "0.55551374", "0.5546278", "0.5543825", "0.55436766", "0.55314994", "0.55291766", "0.55236715", "0.5517947", "0.5496358", "0.5491943", "0.5484359", "0.5480914", "0.5471695", "0.5464241", "0.5448292", "0.5442249", "0.5423639", "0.54156", "0.54151434", "0.54060405", "0.53938675", "0.5392899", "0.53916216", "0.5390318", "0.53738433", "0.5373633", "0.5366027", "0.5315319", "0.5312341", "0.5301199", "0.5299257", "0.52851874", "0.5281233", "0.52759945", "0.5275665", "0.5274311", "0.5265135", "0.5261392", "0.52597857", "0.5245754", "0.5242308", "0.5240353", "0.523495", "0.52326167", "0.5230893", "0.5210493", "0.520876", "0.51943237", "0.5187997", "0.51749146", "0.5173443", "0.5173346", "0.51587886", "0.5146254", "0.51442635", "0.5143959", "0.5139322", "0.5135901", "0.5135123", "0.51319176", "0.5131652", "0.5129743", "0.5129345", "0.5125524", "0.5121978", "0.5111921", "0.5108836", "0.51037675", "0.50978434", "0.5095132", "0.5091986", "0.50869733", "0.50866693", "0.5086069" ]
0.72668713
0
Should notices be generated?
function test($case) { $plain = "The quick brown fox jumps over the lazy dog."; $fn = "bug71263.bz2"; $compressed = (string) bzcompress($plain); echo "Compressed len = ", strlen($compressed), "\n"; if ($case == 1) { // Set a random byte in the middle of the compressed data // --> php_bz2_decompress_filter() detects fatal error // --> fread() displays empty string then garbage, no errors detected: $compressed[strlen($compressed) - 15] = 'X'; } else if ($case == 2) { // Truncate the compressed data // --> php_bz2_decompress_filter() does not detect errors, // --> fread() displays the empty string: $compressed = substr($compressed, 0, strlen($compressed) - 20); } else { // Corrupted final CRC // --> php_bz2_decompress_filter() detects fatal error // --> fread() displays an empty string, then the correct plain text, no error detected: $compressed[strlen($compressed)-2] = 'X'; } file_put_contents($fn, $compressed); $r = fopen($fn, "r"); stream_filter_append($r, 'bzip2.decompress', STREAM_FILTER_READ); while (!feof($r)) { $s = fread($r, 100); echo "read: "; var_dump($s); } fclose($r); unlink($fn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function notice()\n {\n }", "function atknotice($txt)\n{\n\tatkdebug($txt,DEBUG_NOTICE);\n}", "function admin_notices()\n {\n }", "function network_admin_notices()\n {\n }", "function site_admin_notice()\n {\n }", "public function testWarningMessage()\n {\n $this->throwWarningException();\n\n // test if code actually gets here\n $this->assertTrue(true);\n }", "function notice($message, array $context = array());", "function warning($message);", "public function cloudflare_notices() {\n\t\tforeach ( $this->cloudflare_notices as $notice ) {\n\t\t\t$this->cloudflare_admin_notice( $notice );\n\t\t}\n\t}", "protected function maybe_display_notices() {\n\t\t$this->display_update_notices();\n\t\t$this->display_other_notices();\n }", "public function warning($message) {}", "public function notice() /*mixed*/\n {\n if (func_num_args() == 0) {\n return $_SESSION[self::NOTICE];\n } elseif (is_null(func_get_arg(0))) {\n $_SESSION[self::NOTICE] = self::EMPTY_STRING;\n return true;\n } else {\n $_SESSION[self::NOTICE] = (string) func_get_arg(0);\n return true;\n }\n }", "public function hasWarnings() {}", "function get_notices() {\n\t\treturn !empty( $this->notices ) ? $this->notices : false;\n\t}", "function lcars_notice() {\n\t\tglobal $pagenow;\n if ( !is_multisite() && ( $pagenow == 'plugins.php' || $pagenow == 'themes.php' ) ) {\n\t\t\tglobal $current_user ;\n\t\t\t$user_id = $current_user->ID;\n\t\t\tif ( ! get_user_meta($user_id, 'lcarsframework_ignore_notice') ) {\n\t\t\t\techo '<div class=\"updated lcarsframework_setup_nag\"><p>';\n\t\t\t\tprintf( __('Your current theme does not have support for the LCARS Framework plugin. <a href=\"%1$s\" target=\"_blank\">Learn More</a> | <a href=\"%2$s\">Hide Notice</a>', 'lcarsframework'), 'http://wptheming.com/lcars-framework-plugin', '?lcarsframework_nag_ignore=0');\n\t\t\t\techo \"</p></div>\";\n\t\t\t}\n }\n\t}", "function Error_Notice($test) {\n\t\t$tpl = $this->templum->template('Error_Notice');\n\t\ttry {\n\t\t\t$out = $tpl->render();\n\t\t\t$test->failed('TemplumTemplateException not raised');\n\t\t} catch (TemplumTemplateError $e) {\n\t\t\t$test->passed();\n\t\t}\n\t}", "function Print_Warning($message)\r\n{\r\n print (\"<b>\" . $message . \"</b>\\n<br>\");\r\n}", "public static function notice() {\n\t\t# Get arguments to this function:\n\t\t$args = func_get_args();\n\n\t\t# Add message to log:\n\t\treturn self::add(LOG_NOTICE, $args);\n\t}", "function display_notices()\r\n\t{\r\n\t\tif(isset($_SESSION['notices']) && !empty($_SESSION['notices']))\r\n\t\t{\r\n\t\t\tforeach($_SESSION['notices'] as $notice)\r\n\t\t\t{\r\n\t\t\t\techo $notice;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function hookNotices() {\r\n if (is_array(self::$errors))\r\n foreach (self::$errors as $error) {\r\n\r\n switch ($error['type']) {\r\n case 'fatal':\r\n self::showError(ucfirst(_PLUGIN_NAME_ . \" \" . $error['type']) . ': ' . $error['text'], $error['id']);\r\n die();\r\n break;\r\n case 'settings':\r\n if (isset(SQ_Tools::$options['ignore_warn']) && SQ_Tools::$options['ignore_warn'] == 1)\r\n break;\r\n\r\n /* switch off option for notifications */\r\n self::$switch_off = \"<a href=\\\"javascript:void(0);\\\" onclick=\\\"jQuery.post( ajaxurl, {action: 'sq_warnings_off', nonce: '\" . wp_create_nonce('sq_none') . \"'}, function(data) { if (data) { jQuery('#sq_ignore_warn').attr('checked', true); jQuery('.sq_message').hide(); jQuery('#toplevel_page_squirrly .awaiting-mod').fadeOut('slow'); } });\\\" >\" . __(\"Turn off warnings!\", _PLUGIN_NAME_) . \"</a>\";\r\n self::showError(ucfirst(_PLUGIN_NAME_) . \" \" . __('Notice: ', _PLUGIN_NAME_) . $error['text'] . \" \" . self::$switch_off, $error['id']);\r\n break;\r\n default:\r\n\r\n self::showError(ucfirst(_PLUGIN_NAME_) . \" \" . __('Note: ', _PLUGIN_NAME_) . $error['text'], $error['id']);\r\n }\r\n }\r\n self::$errors = array();\r\n }", "public function notice(string $text);", "function atkwarning($txt)\n{\n\tatkdebug($txt,DEBUG_WARNING);\n}", "function build_notice()\n\t{\n\t\tglobal $template, $lang, $garage_config, $phpEx;\n\n\t\t// Set Garage Version Messages.....DO NOT REMOVE....No Support For Any Garage Without It\n\t\t$template->assign_vars(array(\n\t\t\t'GARAGE_LINK' => 'http://www.phpbbgarage.com/',\n\t\t\t'GARAGE_VERSION' => $garage_config['version'],\n\t\t\t'U_GARAGE' => append_sid(\"garage.$phpEx?mode=main_menu\"),\n\t\t\t'L_GARAGE' => $lang['Garage'],\n\t\t\t'L_POWERED_BY_GARAGE' => 'Powered By phpBB Garage' . $lang['Translation_Link'])\n\t\t);\n\n\t\treturn;\n\t}", "protected function setWarningsExist() {}", "public function dispatch_notices () {\n\t\t$notices = array_filter(apply_filters('upfront-thx-admin_notices', array(\n\t\t\t$this->_permalink_setup_check_notice(),\n\t\t)));\n\t\tif (empty($notices)) return false;\n\t\techo '<div class=\"error\"><p>' .\n\t\t\tjoin('</p><p>', $notices) .\n\t\t'</p></div>';\n\t}", "function warning($message, array $context = array());", "function get_notices() {\n\t\t\tif( empty($this->notices) ) return false; // bail early if no notices\n\t\t\treturn $this->notices;\n\t\t}", "function raiseWarning ($message)\r\n{\r\n\ttrigger_error ($message, E_USER_WARNING);\r\n}", "function admin_notices() {\n\n\t\t\t// vars\n\t\t\t$notices = $this->get_notices();\n\n\t\t\t// bail early if no notices\n\t\t\tif( !$notices ) return;\n\n\t\t\t// loop\n\t\t\tforeach( $notices as $notice ) {\n\t\t\t\t$open = $close = '';\n\t\t\t\tif( $notice['wrap'] ) {\n\t\t\t\t\t$open = \"<{$notice['wrap']}>\";\n\t\t\t\t\t$close = \"</{$notice['wrap']}>\";\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<div class=\"alm-admin-notice notice is-dismissible <?php echo esc_attr($notice['class']); ?>\"><?php echo $open . $notice['text'] . $close; ?></div>\n\t\t\t<?php\n\t\t\t}\n\t\t}", "static public function ExceptPrint($_Except){\r\n $Msg_ = \"<b>Fatal \".get_class($_Except).\" : </b>\";\r\n $Msg_ .= $_Except->GetMessage().\" in <b>\".$_Except->GetFile();\r\n $Msg_ .= \"</b> on line <b>\".$_Except->GetLine().\"</b><br />\\n\";\r\n print($Msg_);\r\n }", "public static function warningHandler()\n {\n }", "function sf_warn($data, $force = false, $block_header_on_echo = false)\n {\n IOFunctions::out(\n LogLevel::WARN,\n $data,\n $force,\n $block_header_on_echo\n );\n }", "public function notice($message)\r\n {\r\n $this->log($message, SF_LOG_NOTICE);\r\n }", "public function diagnose() {}", "public function unsetNoticeErrorLevel(){\n $errorlevel = error_reporting();\n if ($errorlevel > 0) {\n error_reporting($errorlevel & ~ E_NOTICE);\n } elseif ($errorlevel < 0) {\n error_reporting(E_ALL & ~ E_NOTICE);\n }\n }", "function FMWarning($message)\n\t{\n\t\t$trace = \"\";\n\n\t\tforeach ($this->FMDebug as $level) {\n\t\t\t$trace .= \" > \" . $level;\n\t\t}\n\n\t\terror_log (\"freemoviecompiler warning: $trace --> $message\");\n\t}", "public static function debug_notice() {\n\t\t// We only want to generate a notice if someone is viewing the\n\t\t// file debug page, and then only if they didn't just upload a\n\t\t// file.\n\t\t$screen = get_current_screen();\n\t\tif (\n\t\t\t('POST' !== getenv('REQUEST_METHOD')) &&\n\t\t\t('tools_page_blob-mimes-admin' === $screen->id)\n\t\t) {\n\t\t\t// Update notice takes priority.\n\t\t\tif (static::has_update()) {\n\t\t\t\tif (BLOBMIMES_MUST_USE) {\n\t\t\t\t\t$update_link = '<a href=\"' . static::$remote_home . '\" target=\"_blank\" rel=\"noopener\">' . esc_html__('update', 'blob-mimes') . '</a>';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$update_link = '<a href=\"' . admin_url('update-core.php') . '\">' . esc_html__('update', 'blob-mimes') . '</a>';\n\t\t\t\t}\n\n\t\t\t\t// Update warning.\n\t\t\t\t$notice_type = 'warning';\n\t\t\t\t$notice = sprintf(\n\t\t\t\t\tesc_html__('Please %s %s to the latest release (%s) before debugging upload-related issues.', 'blob-mimes'),\n\t\t\t\t\t$update_link,\n\t\t\t\t\t'<em>Lord of the Files</em>',\n\t\t\t\t\t'<code>' . static::get_remote_version() . '</code>'\n\t\t\t\t);\n\n\t\t\t}\n\t\t\t// Otherwise explain the page's purpose.\n\t\t\telse {\n\t\t\t\t$notice_type = 'info';\n\t\t\t\t$notice = esc_html__('If a file has been rejected from the Media Library for \"security reasons\", use the form below to find out more information.', 'blob-mimes');\n\t\t\t}\n\n\t\t\techo '<div class=\"notice notice-' . $notice_type . '\"><p>' . $notice . '</p></div>';\n\t\t}\n\t}", "function broken() { }", "public function toString()\n {\n return 'Assert that notice message is displayed';\n }", "function hookNotices() {\r\n if (is_array(self::$errors))\r\n foreach (self::$errors as $error) {\r\n\r\n switch ($error['type']) {\r\n case 'fatal':\r\n self::showError(ucfirst(_CL_PLUGIN_NAME_ . \" \" . $error['type']) . ': ' . $error['text'], $error['id']);\r\n die();\r\n break;\r\n case 'settings':\r\n if (CL_Classes_Tools::getOption('ignore_warn') == 1)\r\n break;\r\n\r\n /* switch off option for notifications */\r\n self::$switch_off = \"<a href=\\\"javascript:void(0);\\\" onclick=\\\"jQuery.post( ajaxurl, {action: 'cl_warnings_off', nonce: '\" . wp_create_nonce('cl_none') . \"'}, function(data) { if (data) { jQuery('#cl_ignore_warn').attr('checked', true); jQuery('.cl_message').hide(); jQuery('#toplevel_page_cl .awaiting-mod').fadeOut('slow'); } });\\\" >\" . __(\"Turn off warnings!\", _CL_PLUGIN_NAME_) . \"</a>\";\r\n self::showError(ucfirst(_CL_PLUGIN_NAME_) . \" \" . __('Notice: ', _CL_PLUGIN_NAME_) . $error['text'] . \" \" . self::$switch_off, $error['id']);\r\n break;\r\n default:\r\n\r\n self::showError(ucfirst(_CL_PLUGIN_NAME_) . \" \" . __('Note: ', _CL_PLUGIN_NAME_) . $error['text'], $error['id']);\r\n }\r\n }\r\n self::$errors = array();\r\n }", "public function notices() {\n\t\tif (!is_plugin_active( 'client-dash/client-dash.php' )) {\n\t\techo '<div class=\"error\">Client Dash Quickbooks Online requires <b>Client Dash</b>. Please install and activate <b>Client Dash</b> to continue using.</div>';\n\t\t}\n\t}", "function display_warning_message($message)\r\n {\r\n Display :: warning_message($message);\r\n }", "function frontend_testing_server_notice() {\n $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n if ( (strpos($url,'staging') !== false) || $_SERVER[\"SERVER_ADDR\"] == '::1' ) {\n \t$class = 'notice notice-warning callout callout-info callout-full';\n \t$message = __( '<strong>Warning:</strong> You are currently on a testing server. <strong>Any changes may be overwritten.</strong>', 'theme' );\n \tprintf( '<div class=\"%1$s\"><p>%2$s</p></div>', $class, $message ); \n }\n}", "function show_notice($msg, $type = 0){\n\tif ($this->debug_mode) {\n\t switch ($type) {\n\t\t case 1: $msg = 'unknown template variable <b>' . $msg . '</b>'; break;\n\t\t\tcase 2: $msg = 'unknown template control <b>' . $msg . '</b>'; break;\n\t\t\tcase 3: $msg = 'invalid nesting - <b>' . $msg . '</b>'; break;\n\t\t\tcase 4: $msg = 'invalid array variable - <b>' . $msg . '</b>'; break;\n\t\t}\n\t\t$GLOBALS['GlobalDebugInfo']->Write('<font color=\"red\">Template Notice: </font>\t' . $msg);\n\t}\n}", "public function isNotice()\n {\n return $this->getName() === 'notice';\n }", "public function maybeShowNotice() {\n\t\t$transientPosts = aioseo()->transients->get( 'v3_migration_in_progress_posts' );\n\t\t$transientTerms = aioseo()->transients->get( 'v3_migration_in_progress_terms' );\n\t\tif ( ! $transientPosts && ! $transientTerms ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Disable the notice for now since it is almost unnecessary. We can come back and revisit this in the future.\n\t\t// $this->showNotice();\n\t}", "function yith_ywraq_print_notices() {\n\n\t\tif ( get_option( 'ywraq_activate_thank_you_page' ) == 'yes' ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$session = YITH_Request_Quote()->session_class;\n\t\t$all_notices = $session->get( 'yith_ywraq_notices', array() );\n\t\t$notice_types = apply_filters( 'yith_ywraq_notice_types', array( 'error', 'success', 'notice' ) );\n\n\t\tforeach ( $notice_types as $notice_type ) {\n\t\t\tif ( yith_ywraq_notice_count( $notice_type ) > 0 ) {\n\t\t\t\tif ( count( $all_notices ) > 0 && $all_notices[ $notice_type ] ) {\n\t\t\t\t\twc_get_template( \"notices/{$notice_type}.php\", array(\n\t\t\t\t\t\t'messages' => $all_notices[ $notice_type ]\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tyith_ywraq_clear_notices();\n\t}", "protected function _notices()\n\t{\n\t\t$alert = $this->_checksum_bootstrap_files();\n\n\t\t// These are only displayed to Super Admins\n\t\tif (ee()->session->userdata['group_id'] != 1)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$notices = array();\n\n\t\t// Show a notice if the cache folder is not writeable\n\t\tif ( ! ee()->cache->file->is_supported())\n\t\t{\n\t\t\t$notices[] = lang('unwritable_cache_folder');\n\t\t}\n\n\t\t// Show a notice if the config file is not writeable\n\t\tif ( ! is_really_writable(ee()->config->config_path))\n\t\t{\n\t\t\t$notices[] = lang('unwritable_config_file');\n\t\t}\n\n\t\t// Check to see if the config file matches the Core version constant\n\t\tif (APP_VER !== ee()->config->item('app_version'))\n\t\t{\n\t\t\t$notices[] = sprintf(lang('version_mismatch'), ee()->config->item('app_version'), APP_VER);\n\t\t}\n\n\t\tif ( ! is_dir(PATH_THEMES))\n\t\t{\n\t\t\t$notices[] = sprintf(lang('theme_folder_wrong'), ee('CP/URL', '/cp/settings/urls'));\n\t\t}\n\n\t\tif ( ! ee()->config->item('session_crypt_key'))\n\t\t{\n\t\t\t$notices[] = sprintf(\n\t\t\t\tlang('missing_encryption_key'),\n\t\t\t\t'session_crypt_key',\n\t\t\t\tDOC_URL.'troubleshooting/error_messages/missing_encryption_keys.html'\n\t\t\t);\n\t\t}\n\n\t\tif ( ! ee()->config->item('encryption_key'))\n\t\t{\n\t\t\t$notices[] = sprintf(\n\t\t\t\tlang('missing_encryption_key'),\n\t\t\t\t'encryption_key',\n\t\t\t\tDOC_URL.'troubleshooting/error_messages/missing_encryption_keys.html'\n\t\t\t);\n\t\t}\n\n\t\tif ( ! empty($notices))\n\t\t{\n\t\t\tif ( ! $alert)\n\t\t\t{\n\t\t\t\t$alert = ee('CP/Alert')->makeBanner('notices')\n\t\t\t\t\t->asWarning()\n\t\t\t\t\t->withTitle(lang('cp_message_warn'))\n\t\t\t\t\t->now();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$alert->addSeparator();\n\t\t\t}\n\n\t\t\t$last = end($notices);\n\t\t\treset($notices);\n\t\t\tforeach ($notices as $notice)\n\t\t\t{\n\t\t\t\t$alert->addToBody($notice);\n\n\t\t\t\tif ($notice != $last)\n\t\t\t\t{\n\t\t\t\t\t$alert->addSeparator();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static function warning()\n {\n static::returnCode(static::CODE_WARNING);\n }", "public function print_notices() {\n\t\t\tif( function_exists( 'wc_print_notices' ) ) {\n\t\t\t\twc_print_notices();\n\t\t\t}\n\t\t}", "private function _warning($text){\n echo '[# WARNING] ' . $text . PHP_EOL;\n }", "public function dependency_notice() {\n $errors = '';\n $error = '';\n foreach ( $this->dependency_error as $error ) {\n $errors .= '<p>' . $error . '</p>';\n }\n $message = '<div class=\"error\">' . $errors . '</div>';\n\n echo $message;\n }", "function acf_render_admin_notices()\n{\n}", "public function admin_notices() {\n\n\t\tif ( $notices = $this->get_notices() ) {\n\t\t\tforeach ( $notices as $notice ) {\n\t\t\t\t$notice->render();\n\t\t\t}\n\t\t}\n\n\t}", "function _wp_posts_page_notice()\n {\n }", "public function check_admin_notices()\n {\n if (! \\wpSPIO()->env()->is_screen_to_use)\n return; // suppress all when not our screen.\n\n $this->doFilePermNotice();\n $this->doAPINotices();\n $this->doCompatNotices();\n $this->doUnlistedNotices();\n $this->doQuotaNotices();\n\n $this->doIntegrationNotices();\n\n $this->doHelpOptInNotices();\n }", "function apc_cache_debug ($msg, $important=false) {\n\tif ($important || (defined('APC_CACHE_DEBUG') && APC_CACHE_DEBUG)) { \n\t\terror_log(\"yourls_apc_cache: \" . $msg);\n\t}\n}", "public function admin_notices()\n {\n if ( get_transient( 'lbry_notices' ) ) {\n $notices = get_transient( 'lbry_notices' );\n foreach ( $notices as $key => $notice ) {\n $this->create_admin_notice( $notice );\n }\n delete_transient( 'lbry_notices' );\n }\n }", "protected function restoreErrorReporting() {\n error_reporting(~E_NOTICE);\n }", "public static function notice($post = \\null)\n {\n }", "function try_warning($count, $s, $e=\"\") {\n print \"> \". $s .\"*** warning ***<br />> Message: \". $e .\"<br />\";\n return ++$count;\n }", "public function notice($message)\n {\n $this->log($message, self::NOTICE);\n }", "function flawless_add_notice( $notice = '', $args = array() ) {\r\n global $flawless;\r\n\r\n $flawless[ 'runtime' ][ 'this_notice' ] = array(\r\n 'content' => $notice,\r\n 'args' => $args\r\n );\r\n\r\n if ( did_action( 'flawless::render::primary_notice_container' ) ) {\r\n _doing_it_wrong( __FUNCTION__, sprintf( __( 'Notices should be added before %1s hook in header.php.', 'flawless' ), 'flawless::content_container_top' ), '3.4' );\r\n }\r\n\r\n add_filter( 'flawless::primary_notice_container', function ( $notices = array(), $args = array() ) {\r\n global $flawless;\r\n\r\n $args = wp_parse_args( $flawless[ 'runtime' ][ 'this_notice' ][ 'args' ], $args );\r\n\r\n switch ( $args[ 'type' ] ) {\r\n\r\n case 'error':\r\n $notices[] = '<div class=\"alert alert-success\"><a class=\"close\" data-dismiss=\"alert\" href=\"#\">&times;</a>' . $flawless[ 'runtime' ][ 'this_notice' ][ 'content' ] . '</div>';\r\n break;\r\n\r\n case 'success':\r\n $notices[] = '<div class=\"alert alert-success\"><a class=\"close\" data-dismiss=\"alert\" href=\"#\">&times;</a>' . $flawless[ 'runtime' ][ 'this_notice' ][ 'content' ] . '</div>';\r\n break;\r\n\r\n case 'info':\r\n default:\r\n $notices[] = '<div class=\"alert alert-info\"><a class=\"close\" data-dismiss=\"alert\" href=\"#\">&times;</a>' . $flawless[ 'runtime' ][ 'this_notice' ][ 'content' ] . '</div>';\r\n break;\r\n }\r\n\r\n return $notices;\r\n\r\n }, 2, 10 );\r\n }", "protected function display_other_notices() {\n\n\t\tif ( ! empty( $this->browser_args['notice'] ) ) {\n\n\t\t\t// Generate a unique slug for this notice.\n\t\t\t$notice = 'wp-shpb-notice-' . sanitize_title( $this->browser_args['notice'] );\n\t\t\t$slug = substr( $notice, 0, 30 );\n\n\t\t\twp_product_showcase_dismissible_notice( 'new', '_wp_sh_plugin_browser_notices', $slug, $this->browser_args['notice'] );\n\t\t}\n\n\t\t$notices = BC_Framework_Plugin_Browser_Dismissible_Notice::get( '_wp_sh_plugin_browser_notices' );\n\n\t\tif ( $notices ) {\n\n\t\t\tforeach( $notices as $slug => $notice ) {\n\t\t\t\tself::output_admin_notice( $notice, $slug );\n\t\t\t}\n\n\t\t}\n\n \t}", "function template_ecl_warning_above ()\n{\n\tglobal $context;\n\n\techo '\n\t<div id=\"ecl_notification\">\n\t\t', $context['ecl_main_notice'], '\n\t</div>';\n}", "public function display_notice() {\n\t\tif ( isset( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification\n\t\t\t$this->current_screen = sanitize_text_field( wp_unslash( $_GET['page'] ) ); // phpcs:ignore WordPress.Security.NonceVerification\n\t\t\t$this->screens = $this->get_allowed_screens();\n\t\t\t$this->server_data = $this->get_server_data();\n\t\t\t$this->message = $this->get_message_contents( $this->current_screen );\n\n\t\t\tif ( class_exists( 'Fusion_Admin_Notice' ) && $this->is_show() && ( isset( $this->current_screen ) && in_array( $this->current_screen, $this->screens, true ) ) ) {\n\t\t\t\tnew Fusion_Admin_Notice(\n\t\t\t\t\t'fusion-privacy-notice',\n\t\t\t\t\t$this->message,\n\t\t\t\t\tis_super_admin(),\n\t\t\t\t\t'info',\n\t\t\t\t\ttrue,\n\t\t\t\t\t'user_meta',\n\t\t\t\t\t'the-meta',\n\t\t\t\t\t[ 'avada_page_' . $this->current_screen ]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "function _local_storage_notice()\n {\n }", "public function testInfoMessage()\n {\n $this->throwInfoException();\n\n // test if code actually gets here\n $this->assertTrue(true);\n }", "public function notices(): void {\n $notices = new \\WPTRT\\AdminNotices\\Notices();\n foreach ($this->getTransient() as $notice) {\n\n // Delete Notice if is older than MAX_AGE\n if (time() - $notice->creationTime > $this->max_age) {\n self::remove($notice->id);\n continue;\n }\n\n $notices->add($notice->id, $notice->title, $notice->message, $notice->options);\n\n // Delete wptrt Dismissed options to always show notice until it is removed\n\t // Otherwise it would bes stored over and over again but not displayed\n if (isset($notice->options['scope']) && $notice->options['scope'] === \"user\") {\n \t$user = wp_get_current_user();\n \t$key = isset($notice->options['option_prefix']) ? $notice->options['option_prefix'].\"_\".$notice->id : \"wptrt_notice_dismissed_\". $notice->id;\n\t delete_user_meta( $user->ID, $key);\n } else {\n\t delete_option( \"wptrt_notice_dismissed_\". $notice->id);\n }\n }\n $notices->boot();\n }", "public function notice($message): void\n {\n $this->log(__FUNCTION__, $message);\n }", "function showPageNotice()\n {\n // TRANS: Page notice. %s is a trustroot name.\n $this->element('p',null,sprintf(_m('%s has asked to verify your identity. Click Continue to verify your identity and login without creating a new password.'),$this->trust_root));\n }", "function recipe_admin_notices() {\n\t// If there are no errors, then we'll exit the function.\n\t$errors = get_transient( 'settings_errors' );\n\tif ( ! $errors ) {\n\t\treturn;\n\t}\n\t// Otherwise, build the list of errors that exist in the settings errors.\n\t$message = '<div id=\"acme-message\" class=\"error below-h2\"><p><ul>';\n\tforeach ( $errors as $error ) {\n\t\t$message .= '<li>' . $error['message'] . '</li>';\n\t}\n\t$message .= '</ul></p></div><!-- #error -->';\n\t// Write them out to the screen.\n\techo $message; // WPCS: XSS ok.\n\t// Clear and the transient and unhook any other notices so we don't see duplicate messages.\n\tdelete_transient( 'settings_errors' );\n\tremove_action( 'admin_notices', '_location_admin_notices' );\n}", "public function test_assert_true_to_not_warning(): void\n {\n $this->assertTrue(true);\n }", "public function admin_notice() {\n // Notices filter and run the notices function.\n $admin_notices = apply_filters( 'nf_admin_notices', array() );\n self::$instance->notices->admin_notice( $admin_notices );\n }", "public function showWarnings(): void\n {\n $this->executeLog('show warnings');\n }", "protected function printSqlCheck() {}", "function ufclas_matlab_admin_notice_error(){\n\t?>\n <div class=\"notice notice-error\">\n <p><?php _e( 'There was an error importing. Please try again.', 'ufclas-matlab' ); ?></p>\n </div>\n <?php\n}", "function warnings() {\n\t\t$Warnings = array();\n\t\tif (mysqli_warning_count($this->LinkID)) {\n\t\t\t$e = mysqli_get_warnings($this->LinkID);\n\t\t\tdo {\n\t\t\t\tif ($e->errno == 1592) {\n\t\t\t\t\t// 1592: Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$Warnings[] = 'Code ' . $e->errno . ': ' . display_str($e->message);\n\t\t\t} while ($e->next());\n\t\t}\n\t\t$this->Queries[count($this->Queries) - 1][2] = $Warnings;\n\t}", "public function errorInfo()\n {\n }", "public function getNoticeCodes()\n {\n return static::NOTICE_CODES;\n }", "function maintenance_nag()\n {\n }", "public function render_requirements_notices() {\n $notices = $this->check_requirements();\n if ( count( $notices ) > 0 ) {\n $out = join( \"\\n\", $notices );\n echo laterpay_sanitize_output( '<div class=\"error\">' . $out . '</div>' );\n }\n }", "public function notices()\r\n\t{\r\n\t\t$notices = array();\r\n\t\t\r\n\t\tforeach (Notices::get(TRUE, TRUE) as $notice)\r\n\t\t{\t\t\t\r\n\t\t\t// Build our data array\r\n\t\t\t$notices[] = (object) array(\r\n\t\t\t\t'type' => $notice['type'],\r\n\t\t\t\t'message' => $notice['values']['message'],\r\n\t\t\t\t'hash' => $notice['values']['hash'],\r\n\t\t\t\t'is_persistent' => $notice['values']['is_persistent'],\r\n\t\t\t\t'key' => $notice['key']\r\n\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\t$output = '';\r\n\t\t\r\n\t\tforeach ($notices as $notice)\r\n\t\t{\r\n\t\t\t// It's not a mustache template, but it came with the module. Don't judge me.\r\n\t\t\t$output .= View::factory('notices/notice')->set('notice', $notice);\r\n\t\t}\r\n\t\t\r\n\t\treturn $output;\r\n\t}", "public static function notice($message)\n {\n static::_log(self::NOTICE, $message);\n }", "public static function suppressed(): bool\n {\n return @trigger_error('hello');\n }", "public function notice_error() {\n\t\t$class = 'notice notice-error';\n\t\t$message = __( 'An error occurred during synchronization.', 'elemarjr' );\n\t\treturn sprintf( '<div class=\"%1$s\"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );\n\t}", "function bibdk_voxb_offensive_error() {\n return array(\n '#markup' => t('bibdk_voxb_no_access', array(), array('context'=>'bibdk_voxb')),\n );\n}", "function __construct()\n {\n error_reporting(0);\n }", "public function warn($msg);", "public function print_admin_notice() {\n\t\tglobal $hook_suffix, $post_type;\n\n\t\t// Only need for certain screens.\n\t\tif ( ! in_array( $hook_suffix, [ 'edit.php', 'plugins.php' ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Only for the schedule post type.\n\t\tif ( 'edit.php' == $hook_suffix && 'schedule' != $post_type ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Only for version < 4.7, when API was introduced.\n\t\t$version = get_bloginfo( 'version' );\n\t\tif ( $version >= 4.7 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Let us know if the REST API plugin, which we depend on, is not active.\n\t\tif ( ! is_plugin_active( 'WP-API/plugin.php' ) && ! is_plugin_active( 'rest-api/plugin.php' ) ) :\n\n\t\t\t?>\n <div class=\"updated notice\">\n <p><?php printf( __( 'The %1$s plugin depends on the %2$s plugin, version 2.0. %3$sPlease activate this plugin%4$s.', 'conf-schedule' ), 'Conference Schedule', 'REST API', '<a href=\"' . admin_url( 'plugins.php' ) . '\">', '</a>' ); ?></p>\n </div>\n\t\t<?php\n\n\t\tendif;\n\n\t}", "function standard ($level, $message, $file, $line)\n {\n\n // don't want to print supressed errors\n if (error_reporting() > 0)\n {\n\n switch ($level)\n {\n\n\t\t\t\tcase E_NOTICE:\n case E_USER_NOTICE:\n\n $this->info($message, NULL, NULL, $file, $line);\n break;\n\n\t\t\t\tcase E_WARNING;\n\t\t\t\tcase E_CORE_WARNING:\n\t\t\t\tcase E_COMPILE_WARNING:\n case E_USER_WARNING:\n\n $this->warning($message, NULL, NULL, $file, $line);\n break;\n\n default:\n\n $this->fatal($message, NULL, NULL, $file, $line);\n\n }\n\n }\n\n }", "public function warning(string $text);", "public function add_notice() {\n\t\tif ( current_user_can( 'activate_plugins' ) ) {\n\t\t\techo sprintf(\n\t\t\t\t'<div id=\"message\" class=\"error\"><p>%s</p></div>',\n\t\t\t\timplode( '<br>', $this->notices )\n\t\t\t);\n\t\t}\n\t}", "protected function adminNotices()\n {\n if (! empty($_GET[self::NOTICE]) &&\n \\filter_var($_GET[self::NOTICE], FILTER_VALIDATE_INT) === 1\n ) {\n $message = \\esc_html__('The cache has been successfully cleared.', 'wp-rest-api-cache');\n echo \"<div class='notice updated is-dismissible'><p>{$message}</p></div>\"; // PHPCS: XSS OK.\n }\n }", "public function admin_notices() {\n\t\t\t$current_screen = \\get_current_screen();\n\t\t\t$message = __( 'Do not edit products, orders, customers, or comments on staging as they might get overwritten with <b>Download Data</b> or <b>Publish to Live</b>.', 'woocart' );\n\t\t\t$show = array( 'edit-shop_order', 'users', 'edit-comments', 'edit-product' );\n\t\t\tif ( $this->is_staging() && in_array( $current_screen->id, $show ) ) {\n\t\t\t\tprintf(\n\t\t\t\t\t'<div class=\"notice\" style=\"background: #e3d9f0;\n border-radius: 8px;\n border: none;\n padding: 1em;\"><span style=\"background: orange;\n border-radius: 5px;\n color: white;\n padding: 0.3em;\">WARNING</span> <span style=\"line-height: 22px;\n font-size: 1.07em;\">%1$s</span></div>',\n\t\t\t\t\t$message\n\t\t\t\t);\n\t\t\t}\n\t\t}", "public function requirements_not_met_notice() {\r\n\r\n\t\t// Compile default message.\r\n\t\t$default_message = sprintf( __( 'Troubleshoot is missing requirements and has been <a href=\"%s\">deactivated</a>. Please make sure all requirements are available.', 'troubleshoot' ), admin_url( 'plugins.php' ) );\r\n\r\n\t\t// Default details to null.\r\n\t\t$details = null;\r\n\r\n\t\t// Add details if any exist.\r\n\t\tif ( $this->activation_errors && is_array( $this->activation_errors ) ) {\r\n\t\t\t$details = '<small>' . implode( '</small><br /><small>', $this->activation_errors ) . '</small>';\r\n\t\t}\r\n\r\n\t\t// Output errors.\r\n\t\t?>\r\n\t\t<div id=\"message\" class=\"error\">\r\n\t\t\t<p><?php echo wp_kses_post( $default_message ); ?></p>\r\n\t\t\t<?php echo wp_kses_post( $details ); ?>\r\n\t\t</div>\r\n\t\t<?php\r\n\t}", "public function pre($_msg){\r\n $db = debug_backtrace(null,1);\r\n echo \"<pre>y<b>\".Data::get($db,'0.file').\":\".Data::get($db,'0.line').\"</b>\".PHP_EOL.var_export($_msg,true).\"</pre>\";\r\n }", "public static function admin_notice() {\r\n\t\techo '<div class=\"error\">';\r\n\t\techo '<p>' . esc_html( __( 'Your server does not support communication with servers over HTTPS.', 'inf-member' ) ) . '</p>';\r\n\t\techo '</div>';\r\n\t}", "public function debugWarnings()\n\t{\n\t\t$stmt = $this->_query('SHOW WARNINGS', true);\n\n\t\t$warnings = array();\n\t\twhile ($warning = $stmt->fetch_assoc())\n\t\t{\n\t\t\t$warnings[] = $warning;\n\t\t}\n\n\t\tforeach ($warnings as $warning)\n\t\t{\n\t\t\tatkwarning(\"MYSQL warning '{$warning['Level']}' (Code: {$warning['Code']}): {$warning['Message']}\");\n\t\t}\n\t}", "public function print_admin_notice() {\n\t\tglobal $hook_suffix, $post_type;\n\n\t\t// Only need for certain screens.\n\t\tif ( ! in_array( $hook_suffix, array( 'edit.php', 'plugins.php' ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Only for the schedule post type.\n\t\tif ( 'edit.php' == $hook_suffix && 'schedule' != $post_type ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Only for version < 4.7, when API was introduced.\n\t\t$version = get_bloginfo( 'version' );\n\t\tif ( $version >= 4.7 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Let us know if the REST API plugin, which we depend on, is not active.\n\t\tif ( ! is_plugin_active( 'WP-API/plugin.php' ) && ! is_plugin_active( 'rest-api/plugin.php' ) ) :\n\n\t\t\t?>\n\t\t\t<div class=\"updated notice\">\n\t\t\t\t<p><?php _e( 'The Conference Schedule plugin depends on the REST API plugin, version 2.0. <a href=\"' . admin_url('plugins.php') . '\">Please activate this plugin</a>. ', 'conf-schedule' ); ?></p>\n\t\t\t</div>\n\t\t\t<?php\n\n\t\tendif;\n\n\t}", "public function get_notices() {\n\n\t\t$output = '';\n\t\t\n\t\t$notices = $this->notices;\n\t\t\n\t\tif ($notices) {\n\t\t\t$items = '';\n\t\t\tforeach ($notices as $n) {\n\t\t\t\t$items .= '<li>'.$n.'</li>' .\"\\n\";\n\t\t\t}\n\t\t\t$output = '<ul>'.\"\\n\".$items.'</ul>'.\"\\n\";\n\t\t}\n\t\telse {\n\t\t\t$output = __('There were no notices.', CCTM_TXTDOMAIN);\n\t\t}\n\t\treturn sprintf('<h2>%s</h2><div class=\"summarize-posts-notices\">%s</div>'\n\t\t\t, __('Notices', CCTM_TXTDOMAIN)\n\t\t\t, $output);\n\t}" ]
[ "0.7183889", "0.6912193", "0.6712521", "0.6519768", "0.6482668", "0.64807916", "0.64643234", "0.643466", "0.6377509", "0.6352945", "0.63095236", "0.62327534", "0.621512", "0.62027663", "0.6154732", "0.61542577", "0.6123458", "0.611823", "0.60990113", "0.6053701", "0.6043783", "0.60398597", "0.6035721", "0.6035592", "0.60321736", "0.6013102", "0.5976452", "0.59692544", "0.5966386", "0.5964728", "0.5964349", "0.59553826", "0.59540206", "0.5949787", "0.59475726", "0.5928354", "0.5917608", "0.591671", "0.5916252", "0.59082675", "0.5897835", "0.5892871", "0.5843833", "0.58398443", "0.58360034", "0.5825909", "0.58252555", "0.5821708", "0.58184355", "0.5799567", "0.5799159", "0.5780414", "0.5779333", "0.577568", "0.5774721", "0.5754767", "0.57526207", "0.573304", "0.57047707", "0.57037663", "0.5692638", "0.56877774", "0.5687091", "0.56841075", "0.5646625", "0.5642908", "0.56314886", "0.5622979", "0.56223774", "0.56158143", "0.5615614", "0.55953074", "0.5595157", "0.5590458", "0.5587317", "0.55866146", "0.5586264", "0.5584359", "0.5576154", "0.55646807", "0.5562601", "0.55608505", "0.55584145", "0.55563915", "0.55539715", "0.55491084", "0.5544904", "0.5541734", "0.55399007", "0.5537429", "0.55360335", "0.5535596", "0.5530327", "0.55247056", "0.55242085", "0.5520921", "0.55197555", "0.55179733", "0.55156696", "0.55129766", "0.55121565" ]
0.0
-1
Creates a new InputFile entity.
public function __construct($filePath) { $this->path = $filePath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createInput()\n {\n $file = new File();\n $this->assertEquals('file', $file->getAttribute('type'));\n }", "protected static function entityFactory($input) {\n\n\t\tif (!isset(self::$config['filestore_prefix'])) {\n\t\t\t$prefix = \"file/\";\n\t\t}\n\n\t\t$uploads = self::$uploads[$input];\n\t\t$handled_uploads = array();\n\t\t$entities = array();\n\n\t\tforeach ($uploads as $key => $upload) {\n\t\t\tif ($upload->error) {\n\t\t\t\t$handled_uploads[] = $upload;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\n\t\t\t$filehandler = new ElggFile();\n\t\t\tif (is_array(self::$attributes)) {\n\t\t\t\tforeach (self::$attributes as $key => $value) {\n\t\t\t\t\t$filehandler->$key = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$filestorename = elgg_strtolower(time() . $upload->name);\n\t\t\t$filehandler->setFilename($prefix . $filestorename);\n\n\t\t\t$filehandler->title = $upload->name;\n\t\t\t$filehandler->originalfilename = $upload->name;\n\t\t\t$filehandler->filesize = $upload->size;\n\t\t\t$filehandler->mimetype = $upload->mimetype;\n\t\t\t$filehandler->simpletype = $upload->simpletype;\n\n\t\t\t$filehandler->open('write');\n\t\t\t$filehandler->close();\n\n\t\t\tmove_uploaded_file($upload->path, $filehandler->getFilenameOnFilestore());\n\n\t\t\tif ($filehandler->save()) {\n\t\t\t\t$upload->guid = $filehandler->getGUID();\n\t\t\t\t$upload->file = $filehandler;\n\t\t\t\t$upload->not_attached = true;\n\n\t\t\t\t/*if ($filehandler->simpletype == \"image\") {\n\t\t\t\t\trequire_once(dirname(__FILE__) . '/IconHandler.php');\n\t\t\t\t\tIconHandler::makeIcons($filehandler);\n\t\t\t\t}*/\n\t\t\t\t// if image, we need to create thumbnails (this should be moved into a function)\n\t\t\t\tif ($upload->guid && $filehandler->simpletype == \"image\") {\n\t\t\t\t\tself::setImageThumbnails($filehandler);\n\t\t\t\t} else if ($upload->guid && $filehandler->mimetype == \"application/pdf\") {\n\t\t\t\t\tself::setPdfThumbnails($filehandler);\n\n\t\t\t\t} else if ($filehandler->icontime) {\n\t\t\t\t\t// if it is not an image, we do not need thumbnails\n\t\t\t\t\tunset($filehandler->icontime);\n\n\t\t\t\t\t$thumb = new ElggFile();\n\n\t\t\t\t\t$thumb->setFilename($prefix . \"thumb\" . $filestorename);\n\t\t\t\t\t$thumb->delete();\n\t\t\t\t\tunset($filehandler->thumbnail);\n\n\t\t\t\t\t$thumb->setFilename($prefix . \"smallthumb\" . $filestorename);\n\t\t\t\t\t$thumb->delete();\n\t\t\t\t\tunset($filehandler->smallthumb);\n\n\t\t\t\t\t$thumb->setFilename($prefix . \"largethumb\" . $filestorename);\n\t\t\t\t\t$thumb->delete();\n\t\t\t\t\tunset($filehandler->largethumb);\n\t\t\t\t}\n\n\n\t\t\t\t$entities[] = $filehandler;\n\t\t\t} else {\n\t\t\t\t$upload->error = elgg_echo('upload:error:unknown');\n\t\t\t}\n\n\t\t\t$handled_uploads[] = $upload;\n\t\t}\n\n\t\tself::$uploads[$input] = $handled_uploads;\n\t\tself::$files[$input] = $entities;\n\t}", "public function createAction()\n {\n $entity = new File();\n $request = $this->getRequest();\n $form = $this->createForm(new FileType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('hypo_test_file_show', array('id' => $entity->getId())));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public function create($input) {\n return Upload::create($input);\n }", "public function setInputFile($inputFile)\n {\n $this->inputFile = $inputFile;\n return $this;\n }", "public function create($input);", "protected abstract function importCreate($entity);", "public function createEntity();", "public function create_from_file($file);", "public static function get($name, $id = ''){\r\n\t\t$res = new InputFile($name, $id);\r\n\t\treturn $res;\r\n\t}", "public function makeFiles($input, array $attributes = array(), array $config = array()) {\n\t\tif (!isset(self::$files)) {\n\t\t\tself::$files = array();\n\t\t}\n\t\tif (!array_key_exists($input, self::$files)) {\n\t\t\tself::$attributes = $attributes;\n\t\t\tself::$config = $config;\n\t\t\tself::$files[$input] = self::entityFactory($input);\n\t\t}\n\n\t\treturn self::$files[$input];\n\t}", "protected function createFile() {}", "public function actionCreate()\n {\n $model = new File();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function createFile(FileInterface $file, DirectoryInterface $parent): FileInterface;", "public function create()\n {\n $attachment = $this->Attachments->newEntity();\n \n if ($this->request->is('post')) {\n \n // Assure file was uploaded\n if (!array_key_exists('file', $_FILES)) {\n $this->set('error', 'No attachment provided');\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n \n $uuid = Text::uuid();\n $file = $_FILES['file'];\n \n // Validate file upload\n if ($file['error'] !== UPLOAD_ERR_OK) {\n switch ($file['error']) {\n case UPLOAD_ERR_INI_SIZE:\n $this->set('error', 'The selected file is too big');\n break;\n case UPLOAD_ERR_FORM_SIZE:\n $this->set('error', 'The selected file is too big');\n break;\n case UPLOAD_ERR_NO_FILE:\n $this->set('error', 'No attachment provided');\n break;\n default:\n $this->set('error', 'An unexpected error occured');\n }\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n \n // Move uploaded file\n if (!move_uploaded_file($file[\"tmp_name\"], UPLOADS . $uuid)) {\n $this->set('error', 'An unexpected error occured');\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n \n $data = $this->request->getData();\n \n $data['path'] = $uuid;\n $data['name'] = $file['name'];\n $data['mime'] = $file['type'];\n $data['size'] = $file['size'];\n $attachment = $this->Attachments->patchEntity($attachment, $data);\n if (!$this->Attachments->save($attachment)) {\n $this->set('error', 'An unexpected error occured');\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n }\n \n $this->set('attachment', $attachment);\n $this->set('_serialize', 'attachment');\n }", "public function getFile($field, array $input) {\n $file = new File;\n $file->setFieldName($field);\n $file->setOriginalName($input['name']);\n $file->setTemporaryName($input['tmp_name']);\n $file->setMimeType($input['type']);\n $file->setSize($input['size']);\n $file->setErrorCode($input['error']);\n \n return $file;\n }", "protected function execute(InputInterface $input, OutputInterface $output): void\n {\n $module = $input->getArgument('module');\n $entity = $input->getArgument('entity');\n\n $entityFile = new \\Starter\\Generator\\File\\Entity($entity, $module);\n $repositoryFile = new \\Starter\\Generator\\File\\Repository($entity, $module);\n $controllerFile = new \\Starter\\Generator\\File\\Controller($entity, $module);\n $controllerTestFile = new \\Starter\\Generator\\File\\Test\\Controller($entity, $module);\n\n $entityFile->create();\n $repositoryFile->create();\n $controllerFile->create();\n $controllerTestFile->create();\n }", "public function create()\n {\n return $this->process($this->filename);\n }", "public function newAction()\n {\n $entity = new File();\n $form = $this->createForm(new FileType(), $entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }", "public static function createFileFromStream($inputFileHandler, $fileName, $userId);", "public function createEntity($entityName = null);", "protected function createResourceFileFromString(ScaffoldInputBase $input)\n {\n $this->call(\n 'resource-file:create',\n [\n 'model-name' => $input->modelName,\n '--fields' => $input->fields,\n '--resource-filename' => $input->resourceFile,\n '--translation-for' => $input->translationFor,\n '--force' => $input->force,\n ]\n );\n\n return $this;\n }", "public function newInputs($inputs = array())\n {\n return new Google_Documents_UploadFile_Inputs($inputs);\n }", "public function createEntity($name);", "public function setInputFile($inputFile)\n {\n if (!file_exists($inputFile)) {\n throw new \\Exception('NLM XML input file doesn\\'t exist');\n }\n\n $this->inputFile = $inputFile;\n }", "public function create()\n {\n $this->resetInputFields();\n }", "public function create()\n {\n $this->resetInputFields();\n }", "protected function _createEntity()\n\t\t{\n\t\t\t// Form template name.\n\t\t\t$separator = '__';\n\t\t\t$template = $type = $this->_createForm->type->getValue();\n\t\t\t$subject = $this->_createForm->subject->getValue();\n\t\t\tif ( $platformId = $this->_createForm->platform_id->getValue() ) {\n\t\t\t\t$platform = Table::_( 'platforms' )->get( $platformId );\n\t\t\t\t$template = $platform->name . $separator . $template;\n\t\t\t}\n\t\t\tif ( $pluginId = $this->_createForm->plugin_id->getValue() ) {\n\t\t\t\t$filter = new D_Filter_PluginDirectory();\n\t\t\t\t$plugin = Table::_( 'plugins' )->get( $pluginId );\n\t\t\t\t$template = str_replace( '-', '_', $filter->filter( $plugin->name ) ) . $separator . $template;\n\t\t\t}\n\t\t\t$template .= '.phtml';\n\t\t\t// Write a file.\n\t\t\t$directory = $this->_getTypeDirectory( $type );\n\t\t\tif ( !file_exists( $directory . $template ) ) {\n\t\t\t\tfile_put_contents(\n\t\t\t\t\t$directory . $template,\n\t\t\t\t\t$this->_createForm->content->getValue()\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Save a subject.\n\t\t\t$settingId = Model::_( 'settings' )->setting( $template . '[email subject]' );\n\t\t\tModel::_( 'settings' )->string( $settingId, $subject );\n\t\t}", "abstract public function createFile(FileData $fileData);", "private function createFileEntity(string $uri, string $uuid): File\n {\n $file = new File();\n $file->setUuid($uuid ?: UUIDGenerator::v4());\n if ($uri) {\n // Sets SymfonyFile without checking path as anyway the file must not be uploaded in normalizer, so it\n // should pass through any file.\n $file->setFile(new SymfonyFile($this->denormalizeFileUri($uri), false));\n }\n\n return $file;\n }", "function create_new(){\n\t\tif($this->request->post() && ($d = $this->form->validate($this->params))){\n\t\t\tclass_exists(\"TemporaryFileUpload\"); // make sure that all the relevant constants are defined\n\n\t\t\tif(!TEMPORARY_FILE_UPLOADS_ENABLED){\n\t\t\t\t$this->_report_fail(_(\"Temporary file uploading is not enabled\"),array(\n\t\t\t\t\t\"status_code\" => 403\n\t\t\t\t));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$file = $d[\"file\"];\n\n\t\t\tif($file->getTotalFileSize() > TEMPORARY_FILE_UPLOADS_MAX_FILESIZE){\n\t\t\t\t$this->_report_fail(sprintf(_(\"The file exceeds the maximum file size, which is %s\"),$this->_format_bytes(TEMPORARY_FILE_UPLOADS_MAX_FILESIZE)));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// TODO: To be removed...\n\t\t\tif($file->getFileName()==\"error.txt\"){\n\t\t\t\t$this->_report_fail(\"Testing error message!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif($file->chunkedUpload()){\n\t\t\t\t$token = $file->getToken();\n\t\t\t\tif($file->firstChunk()){\n\t\t\t\t\t$temporary_file_upload = TemporaryFileUpload::CreateNewRecordByHttpUploadedFile($file);\n\t\t\t\t\t$this->session->s(\"temporary_file_upload_id_$token\",$temporary_file_upload->getId());\n\n\t\t\t\t\t$this->_selfclean();\n\t\t\t\t}else{\n\t\t\t\t\t$id = $this->session->g(\"temporary_file_upload_id_$token\");\n\t\t\t\t\tif(is_null($id)){\n\t\t\t\t\t\t$this->_report_fail(_(\"Error 1\"));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$temporary_file_upload = TemporaryFileUpload::GetInstanceById($id);\n\t\t\t\t\tif(!$temporary_file_upload){\n\t\t\t\t\t\t$this->_report_fail(_(\"Error 2\"));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$full_path = $temporary_file_upload->getFullPath();\n\t\t\t\t\tif(!file_exists($full_path)){\n\t\t\t\t\t\t$this->_report_fail(_(\"Error 3 (file $full_path doen't exist)\"));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$temporary_file_upload->appendChunk($file);\n\t\t\t\t\tunlink($file->getTmpFileName());\n\t\t\t\t}\n\t\t\t}else{\n\n\t\t\t\t$temporary_file_upload = TemporaryFileUpload::CreateNewRecordByHttpUploadedFile($file);\n\n\t\t\t\t$this->_selfclean();\n\n\t\t\t}\n\n\t\t\t// the mime type is verified at the upload end\n\t\t\tif($temporary_file_upload->fullyUploaded()){\n\t\t\t\t$mime_type = Files::DetermineFileType($temporary_file_upload->getFullPath(),[\"original_filename\" => $temporary_file_upload->getFilename()]);\n\t\t\t\tif($mime_type && $temporary_file_upload->getMimeType()!==$mime_type){\n\t\t\t\t\t$temporary_file_upload->s(\"mime_type\",$mime_type);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->api_data = $this->_dump_temporary_file_upload($temporary_file_upload);\n\t\t}\n\t}", "public function new_file()\n {\n $input = JFactory::getApplication()->input;\n\n $ecr_project = $input->get('ecr_project');\n\n if($input->get('do_action') == 'new_file')\n {\n $reqPath = $input->getPath('act_path');\n $reqName = $input->getPath('act_name');\n\n $path = JPath::clean(JPATH_ROOT.DS.$reqPath.DS.$reqName);\n\n if(is_dir($path))\n {\n EcrHtml::message(array(jgettext('This is a folder'), $path), 'error');\n\n return;\n }\n\n if(is_file($path))\n {\n EcrHtml::message(array(jgettext('The file already exists'), $path), 'error');\n\n return;\n }\n\n //-- @todo file from template\n $template = 'new file';\n\n if( ! is_int(file_put_contents($path, $template)))\n {\n EcrHtml::message(array(jgettext('Unable to create file'), $path), 'error');\n\n return;\n }\n\n //-- Clean the cache\n JFactory::getCache('EasyCreator_'.$ecr_project)->clean();\n\n echo '*OK*';\n\n return;\n }\n\n $this->actForm(jgettext('New file'), 'add', jgettext('Create'));\n $this->processForm('new_file', $ecr_project, 'file', 'new', true, true);\n }", "abstract protected function createEntityInstance();", "public function create(Request $request)\n {\n $path = $request->get('path', '');\n\n $path = $this->getFullPath($path);\n\n return response([\n 'success' => $this->fileservice->create($path),\n ], 201);\n }", "function create($entity);", "public function createFile()\n {\n return $this->addExcludesNameEntry($this->files);\n }", "protected function newEntity(FeedsSource $source) {\n $file = new stdClass();\n $file->type = $this->config['bundle'] ? $this->config['bundle'] : FILE_TYPE_NONE;\n $file->timestamp = REQUEST_TIME;\n $file->uid = $this->config['author'];\n $file->status = FILE_STATUS_PERMANENT;\n\n $this->debug($file, 'newEntity');\n\n return $file;\n }", "abstract public function createTemplateEntity();", "public function setInputFile( &$iFileObj ) {\n\t\n\t\t$this->iFileObj = $iFileObj;\n\t\treturn $this;\n\t}", "public function createAction(Request $request)\n {\n $entity = new Fileops();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('fileops_show', array('id' => $entity->getId())));\n }\n\n return $this->render('XarismaBundle:Fileops:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function actionCreate()\n {\n $model = new Abonent();\n\n if ($model->load(Yii::$app->request->post())){\n \n /**\n * model saves file using event AFTER_INSERT \n */\n $model->imageFile = UploadedFile::getInstance($model, 'imageFile');\n if($model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function createByFilename($filename)\n {\n $data = $this->parseFilename($filename);\n return new OtrkeyFile($data);\n }", "public function createEntity($entityId, $request)\n {\n return $this->start()->uri(\"/api/entity\")\n ->urlSegment($entityId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "protected function _initFileObjects()\n {\n $this->_irudiaFso = new \\Iron_Model_Fso($this, $this->getIrudiaSpecs());\n $this->_banerraFso = new \\Iron_Model_Fso($this, $this->getBanerraSpecs());\n\n return $this;\n }", "public function newInputs($inputs = array())\n {\n return new Google_Drive_Files_Insert_Inputs($inputs);\n }", "protected function getFileFactory() {}", "public function actionCreate()\n {\n $model = new ProjectFiles();\n if($p = Yii::$app->request->get('ProjectFiles')){\n $model->project_id = !empty($p['project_id']) ? $p['project_id'] : null;\n $model->type = !empty($p['type']) ? $p['type'] : null;\n $searchModel = new ProjectFilesSearch();\n $searchModel->project_id = $model->project_id;\n }\n\n if(\\Yii::$app->user->can('viewProject', ['project'=>$model->project])){ \n if ($model->load(Yii::$app->request->post())) {\n $model->docFile = UploadedFile::getInstance($model, 'docFile');\n if($model->save()){\n if ($model->docFile) {\n $image = $model->uploadFiles();\n $model->file_id = $image;\n $model->save();\n } \n return $this->refresh();\n } \n } elseif(\\Yii::$app->request->post('step_form')){\n $model->project->setup_status = 'pics';\n $model->project->save();\n return $this->redirect($model->project->setupRedirect);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'dataProvider' => $searchModel->search(Yii::$app->request->queryParams),\n ]);\n }\n } else {\n throw new \\yii\\web\\ForbiddenHttpException('Nemate prava da pristupite ovoj stranici.');\n }\n }", "public function getDefaultEntityInput()\n {\n /* @var $input \\InvEO\\InventoryMovementBundle\\Entity\\InventoryMovement */\n $input = $this->getDefaultEntity();\n $input\n ->setCode($this->generateCode(InventoryMovement::INPUT_MASK))\n ->setMask(InventoryMovement::INPUT_MASK)\n ->setType(InventoryMovement::TYPE_INPUT)\n ;\n\n return $input;\n }", "public function setInputFile($path)\n {\n $this->inputFile = $path;\n\n return $this;\n }", "public function create($entity);", "protected function fileObj() {\n\t\t$fileObj = new Varien_Io_File ();\n\t\treturn $fileObj;\n\t}", "protected function createResourceFile(ScaffoldInputBase $input)\n {\n\n $this->call(\n 'resource-file:from-database',\n [\n 'model-name' => $input->modelName,\n '--table-name' => $input->table,\n '--resource-filename' => $input->resourceFile,\n '--translation-for' => $input->translationFor,\n '--force' => $input->force,\n ]\n );\n\n return $this;\n }", "public function create(string $encodingId, \\BitmovinApiSdk\\Models\\FileInputStream $fileInputStream) : \\BitmovinApiSdk\\Models\\FileInputStream\n {\n $pathParams = [\n 'encoding_id' => $encodingId,\n ];\n\n $response = $this->httpWrapper->request('POST', '/encoding/encodings/{encoding_id}/input-streams/file', $pathParams, null, $fileInputStream, true);\n\n return ObjectMapper::map($response, \\BitmovinApiSdk\\Models\\FileInputStream::class);\n }", "public static function create($contents, $ext = '', $name = '', $interface = \"LocalFileInterface\"){\n\t\t$hash = md5(serialize(func_get_args()));\n\n\t\tif($file = self::hashExists($hash)){\n\t\t\treturn $file;\n\t\t}\n\t\t//the new file is unique;\n\n\t\t$file = new File();\n\t\t$file['hash'] = $hash;\n\t\t$file['ext'] = $ext;\n\t\t$file['name'] = $name;\n\t\t$file['created_at'] = new MongoDate();\n\t\t$file['size'] = strlen($contents) * 8;\n\t\t$file['interface'] = $interface;\n\t\t$file['interface_data'] = null;\n\t\t$file->save();\n\n\t\t$interface = new $interface($file);\n\t\t$file = $interface->create($contents);\n\t\t$file->save();\n\t\t\n\t\treturn $file;\n\n\t}", "private function createEntity()\n {\n $this->entity = $this->container->make($this->entity());\n }", "public function store(Request $request)\n {\n \tFile::create($request->all());\n }", "public function createFile(Request $request)\n {\n if( !$this->checkPermissions(['view-my-files']) ){ return $this->genResponse(401); };\n\n return $this->doCreateFile($request);\n }", "public function createNew();", "abstract public function createBlankFile(FileData $fileData);", "public function store(CreateRequest $request)\n {\n $file = $request->file('file');\n $name = $file->getClientOriginalName();\n \\Storage::disk('local')->put($name, \\File::get($file));\n $request = $request->all();\n $request['file'] = $name;\n $document = $this->document->create($request);\n $document->documentTypes()->sync($request['documentType']);\n Session::flash('message-success',' Document '. $name.' '.trans('messages.created'));\n\n }", "public function upload(?UploadedFileInterface $input, User $user): FileMeta\n {\n $id = Uuid::uuid4();\n $fileKey = KeyFactory::generateEncryptionKey();\n\n // encrypt file key with our own public key for storage\n $encryptedFileKey = AsymmCrypto::encrypt(\n new HiddenString($fileKey->getRawKeyMaterial()),\n $user->getKey(),\n $user->getKey()->derivePublicKey()\n );\n\n // encrypt file and write to storage\n $this->fs->write(\n $id->toString(),\n SymmCrypto::encrypt(new HiddenString($input->getStream()->getContents()), $fileKey)\n );\n\n // persist file metadata and our (encrypted) per-file key\n $this->db->perform('INSERT INTO file (id, user_id, size, content_type, filename) VALUES (?, ?, ?, ?, ?)', [\n $id->toString(), $user->getId()->toString(),\n $input->getSize(), $input->getClientMediaType(), $input->getClientFilename()\n ]);\n $this->db->perform('INSERT INTO file_key (file_id, user_id, encrypted_key) VALUES (?, ?, ?)', [\n $id->toString(), $user->getId()->toString(), $encryptedFileKey\n ]);\n\n return new FileMeta($user, $id, $input->getClientFilename(), $input->getClientMediaType(), $input->getSize(),\n $user->getId(), $user->getUsername());\n }", "function create(array $fields): AbstractEntity\n {\n $text = new Text();\n $filledFields = 0;\n if(isset($fields[0])) {\n $text->setFileName($fields[0]);\n $filledFields++;\n }\n if(isset($fields[1])) {\n $text->setText($fields[1]);\n $filledFields++;\n }\n if($filledFields !== 2) {\n throw new CreateModelException($text);\n }\n return $text;\n }", "public function actionCreate()\n {\n $model = new Requests();\n $location = new \\common\\models\\Locations();\n if(\\Yii::$app->user->can('client')){\n if ($model->load(Yii::$app->request->post()) and $location->load(Yii::$app->request->post()) and $location->save()) { \n $model->client_id = \\Yii::$app->user->id;\n $model->location_id = $location->id;\n $model->object_type = $model->object_type ?: 'building';\n $model->status = 'active';\n $model->time = time();\n $model->docFile = UploadedFile::getInstance($model, 'docFile');\n if($model->save()){\n if ($model->docFile) {\n $image = $model->uploadFiles();\n $r_file = new \\common\\models\\RequestFiles();\n $r_file->file_id = $image;\n $r_file->request_id = $model->id;\n $r_file->save();\n }\n return $this->redirect(['view', 'id' => $model->id]);\n } \n } else {\n return $this->render('create', [\n 'model' => $model,\n 'location' => $location,\n ]);\n }\n } else {\n return $this->redirect(['/user/registration/register-client']);\n }\n }", "public function actionCreate()\n {\n $model = new Book();\n\n \n $model->imageFileName_Fl = UploadedFile::getInstance($model, 'imageFileName_Fl');\n if ($model->imageFileName_Fl && $model->validate()) { \n $s2=$model->id . '_' . $model->imageFileName_Fl->baseName . '.' . $model->imageFileName_Fl->extension; \n $model->imageFileName_Fl->saveAs(Yii::getAlias('@frontend').'/web/uploads/' . $s2);\n $model->imageFileName=$s2;\n }\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "protected function asFileRequest($request)\n {\n // verify the required parameter '$request' is set\n if ($request === null) {\n throw new InvalidArgumentException(\n 'Missing the required parameter $request when calling asFile'\n );\n }\n\n // body params\n if (is_string($request)) {\n $httpBody = \"\\\"\" . $request . \"\\\"\";\n } else {\n $httpBody = $request;\n }\n\n $headers = $this->headerSelector->selectHeaders(\n ['multipart/form-data'],\n ['application/json']\n );\n $path = '/email/Contact/as-file';\n return $this->toClientRequest('PUT', $httpBody, $path, [], [], [], false, $headers, []);\n }", "public function store(Request $request)\n {\n \n $xml_object = simplexml_load_file($request->file('inputFile')->getRealPath());\n \n $json = json_decode(json_encode($xml_object));\n \n if($json->person) {\n $this->savePerson($json->person);\n } \n \n else if ($json->shiporders) {\n $this->saveShiporders($json->shiporders);\n }\n \n }", "protected function fromFileRequest(Model\\ContactFromFileRequest $request)\n {\n // verify the required parameter 'format' is set\n if ($request->format === null) {\n throw new InvalidArgumentException(\n 'Missing the required parameter $format when calling fromFile'\n );\n }\n // verify the required parameter 'file' is set\n if ($request->file === null) {\n throw new InvalidArgumentException(\n 'Missing the required parameter $file when calling fromFile'\n );\n }\n\n $resourcePath = '/email/Contact/from-file';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $multipart = false;\n\n // query params\n $paramValue = $request->format;\n $paramBaseName = 'format';\n $this->processQueryParameter($paramValue, $paramBaseName, $queryParams, $resourcePath);\n\n // form params\n $formFiles = [];\n if ($request->file !== null) {\n $multipart = true;\n $filename = ObjectSerializer::toFormValue($request->file);\n $handle = fopen($filename, \"rb\");\n $fileSize = filesize($filename);\n $contents = fread($handle, $fileSize);\n $formParams['file'] = $contents;\n $formFiles['file'] = basename($filename);\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 ['multipart/form-data']\n );\n }\n return $this->toClientRequest(\n 'PUT',\n null,\n $resourcePath,\n $queryParams,\n $formParams,\n $formFiles,\n $multipart,\n $headers,\n $headerParams\n );\n }", "function create($file = null) {\n $file = (isset($this->_file) && !$file) ? $this->_file : $file;\n \n \tif (!Fire_File_Helper::exists($file)) {\n $io = new Fire_File_IO_Helper($file);\n $io->open('w+');\n $io->close();\n } else {\n Fire_Error::throwError(sprintf('File \"%s\" already exists.',\n $file\n ), __FILE__, __LINE__\n );\n }\n \n }", "public function createTask(Request $request)\n : TaskInterface\n {\n // validate the base rules.\n $this\n ->getCreateTaskValidator()\n ->validate($request);\n\n // Create resource\n $resource = $this->createResource(\n $request->input('storage.channel'),\n $this->makePath($request->input('filename'))\n );\n\n // Create task\n $channel = $this->getChannel($resource);\n $channel->setRequest($request);\n\n return $channel->createTask();\n }", "public function create(){}", "public function __construct($file);", "public static function create($formInputs,$fileInputs){\n $formArray = []; \n // var_dump($formInputs);\n // die;\n foreach($formInputs as $key => $value) {\n $formArray[$key] = $value;\n if($value==Null){\n $formArray[$key]=Null;\n }\n }\n foreach($fileInputs as $key => $value) {\n \n if($value[\"name\"] != \"\"){\n $formArray[$key] = wp_upload_dir()[\"subdir\"] .\"/\". $value[\"name\"];\n }\n else{\n $formArray[$key] = Null;\n }\n\n }\n \n\n\n DataWebGl::create($formArray);\n }", "public function publicUpload()\n {\n $this->request->validate([\n $this->inputName => $this->extensions,\n ]);\n\n if ($uploadedFile = $this->request->file($this->inputName))\n {\n $fileName = time() . $uploadedFile->getClientOriginalName();\n $uploadedFile->move(uploadedImagePath() . DIRECTORY_SEPARATOR . $this->path, $fileName);\n $filePath = uploadedImagePath() . DIRECTORY_SEPARATOR . $this->path . DIRECTORY_SEPARATOR .$fileName;\n $image = $this->modelName::create(['name' => $fileName, 'path' => $filePath]);\n return $image->id;\n }\n\n }", "public function actionCreate()\n {\n $model = new Person();\n /** @var EntityForm $EntityForm */\n $EntityForm = new EntityForm(new ActivityDirection());\n\n if ($model->load(Yii::$app->request->post())) {\n\n /** Save activities directions mapping **/\n if ($model->activities_ids) {\n $model->setRelated('activities', $model->activities_ids, true);\n }\n\n if(UploadedFile::getInstance($model, 'logo'))\n {\n $model->logo=UploadedFile::getInstance($model, 'logo');\n $model->logo->saveAs('../../frontend/web/mt/img/'.$model->logo->baseName.\".\".$model->logo->extension);\n $model->logo=$model->logo->baseName.\".\".$model->logo->extension; \n }\n if($model->tags)\n $model->tags = implode(\", \", $model->tags);\n $model->raiting = 0;\n $model->reviews = 0;\n \n $model->save();\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'entityForm' => $EntityForm\n ]);\n }\n }", "private function createFiles($request)\n {\n $this->createFilesFromArray($request, $request->getParams);\n $this->createFilesFromArray($request, $request->postParams);\n }", "public static function create(string $source): File {\n $file = new File();\n $file->init($source);\n return $file;\n }", "private function createFile($file)\n\t{\n\t\t//exit;\n\n\t\t$extension = $file->guessExtension();\n\t\t$dir = $this->getUploadDir();\n\t\tif (!$extension) {\n\t\t\t$extension = 'bin';\n\t\t}\n\t\t$newName = $this->createRandCode() . '.' . $extension;\n\t\t$file->move($dir, $newName);\n\t\t/*\n\t\t * Создание и сохранение информации о файле\n\t\t */\n\t\t$File = new File();\n\t\t$File->setName($newName);\n\t\t$File->setType($file->getClientMimeType());\n\t\t$File->setSize($file->getClientSize());\n\t\treturn $File;\n\t}", "public function getInputFileAttribute()\n\t{\n\t\treturn \"$this->id.in\";\n\t}", "private function createFile(array $options): void\n {\n if (class_exists($options['className'])) {\n Console::fatal($options['entityName'] . ' ' . $options['fileKind'] . ' file already exists.');\n }\n\n Console::write('Generating ' . $options['entityName'] . ' ' . $options['fileKind'] . ' file..');\n\n $templateContent = $this->getFileTemplate($options['fileKind']);\n $fileContent = str_replace($options['replace']['tags'], $options['replace']['values'], $templateContent);\n\n if (file_put_contents(Config::get('BaseDir') . 'app/' . $options['filePath'], $fileContent)) {\n Console::success('[OK]' . PHP_EOL);\n } else {\n Console::error('[FAIL]' . PHP_EOL);\n }\n }", "public function __construct(FileInterface $file) {\n $this->file = $file;\n }", "public function begin()\r\n\t{\r\n\t\t$this->pointer = fopen($this->input,'rb');\r\n\t\t$this->input_stats = fstat($this->getPointer());\r\n\r\n\t\tif(is_null($this->getPointer())) {\r\n\t\t\tthrow new Exception('Couldnt create the pointer at input file.');\r\n\t\t}\r\n\r\n\t\treturn $this;\r\n\t}", "public function newInputs($inputs = array())\n {\n return new Google_Documents_UpdateFile_Inputs($inputs);\n }", "static function createInput($input, $name) {\n include $_SERVER[\"DOCUMENT_ROOT\"] . \"/mvdv/core/view/templates/general/form/formelements/input.php\";\n }", "public function create() {}", "public function storeEntity(Request $request)\n {\n $entity = new Entity();\n\n $entity->code = (string)Str::uuid();\n $entity->name = $request->input('name');\n $entity->description = $request->input('description');\n //TODO: upload file\n $entity->image = '';\n $entity->category_id = $request->input('category');\n $entity->save();\n $entity = Entity::find($entity->id)->toArray();\n\n return response()->json([$entity]);\n }", "public function setInput($file)\r\n\t{\r\n\t\tif(!file_exists($file)) {\r\n\t\t\tthrow new InvalidArgumentException('File not found.');\r\n\t\t}\r\n\t\t$this->input = $file;\r\n\t\treturn $this->begin();\r\n\t}", "public static function createInstance()\n {\n return new FileField('ISerializable', 'ISerializable');\n }", "public function importAction(Request $request)\n {\n $form = $this->createFormBuilder(array())\n ->add('source', 'file')\n ->getForm();\n $form->add('submit', 'submit', array('label' => 'Import'));\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $name = \"tmp.xml\";\n $dir = __DIR__.\"/../../../../../web/tmp\";\n $form['source']->getData()->move($dir, $name);\n $xml = simplexml_load_file($dir.\"/\".$name);\n $productManager=$this->get(\"caravane_shop.product_manager\");\n $productManager->import($xml);\n }\n\n return $this->render('CaravaneShopBundle:Product:import.html.twig', array(\n 'import_form'=>$form->createView()\n ));\n\n }", "public function create()\n\t{\n\t\t$this->auth->restrict('Upload.Developer.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_upload())\n\t\t\t{\n\t\t\t\t// Log the activity\n\t\t\t\t$this->activity_model->log_activity($this->current_user->id, lang('upload_act_create_record').': ' . $insert_id . ' : ' . $this->input->ip_address(), 'upload');\n\n\t\t\t\tTemplate::set_message(lang('upload_create_success'), 'success');\n\t\t\t\tredirect(SITE_AREA .'/developer/upload');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('upload_create_failure') . $this->upload_model->error, 'error');\n\t\t\t}\n\t\t}\n\t\tAssets::add_module_js('upload', 'upload.js');\n\n\t\tTemplate::set('toolbar_title', lang('upload_create') . ' Upload');\n\t\tTemplate::render();\n\t}", "public function createFile(File $file): void;", "public function createFromRequest(Request $request): EntityInterface\n {\n $entity = parent::createFromRequest($request);\n $entity->setNrQuestions(count($request->getParameter(\"questions\")));\n return $entity;\n }", "protected function insertInputFileElement($elementId)\n {\n $inputFileInjectionJavaScript = <<<JS\n var inputElement = document.createElement('input');\n\n inputElement.setAttribute('id', '$elementId');\n inputElement.setAttribute('type', 'file');\n inputElement.setAttribute('multiple', 'multiple');\n\n document.body.appendChild(inputElement);\nJS;\n $this->getSession()->executeScript($inputFileInjectionJavaScript);\n\n $assertInputFileExistJavaScript = <<<JS\n return !! document.getElementById('$elementId');\nJS;\n $this->assertByJavaScript(\n $assertInputFileExistJavaScript,\n 'The <input> element with id=\"' . $elementId . ' was NOT successfully added.'\n );\n }", "public function createSource();", "public function create($request) {\n\n\t\t$image = $request['photo'];\n\t\tif($image !== null) {\n\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t$request['photo'] = $name;\n\t\t} else {\n\t\t\t$request['photo'] = \"product-empty.png\";\n\t\t}\n\t\t$request['user_id'] = auth()->user()->id;\n\t\treturn $this->product->create($request);\n\t}", "public function createEntity() {\r\n\t\t$entity = $this->getAnnotation('entity');\r\n\t\tif($entity) {\r\n\t\t\treturn new $entity;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function store(Request $request)\n {\n $validated = $this->validateInput($request);\n\n $entity = Entity::create($validated);\n\n return $entity;\n }", "public function addInput ( \\r8\\FileSys $input )\n {\n $input = clone $input;\n\n if ( $input->isFile() ) {\n $this->inputs->append( new \\ArrayIterator(array($input)) );\n }\n else if ( $input->isDir() ) {\n $input->setIncludeDots(FALSE);\n $this->inputs->append(\n new \\RecursiveIteratorIterator($input)\n );\n }\n else {\n throw new \\r8\\Exception\\Argument(0, 'Input', 'Path does not exist');\n }\n\n return $this;\n }", "public function create()\n {\n $invoice = new InvoiceEntity();\n $invoice->setNumber('019101910191091')\n ->setValue(100.90)\n ->setUrl('http://domain.com')\n ->setIssuanceDate('2017-09-15')\n ->setKey('POL9898AS');\n\n $tracking = new TrackingEntity();\n $tracking->setOrderId('00001010101AA')\n ->setStatus('in_route')\n ->setCode('BR800OPR5')\n ->setInvoice($invoice);\n\n $this->dm->persist($tracking);\n $this->dm->flush();\n }", "public function create();", "public function create();" ]
[ "0.69726026", "0.6608301", "0.63114345", "0.6300068", "0.61188394", "0.60326636", "0.59942913", "0.5837965", "0.5754056", "0.5735701", "0.5716835", "0.5688654", "0.563184", "0.5611988", "0.5576752", "0.5575981", "0.55270207", "0.55223155", "0.5503374", "0.5470816", "0.5450584", "0.5450412", "0.5442372", "0.5435458", "0.543038", "0.54003143", "0.54003143", "0.5381724", "0.5368926", "0.53581876", "0.53568506", "0.5355809", "0.53146935", "0.531446", "0.53133446", "0.53129315", "0.53034925", "0.5293538", "0.5284628", "0.5284384", "0.5283987", "0.5229175", "0.5226717", "0.51882285", "0.5174197", "0.5165077", "0.51599556", "0.51586896", "0.5158664", "0.5156006", "0.51551354", "0.51444936", "0.51380956", "0.51314723", "0.5128029", "0.51185894", "0.5110526", "0.5103882", "0.50935185", "0.50916505", "0.5080676", "0.5077664", "0.50753796", "0.5075066", "0.50710225", "0.5069726", "0.5067835", "0.5064943", "0.5064668", "0.5057926", "0.5040336", "0.50359434", "0.5033242", "0.50326806", "0.5031022", "0.5028912", "0.50227165", "0.50051445", "0.500456", "0.5001726", "0.49979132", "0.49879384", "0.49734083", "0.49692428", "0.49664518", "0.49648914", "0.49647832", "0.4962521", "0.4955995", "0.49505693", "0.49436373", "0.49417377", "0.49382102", "0.49336615", "0.4926886", "0.49259937", "0.4922439", "0.4922152", "0.49219704", "0.4920187", "0.4920187" ]
0.0
-1
Return the name of the file.
public function getFileName() { return basename($this->path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_file_name() {\n\t\treturn $this->file;\n\t}", "public function getName()\n {\n return $this->file->getName();\n }", "public function name() : string {\n return $this->file->name;\n }", "public function getName(){\n if ($this->file)\n return $this->file->getName();\n }", "public function getFileName()\n {\n return basename($this->file, '.' . $this->getExtension());\n }", "public function fileName()\n {\n return $this->getCleanString(self::$_file_name_clean);\n }", "public function filename() : string {\n return $this->name;\n }", "public function getFileName() {\n return $this->name;\n }", "public function getName()\n {\n return $this->file['name'];\n }", "public function getFileName()\n {\n $value = $this->get(self::FILENAME);\n return $value === null ? (string)$value : $value;\n }", "public function getName()\n {\n return $this->_path['filename'];\n }", "public function getFileName()\n\t{\n\t\treturn $this->fileName;\n\t}", "public function getFileName()\n\t{\n\t\treturn $this->fileName;\n\t}", "public function getFileName()\n {\n return $this->language.'/'.strtolower($this->getName());\n }", "protected function getFileName() {\n // Full file path.\n $path = $this->urls[$this->activeUrl];\n\n // Explode with the '/' to get the last element.\n $files = explode('/', $path);\n\n // File name without extension.\n $file_name = explode('.', end($files))[0];\n return $file_name;\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "public function getFileName()\n {\n return $this->fileName;\n }", "public function getFileName()\n {\n return $this->filename;\n }", "public function getFileName()\n {\n return $this->filename;\n }", "public function get_file_name(){\n return $this->file_name;\n }", "public function getFileName() {\n return $this->fileName;\n }", "public function getFileName() {\n\n return $this->fileName;\n }", "public function getFileName() {\n\t\treturn $this->filename;\n\t}", "public function filename()\n\t{\n\t\treturn $this->_filename();\n\t}", "public function getFilename()\n {\n return static::filename($this->path);\n }", "private function fileName()\n\t{\n\t\treturn $this->files[count($this->files) - 1];\n\t}", "public function name() {\n\t\treturn basename($this->path);\n\t}", "public function getFileName();", "public function getFileName();", "public function getFileName();", "public static function getName()\n\t{\n\t\treturn self::$filename;\n\t}", "public function getFilename() : string\n {\n return $this->fileName;\n }", "public function name() {\n\t\t// @version 1.2.0 Use filename then fallback to path\n\t\t$path = $this->data('name') ?: $this->path();\n\n\t\treturn pathinfo($path, PATHINFO_FILENAME);\n\t}", "function GetFileName() {\n \treturn $this->FilePost[$this->ObjClientSide]['name'];\n }", "public function getFilename() {\n return $this->getData('file');\n }", "function _getFileName()\r\n\t{\r\n\t\t$f = $this->pathHomeDir . '/' . $this->pathLocale . '/' . $this->pathFile . \".\" . $this->pathEx;\r\n\t\treturn $f;\r\n\t}", "public function getFileName() {\n\n return $this->_fileName;\n }", "public function getFileName() {\n\t \t return $this->fileName;\n\t }", "public function getFilename()\r\n {\r\n return pathinfo($this->filename, PATHINFO_BASENAME);\r\n }", "public function getFileName() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"filename\", FALSE);\n\t}", "public function getFileName()\n {\n return realpath($this->node->getAttribute('fileName', ''));\n }", "public function getNameAttribute()\n {\n return pathinfo($this->file_path, PATHINFO_FILENAME);\n }", "public function get_full_file_name() {\r\n return (string) $this->full_file;\r\n }", "public function getFilename();", "public function getFilename();", "public function getFileName()\n {\n return $this->prefix.$this->scope.'_'.$this->comName;\n }", "function getFileName()\n {\n return $this->fileName;\n }", "public function fileName() {\n $name = time() . $this->file->getClientOriginalName();\n $extension = $this->file->getClientOriginalExtension();\n return \"{$name}.{$extension}\";\n }", "public function getFilename()\n {\n $file = basename($this->srcPath);\n\n $ops = str_replace(array('&', ':', ';', '?', '.', ','), '-', $this->operations);\n return trim($ops . '-' . $file, './');\n }", "public function get_file_name()\n {\n if( is_null( $this->file_name ) ) return NULL;\n $pos1 = strrpos( $this->file_name, '/' );\n $pos2 = strrpos( $this->file_name, '.' );\n return false === $pos2\n ? substr( $this->file_name, false === $pos1 ? 0 : $pos1 + 1 )\n : substr( $this->file_name, false === $pos1 ? 0 : $pos1 + 1, $pos2 - $pos1 - 1 );\n }", "public function getFileName()\n {\n return \"{$this->getUserOS()}-{$this->getDriver()}{$this->getFileExtension()}\";\n }", "public function getFileName()\n {\n $fileName = $this->getInfo('fileName');\n if (!$fileName) {\n $fileName = $this->getInfo('title');\n }\n if (!$fileName) {\n $fileName = Zend_Controller_Front::getInstance()->getRequest()->getParam('controller') . '-' . date(\"Ymd\");\n }\n return $fileName . '.csv';\n }", "function getName() {\n\t\treturn $this->data_array['filename'];\n\t}", "public function getFilename()\n {\n if (!$this->fileName) {\n $matcher = $this->getFileMatcher();\n $this->fileName = $this->searchFile($matcher);\n }\n\n return $this->fileName;\n }", "public function getFileName(){\n return $this->_fileName;\n }", "public function getFileName() {\n\t\treturn $this->_pidFile;\n\t}", "public function filename(): string;", "protected function ___filename() {\n\t\treturn $this->pagefiles->path . $this->basename;\n\t}", "public function getFilename()\n\t\t{\n\t\t\treturn $this->_fileName;\n\t\t}", "public function getBaseName()\n {\n return basename($this->file);\n }", "public function filename(): string\n {\n return Str::random(6) . '_' . $this->type . $this->fileExtension();\n }", "public function getName() {\r\n if ($this->pathname) {\r\n return basename($this->pathname);\r\n } else {\r\n return \"\";\r\n }\r\n }", "public function getFilename(): string\n {\n return $this->filename;\n }", "public function getFilename(): string\n {\n return $this->filename;\n }", "public function GetName()\n\t{\n\t\tif (!empty($this->path))\n\t\t\treturn basename($this->path);\n\n\t\treturn '';\n\t}", "protected function filename () : string {\n return sprintf('%s/%s.csv', $this->instanceDirectory(), $this->guessName());\n }", "public function getName($file)\n {\n return pathinfo($file)['basename'];\n }", "public function getFilename() {}", "public function getFileName(): string\n {\n if (strpos($this->savefileName, '.php') === false) {\n return $this->savefileName . $this->extension;\n }\n return $this->savefileName;\n }", "public function getPathname(): string\n {\n return $this->directory->getPath().'/'.$this->filename;\n }", "public function getName()\n\t{\n\t\tglobal $langs;\n\n\t\treturn $langs->trans('File');\n\t}", "public function getFileName()\n {\n if (array_key_exists(\"fileName\", $this->_propDict)) {\n return $this->_propDict[\"fileName\"];\n } else {\n return null;\n }\n }", "public function getFilename() {\n return $this->path;\n }", "public function getFilename()\n {\n return 'test-file';\n }", "private function getFilename()\n {\n if ($this->uniqueFile) {\n return $this->filename;\n }\n\n return $this->filename . self::SEPARATOR . $this->getCurrentSitemap();\n }", "public function getNameFil()\n\t {\n\t return $this->nameFile;\n\t }", "public function getFilename()\n {\n return $this->filename;\n }", "public function getFilename()\n {\n return $this->filename;\n }", "public function getFilename()\n {\n return $this->filename;\n }", "public function getFilename()\n {\n return $this->filename;\n }", "public function getFilename()\n {\n return $this->filename;\n }", "public function getFilename()\n {\n return $this->filename;\n }", "public static function filename($file)\n {\n $info = pathinfo($file);\n $dt = static::now();\n $postfix = $dt->format(Config::get('settings.file_datetime_format'));\n if(isset($info['extension']) and !empty($info['extension']))\n {\n $filename = $info['filename'].'_'.$postfix.'.'.$info['extension'];\n } else {\n $filename = $info['filename'].'_'.$postfix;\n }\n \n return $filename;\n }", "public function getFileName(): string;", "public function get_filename()\n {\n }", "public function getName()\n\t{\n\t\treturn str_replace(\".{$this->getExtension()}\", '', $this->path);\n\t}", "public function getFilename()\n\t\t{\n\t\t\treturn $this->filename;\n\t\t}", "protected function fileName() {}", "public function myFilename()\r\n {\r\n $reflection = new ReflectionClass($this);\r\n\r\n return $reflection->getFileName();\r\n }", "public function getFilename()\n {\n return '';\n }", "public function getFullname(){\n\t \treturn $this->filename.'.'.$this->extension;\n\t }", "public function getFileName(){\n\t\t$filename = sprintf($this->format, $this->classname) . '.php';\n\t\t\n\t\treturn $filename;\n\t}", "public function getFilename() {\n\t\treturn $this->filename;\n\t}", "public function getFilename() {\n\t\treturn $this->filename;\n\t}", "public function getFileName(){\n return $this->finalFileName;\n }", "public function getName() {\n return $_FILES['uploadfile']['name'];\n }", "public function getFilename()\n {\n return $this->_filename;\n }" ]
[ "0.86393106", "0.8474009", "0.84553915", "0.8454884", "0.84366345", "0.83307564", "0.8315749", "0.8307937", "0.83034724", "0.8275683", "0.8268742", "0.8160575", "0.8160575", "0.8144971", "0.8110919", "0.81087303", "0.81087303", "0.81087303", "0.81087303", "0.81087303", "0.806272", "0.806272", "0.80305994", "0.8023932", "0.8005366", "0.79995906", "0.799676", "0.7996598", "0.79807866", "0.79761606", "0.7971907", "0.7971907", "0.7971907", "0.7962718", "0.7961282", "0.7959725", "0.79365265", "0.7911594", "0.7904416", "0.7897225", "0.7884794", "0.786369", "0.7840625", "0.78366566", "0.7835751", "0.7829467", "0.7806827", "0.7806827", "0.77701503", "0.77683914", "0.7768196", "0.77551055", "0.7748483", "0.7742116", "0.77395135", "0.77321726", "0.7717417", "0.7707365", "0.76899534", "0.76714706", "0.7671276", "0.7670951", "0.7652308", "0.76452196", "0.7637603", "0.76316285", "0.76316285", "0.76294386", "0.76193", "0.7602007", "0.76007444", "0.7586122", "0.7563685", "0.75480765", "0.75418353", "0.75402325", "0.7533342", "0.75253797", "0.75249773", "0.7518357", "0.7518357", "0.7518357", "0.7518357", "0.7518357", "0.7518357", "0.75160515", "0.75151175", "0.75108504", "0.74939775", "0.7470462", "0.747009", "0.7465426", "0.74513465", "0.7441947", "0.7430133", "0.7416519", "0.7416519", "0.7412929", "0.740885", "0.7406109" ]
0.8405428
5
Returns true if the path to the file is remote.
protected function isRemoteFile() { return preg_match('/^(https?|ftp):\/\/.*/', $this->path) === 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isRemote()\n {\n return (bool) filter_var($this->absolutePath, FILTER_VALIDATE_URL) or starts_with($this->absolutePath, '//');\n }", "public function hasRemoteUrl();", "public function isRemote();", "protected function isRemoteFile($src)\n {\n return str_contains($src, 'http://') || str_contains($src, 'https://');\n }", "public function checkRemoteFile($url){\n\n\t $ch = curl_init();\n\n\t curl_setopt($ch, CURLOPT_URL,$url);\n\n\t // don't download content\n\t curl_setopt($ch, CURLOPT_NOBODY, 1);\n\t curl_setopt($ch, CURLOPT_FAILONERROR, 1);\n\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n\t if (curl_exec($ch) !== FALSE) {\n\t return true;\n\t \t}\n\t else {\n\t return false;\n\t \t}\n\n\t\t}", "public function checkRemoteFile($url){\n\n\t $ch = curl_init();\n\n\t curl_setopt($ch, CURLOPT_URL,$url);\n\n\t // don't download content\n\t curl_setopt($ch, CURLOPT_NOBODY, 1);\n\t curl_setopt($ch, CURLOPT_FAILONERROR, 1);\n\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n\t if (curl_exec($ch) !== FALSE) {\n\t return true;\n\t \t}\n\t else {\n\t return false;\n\t \t}\n\t\t}", "protected function isRemoteConnected()\n {\n return ($this->getRemote() && !feof($this->getRemote()));\n }", "public function isFileExistsRemotely();", "function checkRemoteFile($url) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n// don't download content\n curl_setopt($ch, CURLOPT_NOBODY, 1);\n curl_setopt($ch, CURLOPT_FAILONERROR, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n if (curl_exec($ch) !== FALSE) {\n return true;\n } else {\n return false;\n }\n}", "private static function remoteFileExists($url) {\n\t\t$f = @fopen($url, 'r');\n\t\tif($f) {\n\t\t\tfclose($f);\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "public function isFile()\n {\n $this->is_file = false;\n\n try {\n\n if (@ftp_get($this->getConnection(), $this->temp, $this->path, Ftp_ASCII, 0)) {\n $this->is_file = true;\n }\n\n } catch (\\Exception $e) {\n }\n\n return;\n }", "function parcelcheckout_isLocalFile($sFile)\n\t{\n\t\tif(strpos($sFile, '../') === false) // No relative paths..\n\t\t{\n\t\t\t$sRootPath = parcelcheckout_getRootPath();\n\t\t\t$sFilePath = substr($sFile, 0, strlen($sRootPath));\n\n\t\t\tif(strcmp($sFilePath, $sRootPath) === 0)\n\t\t\t{\n\t\t\t\tif(@is_file($sFile) && @is_readable($sFile))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public static function isRemoteLink($link)\n {\n $base = Grav::instance()['uri']->rootUrl(true);\n\n // Sanity check for local URLs with absolute URL's enabled\n if (Utils::startsWith($link, $base)) {\n return false;\n }\n\n return (0 === strpos($link, 'http://') || 0 === strpos($link, 'https://') || 0 === strpos($link, '//'));\n }", "function file_exists($pathname)\r\n {\r\n if ($this->_use_mod_ftp) {\r\n \t\tftp_mdtm($this->_socket, $pathname);\r\n \t} else {\r\n \tif (!$this->_socket) {\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n \t$this->putcmd(\"MDTM\", $pathname);\r\n \t}\r\n \tif ($this->ok()) {\r\n \t\t$this->debug(\"Remote file \".$pathname.\" exists\\n\");\r\n \t\treturn TRUE;\r\n \t} else {\r\n \t\t$this->debug(\"Remote file \".$pathname.\" does not exist\\n\");\r\n \t\treturn FALSE;\r\n \t}\r\n }", "public static function isLocal(string $path): bool\n {\n return '' !== $path && !str_contains($path, '://');\n }", "public function is_local( $path ){\r\n\r\n\t\tif ( count( explode( root, $path ) ) > 1 )\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\r\n\t}", "public function isRelative()\n {\n if (preg_match('~^https?:\\/\\/~i', $this->url) OR preg_match('~^\\/\\/~i', $this->url)) {\n return false;\n } else {\n return true;\n }\n }", "public function remoteExists($name = 'joomla')\n\t{\n\t\treturn in_array($name, $this->_getRemotes());\n\t}", "private function isRemoteAsset($asset)\n {\n // Regex for 'http://' or 'https://'or '//'\n $re = '/^https?:\\/\\/.+|^\\/\\/.+/';\n // Return number of matches\n return preg_match($re, $asset);\n }", "public function isAbsolute(): bool\n\t{\n\t\treturn empty($this->host) === false;\n\t}", "function check_remote_file($url)\n {\n $content_type = '';\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n curl_setopt($ch, CURLOPT_NOBODY, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n $results = explode(\"\\n\", trim(curl_exec($ch)));\n foreach ($results as $line) {\n if (strtolower(strtok($line, ':')) == 'content-type') {\n $parts = explode(\":\", $line);\n $content_type = trim($parts[1]);\n }\n }\n curl_close($ch);\n $status = strpos($content_type, 'image') !== false;\n\n return $status;\n }", "public function localFileExists()\n {\n return file_exists($this->GetRealPath());\n }", "function remote_file_exists($url)\n\t{\n\t // Make sure php will allow us to do this...\n\t if ( ini_get('allow_url_fopen') )\n\t {\n\t \t$head = '';\n\t \t$url_p = parse_url ($url);\n\t\n\t \tif (isset ($url_p['host']))\n\t \t{\n\t\t\t\t$host = $url_p['host']; \n\t\t\t}\n\t \telse\n\t \t{\n\t \treturn false;\n\t \t}\n\t\n\t \tif (isset ($url_p['path']))\n\t \t{ \n\t\t\t\t$path = $url_p['path']; \n\t\t\t}\n\t \telse\n\t \t{\n\t\t\t \t$path = ''; \n\t\t\t}\n\t\n\t \t$fp = @fsockopen ($host, 80, $errno, $errstr, 20);\n\t \tif (!$fp)\n\t \t{\n\t \t\treturn false;\n\t \t}\n\t \telse\n\t \t{\n\t \t\t$parse = parse_url($url);\n\t \t\t$host = $parse['host'];\n\t\n\t\t\t\t@fputs($fp, 'HEAD '.$url.\" HTTP/1.1\\r\\n\");\n\t \t\t@fputs($fp, 'HOST: '.$host.\"\\r\\n\");\n\t \t\t@fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n\t \t\t$headers = '';\n\t \t\twhile (!@feof ($fp))\n\t \t\t{ \n\t\t\t\t\t$headers .= @fgets ($fp, 128); \n\t\t\t\t}\n\t \t}\n\t \t@fclose ($fp);\n\t\n\t \t$arr_headers = explode(\"\\n\", $headers);\n\t \tif (isset ($arr_headers[0])) \n\t\t\t{\n\t \t\tif(strpos ($arr_headers[0], '200') !== false)\n\t \t\t{ \n\t\t\t\t\treturn true; \n\t\t\t\t}\n\t \t\tif( (strpos ($arr_headers[0], '404') !== false) || (strpos ($arr_headers[0], '509') !== false) || (strpos ($arr_headers[0], '410') !== false))\n\t \t\t{ \n\t\t\t\t\treturn false; \n\t\t\t\t}\n\t \t\tif( (strpos ($arr_headers[0], '301') !== false) || (strpos ($arr_headers[0], '302') !== false))\n\t\t\t\t{\n\t \t\tpreg_match(\"/Location:\\s*(.+)\\r/i\", $headers, $matches);\n\t \t\tif(!isset($matches[1]))\n\t\t\t\t\t{\n\t \t\t\treturn false;\n\t\t\t\t\t}\n\t \t\t$nextloc = $matches[1];\n\t\t\t\t\treturn $this->remote_file_exists($nextloc);\n\t \t\t}\n\t \t}\n\t \t// If we are still here then we got an unexpected header\n\t \treturn false;\n\t }\n\t else\n\t {\n\t \t// Since we aren't allowed to use URL's bomb out\n\t \treturn false;\n\t }\n\t}", "public function isRemoteTransportException(): bool\n {\n return $this->_isRemote;\n }", "public function hasRemote(string $remote) : bool\n {\n $process = $this->runProcess(new Process('git remote'));\n\n return str_contains($process->getOutput(), $remote);\n }", "public function isLocal()\n {\n return $this->server['SERVER_ADDR'] === $this->getClientIP();\n }", "public function isRelative()\n {\n if($this->_address == $this->_request)\n return true;\n return false;\n }", "public function remote()\n\t{\n\t\treturn $this->CLI->boolQuery($this->SqueezePlyrID.\" remote ?\");\n\t}", "private function __isFile()\n\t{\n\t\tif(!$this->exists())\n\t\t{\n\t\t\t$this->error = 'File \\'' . $this->_path . '\\' does not exist';\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function is_local($src)\n\t{\n\t\t// prepend scheme to scheme-less URLs, to make parse_url work\n\t\tif (0 === strpos($src, '//')) {\n\t\t\t$src = 'http:' . $src;\n\t\t}\n\n\t\t$url = @parse_url($src);\n\t\t$blog_url = @parse_url(home_url());\n\t\tif (false === $url)\n\t\t\treturn false;\n\n\t\tif (isset($url['scheme']))\n\t\t{\n\t\t\t// this should be an absolute URL\n\t\t\t// @since 1.3.0 consider sub-domain external for now\n\t\t\tif (0 <> strcmp($url['host'], $blog_url['host']))\n\t\t\t\treturn false;\n\n\t\t\treturn true;\n\t\t}\n\t\telse // Probably a relative link\n\t\t\treturn true;\n\t}", "public function getRemoteIpLookup(): bool\r\n {\r\n return $this->remoteIpLookup;\r\n }", "function _downloadRemoteImageToLocalPath($sRemoteUrl, $sFile) {\n $sRemoteData = $this->_fileGetContent($sRemoteUrl, array());\n\n // Only save data if we managed to get the file content\n if ($sRemoteData) {\n $rFile = fopen($sFile, \"w+\");\n fputs($rFile, $sRemoteData);\n fclose($rFile);\n } else {\n // Try to delete file if download failed\n if (file_exists($sFile)) {\n @unlink($sFile);\n }\n\n return false;\n }\n\n return true;\n }", "public function getIsFile() {\n\t\t$fullName = $this->getPath();\n\t\treturn is_file($fullName);\n\t}", "public function getIsAbsolutePath() {}", "public function isRemoteCheckRequired()\n {\n if ($this->uid && $this->sessionToken && $this->recheck) {\n if($this->recheck > (new DateTime('NOW'))) {\n return false;\n }\n }\n\n return true;\n }", "public function exists()\n\t{\n\t\treturn $this->get('fullPath') && file_exists($this->get('fullPath'));\n\t}", "public function hasLocalFiles(): bool\n {\n return $this->localFiles !== [];\n }", "function remoteFileExists($url) {\n $curl = curl_init($url);\n\n //don't fetch the actual page, you only want to check the connection is ok\n curl_setopt($curl, CURLOPT_NOBODY, true);\n\n //do request\n $result = curl_exec($curl);\n\n $ret = false;\n\n //if request did not fail\n if ($result !== false) {\n //if request was ok, check response code\n $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\n if ($statusCode == 200) {\n $ret = true;\n }\n }\n\n curl_close($curl);\n\n return $ret;\n }", "function has_external_src() {\n // <site_url()>/wp-content/uploads/2017/01/IMG_0319-160x160.jpg\n $local_marker = sprintf('/wp-content/uploads', site_url());\n\n // src contains localhost marker?\n return strpos($this->src, $local_marker) === false;\n }", "protected function __get_is_local()\n\t{\n\t\tstatic $patterns = array('::1', '/^127\\.0\\.0\\.\\d{1,3}$/', '/^0:0:0:0:0:0:0:1(%.*)?$/');\n\n\t\t$ip = $this->ip;\n\n\t\tforeach ($patterns as $pattern)\n\t\t{\n\t\t\tif ($pattern{0} == '/')\n\t\t\t{\n\t\t\t\tif (preg_match($pattern, $ip))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ($pattern == $ip)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function exists()\n {\n if (is_string($this->current_filepath)) {\n return is_file($this->current_filepath);\n }\n return false;\n }", "public function get_remote_ip() {\n\t\tif ( ! empty( $this->data->remote_ip ) )\n\t\t\treturn $this->data->remote_ip;\n\t\telse\n\t\t\treturn false;\n\t}", "protected function useLocalPath ()\n {\n return ( null === $this->defaultOptions[ 'local-path' ] ) ? false : true;\n }", "public function hasFortrabbitRemote(Config $config) : bool\n {\n return $this->hasRemote($config->fortrabbitRemoteName());\n }", "function remote_file_exists( $source, $extra_mile = 0 ) {\r\n ////////////////////////////////// Does it exist? \r\n # EXTRA MILE = 1 \r\n ////////////////////////////////// Is it an image? \r\n \r\n if ( $extra_mile === 1 ) { \r\n $img = @getimagesize($source); \r\n \r\n if ( !$img ) return 0; \r\n else \r\n { \r\n switch ($img[2]) \r\n { \r\n case 0: \r\n return 0; \r\n break; \r\n case 1: \r\n return $source; \r\n break; \r\n case 2: \r\n return $source; \r\n break; \r\n case 3: \r\n return $source; \r\n break; \r\n case 6: \r\n return $source; \r\n break; \r\n default: \r\n return 0; \r\n break; \r\n } \r\n } \r\n } \r\n else \r\n { \r\n if (@FClose(@FOpen($source, 'r'))) \r\n return 1; \r\n else \r\n return 0; \r\n } \r\n }", "public function isFile()\n {\n return $this->isFile;\n }", "protected function usingRealPath()\n {\n return $this->hasOption('realpath') && $this->option('realpath');\n }", "public function accept(): bool\n {\n $accept = false;\n if (parent::accept()) {\n if ($this->isDir()) {\n $accept = true;\n } else if ($this->current()->getImgId() === null) {\n // do not sync a file, which is not in database\n $accept = false;\n } else {\n $accept = $this->checkSyncDate();\n }\n }\n return $accept;\n }", "public function isFile(): bool {\n\t\t$isFile = (bool) pathinfo($this->getPath(), PATHINFO_EXTENSION);\n\t\t$originalUriHasSlash = substr($this->originalUri, - 1) === '/';\n\n\t\treturn $isFile && ! $originalUriHasSlash;\n\t}", "function cjpopups_is_local(){\n\tif($_SERVER['REMOTE_ADDR'] == '127.0.0.1'){\n\t\treturn true;\n\t}elseif(strpos(site_url(), 'cssjockey') > 0){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "public function hasHasRemoteParent(){\n return $this->_has(11);\n }", "public function getRemoteFile($localFile);", "public function hasUrlPath()\n {\n return $this->url_path !== null;\n }", "public function isFile(): bool;", "public function isLink(): bool\n {\n return is_link($this->directory->getPath().'/'.$this->filename);\n }", "public static function isLocal() {\n return (strpos($_SERVER['SERVER_ADDR'], '192.168') !== false || $_SERVER['HTTP_HOST'] == 'localhost');\n }", "function _drush_patchfile_is_url($url) {\n return parse_url($url, PHP_URL_SCHEME) !== NULL;\n}", "public function isLocal(): bool\n {\n return $this->env === 'local';\n }", "public function hasRelativePath()\n {\n return false;\n }", "protected function usingRealPath()\n {\n return $this->input->hasOption('realpath') && $this->option('realpath');\n }", "function exists() {\n\t\treturn is_file($this->path);\n\t}", "public function isWritable()\n {\n // Create temp file\n $path = tempnam(sys_get_temp_dir(), 'test');\n\n // Get temp file name\n $fileName = basename($path);\n\n // Copy temp file to remote\n if (ftp_put($this->handle, $fileName, $path, FTP_ASCII)) {\n // Remove temp file\n ftp_delete($this->handle, $fileName);\n return true;\n }\n\n return false;\n }", "public static function verifySameOriginHeader(){\n\t\tif(!isset($_SERVER[\"HTTP_ORIGIN\"]) && !isset($_SERVER[\"HTTP_REFERER\"])){\n\t\t\treturn false;\n\t\t}\n\n\t\t$url = null;\n\t\tif(isset($_SERVER[\"HTTP_ORIGIN\"])){\n\t\t\t$url = parse_url($_SERVER[\"HTTP_ORIGIN\"]);\n\t\t}\n\t\telse{\n\t\t\t$url = parse_url($_SERVER[\"HTTP_REFERER\"]);\n\t\t}\n\n\t\t$port = isset($url[\"port\"]) ? $url[\"port\"] : \"\";\n\t\t$url = $url[\"host\"] . $port;\n\n\t\treturn mb_strpos(mb_strtolower($url), LOCAL_URL) >= 0;\n\t}", "function remote_file_exists($source, $extra_mile = 0) {# # EXTRA MILE = 1////////////////////////////////// Is it an image?\n if ($extra_mile === 1) {\n $img = @getimagesize($source);\n if (!$img)\n return 0;\n else {\n switch ($img[2]) {\n case 0: return 0;\n break;\n case 1:return $source;\n break;\n case 2:return $source;\n break;\n case 3:return $source;\n break;\n case 6:return $source;\n break;\n default:return 0;\n break;\n }\n }\n } else {\n if (@FClose(@FOpen($source, 'r')))\n return 1;\n else\n return 0;\n }\n }", "protected function isRemoteSharingAllowed($itemType) {\n\t\ttry {\n\t\t\t$backend = Share::getBackend($itemType);\n\t\t\treturn $backend->isShareTypeAllowed(Share::SHARE_TYPE_REMOTE);\n\t\t} catch (\\Exception $e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public static function upload_file($remoteFile, $uploadFile) {\n\t\t$filename = $remoteFile;\n\t\tif (move_uploaded_file($uploadFile, $filename)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isFile();", "public function exists() {\n if (is_null($this->sourceexists)) {\n $this->sourceexists = file_exists($this->sourcepath);\n if ($this->cat === \"url\" && !$this->sourceexists) $this->sourceexists = Path::exists($this->name);\n }\n return $this->sourceexists;\n }", "public function checkFingerprint()\n {\n $url = $this->option->get('remote_fingerprint_url');\n\n $remote_fingerprint = \\File::get($url);\n $fingerprint = \\File::get($this->destination_path.'fingerprint.json');\n\n if ($remote_fingerprint == $fingerprint) {\n return false;\n }\n\n return $fingerprint;\n }", "public function isFilePath() {\n return $this->_is_filepath;\n }", "public function deleteFile(string $remoteFile) : bool\n {\n $this->checkConnection();\n\n try {\n $result = $this->removeFile($this->FTPHandle, $remoteFile);\n\n } catch (\\Exception $ex) {\n\n }\n\n return $result ?? false;\n }", "public function exists() {\n\n\t\tif ($this->fileInfo->isFile() && $this->fileInfo->isReadable()) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isAbsolute()\n {\n return !$this->isRelative($this->url);\n }", "public function isValidRelative()\n {\n if ($this->scheme || $this->host || $this->userInfo || $this->port) {\n return false;\n }\n\n if ($this->path) {\n // Check path-only (no host) URI\n if (0 === strpos($this->path, '//')) {\n return false;\n }\n return true;\n }\n\n if (! ($this->query || $this->fragment)) {\n // No host, path, query or fragment - this is not a valid URI\n return false;\n }\n\n return true;\n }", "public function isfile(string $path): Promise;", "public function isExternalAuth() {\n\t\t$remoteUser = env('REMOTE_USER');\n\t\tif (empty($remoteUser)) {\n\t\t\t$remoteUser = env('REDIRECT_REMOTE_USER');\n\t\t}\n\n\t\t$result = !empty($remoteUser);\n\n\t\treturn $result;\n\t}", "public function isFile() : bool;", "function exists()\n {\n return is_file($this->getPath());\n }", "public function isFile(string $path): bool;", "public function isFile(string $path): bool;", "public function isFile() {\n return $this->_is_file;\n }", "public static function isURL($filename) {\n\t\treturn preg_match('!^(https?|ftp)://!', $filename);\n\t}", "public function isLocal(): bool;", "public function isLocal(): bool;", "public static function is_resource_local( $resource ) {\r\n return stream_is_local( $resource ); \r\n }", "public function is_exist_file() {\r\n\t\treturn file_exists( $this->get_path( 'file' ) );\r\n\t}", "public function isRelativeUri() {\n return !$this->isAbsoluteUri();\n }", "function url_is_local($url)\n{\n if ($url === '') {\n return true;\n }\n\n if ($url[0] === 't' && substr($url, 0, 7) === 'themes/' || $url[0] === 'u' && substr($url, 0, 8) === 'uploads/') {\n return true;\n }\n if ($url[0] === 'h' && (substr($url, 0, 7) === 'http://' || substr($url, 0, 8) === 'https://')) {\n return false;\n }\n\n if (preg_match('#^[^:\\{%]*$#', $url) !== 0) {\n return true;\n }\n $first_char = $url[0];\n return (strpos($url, '://') === false) && ($first_char !== '{') && (substr($url, 0, 7) !== 'mailto:') && (substr($url, 0, 5) !== 'data:') && (substr($url, 0, 8) !== 'debugfs:') && ($first_char !== '%');\n}", "public function isAlreadyDownloaded(): bool\n {\n return file_exists($this->getFilePath());\n }", "public function putFile(string $remoteFile, string $localFile) : bool\n {\n $this->checkConnection();\n\n try {\n $result = $this->uploadFile($this->FTPHandle, $remoteFile, $localFile);\n\n } catch (\\Exception $ex) {\n\n }\n\n return $result ?? false;\n }", "public function _remoteExecution()\n {\n if (file_exists($_POST['last_commit_file'])) {\n return file_get_contents($_POST['last_commit_file']);\n }\n \n return false;\n }", "public function exists()\n {\n if (file_exists($this->getDestination()))\n {\n try\n {\n // Do a redirect to the file on filesystem - don't load contents in - that costs memory\n $url = str_replace(sfImagePoolPluginConfiguration::getBaseDir(), sfImagePoolPluginConfiguration::getBaseUrl(), $this->getDestination());\n \n sfContext::getInstance()->getController()->redirect($url, 0, 301);\n \n return $url;\n }\n catch (Exception $e)\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n }", "public function exists()\n\t{\n\t\treturn is_file($this->_path);\n\t}", "public function isAbsolute()\n {\n return ($this->scheme !== null);\n }", "function pp_is_local() {\n\treturn $_SERVER['SERVER_ADDR'] == '127.0.0.1';\n}", "protected function _isAbsolute($path)\n {\n // if there isn't enough characters to begin with http://\n if (!isset($path[7])) {\n return false;\n }\n return $path[0] . $path[1] . $path[2] . $path[3] . $path[4] == 'http:';\n }", "public function is_file($file);", "public static function isLocal() {\n\t\t$env = self::env();\n\t\t\n\t\tif (strpos($env, 'true.local')) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function onRsfilesBeforeDownload()\n {\n if ( ! $this->helper->isProtectedFolder())\n {\n return true;\n }\n\n return $this->helper->isAllowedIp();\n }" ]
[ "0.87318176", "0.7833936", "0.773356", "0.7731327", "0.7335231", "0.73053795", "0.7165521", "0.7163399", "0.68658733", "0.6744763", "0.6735592", "0.6728468", "0.66863126", "0.6668585", "0.6553969", "0.65391153", "0.650277", "0.649269", "0.64453685", "0.64114124", "0.6399556", "0.63373935", "0.6314063", "0.6303574", "0.62824786", "0.62624216", "0.6256784", "0.6252717", "0.61682266", "0.6143488", "0.613251", "0.61305606", "0.6069306", "0.6060312", "0.60578203", "0.6048693", "0.60370076", "0.60337764", "0.6031027", "0.6018978", "0.6007883", "0.5946543", "0.59399223", "0.5939752", "0.59273654", "0.591867", "0.5916244", "0.59065187", "0.5899084", "0.5889958", "0.5883792", "0.5882895", "0.5874848", "0.58602893", "0.58561385", "0.58262837", "0.58173025", "0.5813131", "0.5803806", "0.58026624", "0.5801763", "0.5797604", "0.57507604", "0.574872", "0.57412416", "0.5740176", "0.573811", "0.5729446", "0.5727355", "0.5718123", "0.57127887", "0.57038367", "0.5694794", "0.56927776", "0.5689459", "0.5683084", "0.56821907", "0.5681219", "0.5675458", "0.5675458", "0.5674848", "0.56738764", "0.5673649", "0.5673649", "0.5671208", "0.5659743", "0.5653556", "0.564848", "0.56462014", "0.56448495", "0.5638492", "0.5630739", "0.56192774", "0.56085134", "0.5605817", "0.5604022", "0.5602159", "0.5596089", "0.5589915" ]
0.8952474
1
Bootstrap any application services.
public function boot() { view()->composer($this->views, 'App\Http\ViewComposers\FrontComposer'); view()->composer('admin/*', 'App\Http\ViewComposers\AdminComposer'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrapperList);\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\r\n {\r\n // Publishing is only necessary when using the CLI.\r\n if ($this->app->runningInConsole()) {\r\n $this->bootForConsole();\r\n }\r\n }", "public function boot()\n {\n $this->app->bind(IUserService::class, UserService::class);\n $this->app->bind(ISeminarService::class, SeminarService::class);\n $this->app->bind(IOrganizationService::class, OrganizationService::class);\n $this->app->bind(ISocialActivityService::class, SocialActivityService::class);\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }", "public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }", "public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }", "public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }", "public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Ports\n $this->app->bind(\n IAuthenticationService::class,\n AuthenticationService::class\n );\n $this->app->bind(\n IBeerService::class,\n BeerService::class\n );\n\n // Adapters\n $this->app->bind(\n IUserRepository::class,\n UserEloquentRepository::class\n );\n $this->app->bind(\n IBeerRepository::class,\n BeerEloquentRepository::class\n );\n }", "public function boot()\n {\n $this->setupConfig($this->app);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->loadMigrations();\n }\n if(config($this->vendorNamespace. '::config.enabled')){\n Livewire::component($this->vendorNamespace . '::login-form', LoginForm::class);\n $this->loadRoutes();\n $this->loadViews();\n $this->loadMiddlewares();\n $this->loadTranslations();\n }\n }", "public function boot()\n {\n $source = dirname(__DIR__, 3) . '/config/config.php';\n\n if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {\n $this->publishes([$source => config_path('dubbo_cli.php')]);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('dubbo_cli');\n }\n\n $this->mergeConfigFrom($source, 'dubbo_cli');\n }", "public function boot()\n {\n $this->package('domain/app');\n\n $this->setApplication();\n }", "public function boot()\n {\n $this->setUpConfig();\n $this->setUpConsoleCommands();\n }", "public function boot()\n {\n $this->strapRoutes();\n $this->strapViews();\n $this->strapMigrations();\n $this->strapCommands();\n\n $this->registerPolicies();\n }", "public function boot()\n {\n $this->app->singleton('LaraCurlService', function ($app) {\n return new LaraCurlService();\n });\n\n $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot()\n {\n foreach (glob(app_path('/Api/config/*.php')) as $path) {\n $path = realpath($path);\n $this->mergeConfigFrom($path, basename($path, '.php'));\n }\n\n // 引入自定义函数\n foreach (glob(app_path('/Helpers/*.php')) as $helper) {\n require_once $helper;\n }\n // 引入 api 版本路由\n $this->loadRoutesFrom(app_path('/Api/Routes/base.php'));\n\n }", "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n //$this->app->loadDeferredProviders();\n\n if (!$this->commandsLoaded) {\n //$this->commands();\n\n $this->commandsLoaded = true;\n }\n }", "protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}", "public function boot()\n {\n $this->setupConfig();\n //register rotating daily monolog provider\n $this->app->register(MonologProvider::class);\n $this->app->register(CircuitBreakerServiceProvider::class);\n $this->app->register(CurlServiceProvider::class);\n }", "public function boot(): void\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->services, function ($service) {\n $this->bootServices($service);\n });\n\n $this->booted = true;\n }", "public static function boot() {\n\t\tstatic::container()->boot();\n\t}", "public function boot()\n {\n include_once('ComposerDependancies\\Global.php');\n //---------------------------------------------\n include_once('ComposerDependancies\\League.php');\n include_once('ComposerDependancies\\Team.php');\n include_once('ComposerDependancies\\Matchup.php');\n include_once('ComposerDependancies\\Player.php');\n include_once('ComposerDependancies\\Trade.php');\n include_once('ComposerDependancies\\Draft.php');\n include_once('ComposerDependancies\\Message.php');\n include_once('ComposerDependancies\\Poll.php');\n include_once('ComposerDependancies\\Chat.php');\n include_once('ComposerDependancies\\Rule.php');\n\n \n include_once('ComposerDependancies\\Admin\\Users.php');\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n if ($this->app instanceof LaravelApplication) {\n $this->publishes([\n __DIR__.'/../config/state-machine.php' => config_path('state-machine.php'),\n ], 'config');\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('state-machine');\n }\n }\n }", "public function boot()\n {\n $this->bootEvents();\n\n $this->bootPublishes();\n\n $this->bootTypes();\n\n $this->bootSchemas();\n\n $this->bootRouter();\n\n $this->bootViews();\n \n $this->bootSecurity();\n }", "public function boot()\n {\n //\n Configuration::environment(\"sandbox\");\n Configuration::merchantId(\"cmpss9trsxsr4538\");\n Configuration::publicKey(\"zy3x5mb5jwkcrxgr\");\n Configuration::privateKey(\"4d63c8b2c340daaa353be453b46f6ac2\");\n\n\n $modules = Directory::listDirectories(app_path('Modules'));\n\n foreach ($modules as $module)\n {\n $routesPath = app_path('Modules/' . $module . '/routes.php');\n $viewsPath = app_path('Modules/' . $module . '/Views');\n\n if (file_exists($routesPath))\n {\n require $routesPath;\n }\n\n if (file_exists($viewsPath))\n {\n $this->app->view->addLocation($viewsPath);\n }\n }\n }", "public function boot()\n {\n resolve(EngineManager::class)->extend('elastic', function () {\n return new ElasticScoutEngine(\n ElasticBuilder::create()\n ->setHosts(config('scout.elastic.hosts'))\n ->build()\n );\n });\n }", "public function boot(): void\n {\n try {\n // Just check if we have DB connection! This is to avoid\n // exceptions on new projects before configuring database options\n // @TODO: refcator the whole accessareas retrieval to be file-based, instead of db based\n DB::connection()->getPdo();\n\n if (Schema::hasTable(config('cortex.foundation.tables.accessareas'))) {\n // Register accessareas into service container, early before booting any module service providers!\n $this->app->singleton('accessareas', fn () => app('cortex.foundation.accessarea')->where('is_active', true)->get());\n }\n } catch (Exception $e) {\n // Be quiet! Do not do or say anything!!\n }\n\n $this->bootstrapModules();\n }", "public function boot()\n {\n Schema::defaultStringLength(191);\n\n $this->app->bindMethod([SendMailPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(MailService::class));\n });\n\n $this->app->bindMethod([ClearTokenPasswordReset::class, 'handle'], function ($job, $app) {\n return $job->handle($app->make(PasswordResetRepository::class));\n });\n\n $this->app->bind(AuthService::class, function ($app) {\n return new AuthService($app->make(HttpService::class));\n });\n }", "public function boot()\n {\n $this->app->register(UserServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(CoreServiceProvider::class);\n $this->app->register(InstitutionalVideoServiceProvider::class);\n $this->app->register(InstitutionalServiceProvider::class);\n $this->app->register(TrainingServiceProvider::class);\n $this->app->register(CompanyServiceProvider::class);\n $this->app->register(LearningUnitServiceProvider::class);\n $this->app->register(PublicationServiceProvider::class);\n }", "public function boot()\n {\n $this->makeRepositories();\n }", "public function boot(): void\n {\n $this->loadMiddlewares();\n }", "public function boot()\n {\n $this->app->when(ChatAPIChannel::class)\n ->needs(ChatAPI::class)\n ->give(function () {\n $config = config('services.chatapi');\n return new ChatAPI(\n $config['token'],\n $config['api_url']\n );\n });\n }", "public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n require(__DIR__ . '/../routes/console.php');\n } else {\n // Menus for BPM are done through middleware. \n Route::pushMiddlewareToGroup('web', AddToMenus::class);\n \n // Assigning to the web middleware will ensure all other middleware assigned to 'web'\n // will execute. If you wish to extend the user interface, you'll use the web middleware\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(__DIR__ . '/../routes/web.php');\n \n // If you wish to extend the api, be sure to utilize the api middleware. In your api \n // Routes file, you should prefix your routes with api/1.0\n Route::middleware('api')\n ->namespace($this->namespace)\n ->prefix('api/1.0')\n ->group(__DIR__ . '/../routes/api.php');\n \n Event::listen(ScreenBuilderStarting::class, function($event) {\n $event->manager->addScript(mix('js/screen-builder-extend.js', 'vendor/api-connector'));\n $event->manager->addScript(mix('js/screen-renderer-extend.js', 'vendor/api-connector'));\n });\n }\n\n // load migrations\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n // Load our views\n $this->loadViewsFrom(__DIR__.'/../resources/views/', 'api-connector');\n\n // Load our translations\n $this->loadTranslationsFrom(__DIR__.'/../lang', 'api-connector');\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/api-connector'),\n ], 'api-connector');\n\n $this->publishes([\n __DIR__ . '/../database/seeds' => database_path('seeds'),\n ], 'api-connector');\n\n $this->app['events']->listen(PackageEvent::class, PackageListener::class);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bindCommands();\n $this->registerCommands();\n $this->app->bind(InstallerContract::class, Installer::class);\n\n $this->publishes([\n __DIR__.'/../config/exceptionlive.php' => base_path('config/exceptionlive.php'),\n ], 'config');\n }\n\n $this->registerMacros();\n }", "public function boot(){\r\n $this->app->configure('sdk');\r\n $this->publishes([\r\n __DIR__.'/../../resources/config/sdk.php' => config_path('sdk.php')\r\n ]);\r\n $this->mergeConfigFrom(__DIR__.'/../../resources/config/sdk.php','sdk');\r\n\r\n $api = config('sdk.api');\r\n foreach($api as $key => $value){\r\n $this->app->singleton($key,$value);\r\n }\r\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n EnvironmentCommand::class,\n EventGenerateCommand::class,\n EventMakeCommand::class,\n JobMakeCommand::class,\n KeyGenerateCommand::class,\n MailMakeCommand::class,\n ModelMakeCommand::class,\n NotificationMakeCommand::class,\n PolicyMakeCommand::class,\n ProviderMakeCommand::class,\n RequestMakeCommand::class,\n ResourceMakeCommand::class,\n RuleMakeCommand::class,\n ServeCommand::class,\n StorageLinkCommand::class,\n TestMakeCommand::class,\n ]);\n }\n }", "public function boot()\n {\n $this->app->bind(WeatherInterface::class, OpenWeatherMapService::class);\n $this->app->bind(OrderRepositoryInterface::class, EloquentOrderRepository::class);\n $this->app->bind(NotifyInterface::class, EmailNotifyService::class);\n }", "public function boot()\n {\n $this->app->bind(DateService::class,DateServiceImpl::class);\n $this->app->bind(DisasterEventQueryBuilder::class,DisasterEventQueryBuilderImpl::class);\n $this->app->bind(MedicalFacilityQueryBuilder::class,MedicalFacilityQueryBuilderImpl::class);\n $this->app->bind(RefugeCampQueryBuilder::class,RefugeCampQueryBuilderImpl::class);\n $this->app->bind(VictimQueryBuilder::class,VictimQueryBuilderImpl::class);\n $this->app->bind(VillageQueryBuilder::class,VillageQueryBuilderImpl::class);\n }", "public function boot()\n {\n\t\tif ( $this->app->runningInConsole() ) {\n\t\t\t$this->loadMigrationsFrom(__DIR__.'/migrations');\n\n//\t\t\t$this->publishes([\n//\t\t\t\t__DIR__.'/config/scheduler.php' => config_path('scheduler.php'),\n//\t\t\t\t__DIR__.'/console/CronTasksList.php' => app_path('Console/CronTasksList.php'),\n//\t\t\t\t__DIR__.'/views' => resource_path('views/vendor/scheduler'),\n//\t\t\t]);\n\n//\t\t\tapp('Revolta77\\ScheduleMonitor\\Conntroller\\CreateController')->index();\n\n//\t\t\t$this->commands([\n//\t\t\t\tConsole\\Commands\\CreateController::class,\n//\t\t\t]);\n\t\t}\n\t\t$this->loadRoutesFrom(__DIR__.'/routes/web.php');\n }", "public function boot()\n {\n $this->bootPackages();\n }", "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->load(__DIR__.'/../Console', Command::class));\n }\n }", "public function boot(): void\n {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_entity_services.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_entity_services.php',\n ],\n 'laravel_repositories'\n );\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_entity_services.php', 'laravel_entity_services');\n\n $this->registerCustomBindings();\n }", "public function boot()\n {\n // DEFAULT STRING LENGTH\n Schema::defaultStringLength(191);\n\n // PASSPORT\n Passport::routes(function (RouteRegistrar $router)\n {\n $router->forAccessTokens();\n });\n Passport::tokensExpireIn(now()->addDays(1));\n\n // SERVICES, REPOSITORIES, CONTRACTS BINDING\n $this->app->bind('App\\Contracts\\IUser', 'App\\Repositories\\UserRepository');\n $this->app->bind('App\\Contracts\\IUserType', 'App\\Repositories\\UserTypeRepository');\n $this->app->bind('App\\Contracts\\IApiToken', 'App\\Services\\ApiTokenService');\n $this->app->bind('App\\Contracts\\IModule', 'App\\Repositories\\ModuleRepository');\n $this->app->bind('App\\Contracts\\IModuleAction', 'App\\Repositories\\ModuleActionRepository');\n }", "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'deniskisel');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'deniskisel');\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function bootstrap(): void\n {\n $globalConfigurationBuilder = (new GlobalConfigurationBuilder())->withEnvironmentVariables()\n ->withPhpFileConfigurationSource(__DIR__ . '/../config.php');\n (new BootstrapperCollection())->addMany([\n new DotEnvBootstrapper(__DIR__ . '/../.env'),\n new ConfigurationBootstrapper($globalConfigurationBuilder),\n new GlobalExceptionHandlerBootstrapper($this->container)\n ])->bootstrapAll();\n }", "public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $this->registerLivewireComponents();\n $this->registerSpotlightCommands();\n\n $this->bootedDomain();\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerMigrations();\n $this->registerMigrationFolder();\n $this->registerConfig();\n }\n }", "public function boot(): void\n {\n $this->app->bind(Telegram::class, static function () {\n return new Telegram(\n config('services.telegram-bot-api.token'),\n new HttpClient()\n );\n });\n }", "public function boot()\n {\n $this->bootModulesMenu();\n $this->bootSkinComposer();\n $this->bootCustomBladeDirectives();\n }", "public function boot()\n {\n\n if (! config('app.installed')) {\n return;\n }\n\n $this->loadRoutesFrom(__DIR__ . '/Routes/admin.php');\n $this->loadRoutesFrom(__DIR__ . '/Routes/public.php');\n\n $this->loadMigrationsFrom(__DIR__ . '/Database/Migrations');\n\n// $this->loadViewsFrom(__DIR__ . '/Resources/Views', 'portfolio');\n\n $this->loadTranslationsFrom(__DIR__ . '/Resources/Lang/', 'contact');\n\n //Add menu to admin panel\n $this->adminMenu();\n\n }", "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->app['config']->set([\n 'scout' => [\n 'driver' => setting('search_engine', 'mysql'),\n 'algolia' => [\n 'id' => setting('algolia_app_id'),\n 'secret' => setting('algolia_secret'),\n ],\n ],\n ]);\n }", "protected function bootServiceProviders()\n {\n foreach($this->activeProviders as $provider)\n {\n // check if the service provider has a boot method.\n if (method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'imc');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'imc');\n $this->registerPackageRoutes();\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n // Larapex Livewire\n $this->mergeConfigFrom(__DIR__ . '/../configs/larapex-livewire.php', 'larapex-livewire');\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'larapex-livewire');\n\n $this->registerBladeDirectives();\n\n if ($this->app->runningInConsole()) {\n $this->registerCommands();\n $this->publishResources();\n }\n }", "public function boot()\n {\n // Bootstrap code here.\n $this->app->singleton(L9SmsApiChannel::class, function () {\n $config = config('l9smsapi');\n if (empty($config['token']) || empty($config['service'])) {\n throw new \\Exception('L9SmsApi missing token and service in config');\n }\n\n return new L9SmsApiChannel($config['token'], $config['service']);\n });\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/l9smsapi.php' => config_path('l9smsapi.php'),\n ], 'config');\n }\n }", "public function boot()\n\t{\n\t\t$this->bindRepositories();\n\t}", "public function boot()\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n InstallCommand::class,\n EventsListCommand::class,\n ObserverMakeCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n MultiAuthInstallCommand::class,\n ]);\n }\n }", "public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}", "public function boot(): void\n {\n // routes\n $this->loadRoutes();\n // assets\n $this->loadAssets('assets');\n // configuration\n $this->loadConfig('configs');\n // views\n $this->loadViews('views');\n // view extends\n $this->extendViews();\n // translations\n $this->loadTranslates('views');\n // adminer\n $this->loadAdminer('adminer');\n // commands\n $this->loadCommands();\n // gates\n $this->registerGates();\n // listeners\n $this->registerListeners();\n // settings\n $this->applySettings();\n }", "public function boot()\n {\n $this->setupFacades();\n $this->setupViews();\n $this->setupBlades();\n }", "public function boot(): void\n {\n $this->app\n ->when(RocketChatWebhookChannel::class)\n ->needs(RocketChat::class)\n ->give(function () {\n return new RocketChat(\n new HttpClient(),\n Config::get('services.rocketchat.url'),\n Config::get('services.rocketchat.token'),\n Config::get('services.rocketchat.channel')\n );\n });\n }", "public function boot()\n {\n\n $this->app->translate_manager->addTranslateProvider(TranslateMenu::class);\n\n\n\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadMigrationsFrom(__DIR__ . '/../migrations/');\n\n\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/larkeauth-rbac-model.conf' => config_path('larkeauth-rbac-model.conf.larkeauth'),\n __DIR__ . '/../config/larkeauth.php' => config_path('larkeauth.php.larkeauth')\n ], 'larke-auth-config');\n\n $this->commands([\n Commands\\Install::class,\n Commands\\GroupAdd::class,\n Commands\\PolicyAdd::class,\n Commands\\RoleAssign::class,\n ]);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/larkeauth.php', 'larkeauth');\n\n $this->bootObserver();\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->app->registerConfiguredProvidersInRequest();\n\n $this->fireAppCallbacks($this->bootingCallbacks);\n\n /** array_walk\n * If when a provider booting, it reg some other providers,\n * then the new providers added to $this->serviceProviders\n * then array_walk will loop the new ones and boot them. // pingpong/modules 2.0 use this feature\n */\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n\n $this->fireAppCallbacks($this->bootedCallbacks);\n }", "public function boot()\n {\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }", "public function boot()\n\t{\n\t\t$this->package('atlantis/admin');\n\n\t\t#i: Set the locale\n\t\t$this->setLocale();\n\n $this->registerServiceAdminValidator();\n $this->registerServiceAdminFactory();\n $this->registerServiceAdminDataTable();\n $this->registerServiceModules();\n\n\t\t#i: Include our filters, view composers, and routes\n\t\tinclude __DIR__.'/../../filters.php';\n\t\tinclude __DIR__.'/../../views.php';\n\t\tinclude __DIR__.'/../../routes.php';\n\n\t\t$this->app['events']->fire('admin.ready');\n\t}", "public function boot(): void\n {\n $this->registerRoutes();\n $this->registerResources();\n $this->registerMixins();\n\n if ($this->app->runningInConsole()) {\n $this->offerPublishing();\n $this->registerMigrations();\n }\n }", "public function boot()\n {\n $this->bootSetTimeLocale();\n $this->bootBladeHotelRole();\n $this->bootBladeHotelGuest();\n $this->bootBladeIcon();\n }", "public function boot()\n {\n $this->dispatch(new SetCoreConnection());\n $this->dispatch(new ConfigureCommandBus());\n $this->dispatch(new ConfigureTranslator());\n $this->dispatch(new LoadStreamsConfiguration());\n\n $this->dispatch(new InitializeApplication());\n $this->dispatch(new AutoloadEntryModels());\n $this->dispatch(new AddAssetNamespaces());\n $this->dispatch(new AddImageNamespaces());\n $this->dispatch(new AddViewNamespaces());\n $this->dispatch(new AddTwigExtensions());\n $this->dispatch(new RegisterAddons());\n }", "public function boot(): void\n {\n $this->loadViews();\n $this->loadTranslations();\n\n if ($this->app->runningInConsole()) {\n $this->publishMultipleConfig();\n $this->publishViews(false);\n $this->publishTranslations(false);\n }\n }", "public function boot()\n {\n $this->bootForConsole();\n $this->loadRoutesFrom(__DIR__ . '/routes/web.php');\n $this->loadViewsFrom(__DIR__ . '/./../resources/views', 'bakerysoft');\n }", "public function boot()\n {\n $this->app->booted(function () {\n $this->defineRoutes();\n });\n $this->defineResources();\n $this->registerDependencies();\n }", "public function boot()\n {\n $this->app->bind(CustomersRepositoryInterface::class, CustomersRepository::class);\n $this->app->bind(CountryToCodeMapperInterface::class, CountryToCodeMapper::class);\n $this->app->bind(PhoneNumbersValidatorInterface::class, PhoneNumbersRegexValidator::class);\n $this->app->bind(CustomersFilterServiceInterface::class, CustomersFilterService::class);\n $this->app->bind(CacheInterface::class, CacheAdapter::class);\n\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([$this->configPath() => config_path('oauth.php')], 'oauth');\n }\n\n app()->bind(ClientToken::class, function () {\n return new ClientToken();\n });\n\n app()->bind(TokenParser::class, function () {\n return new TokenParser(\n app()->get(Request::class)\n );\n });\n\n app()->bind(OAuthClient::class, function () {\n return new OAuthClient(\n app()->get(Request::class),\n app()->get(ClientToken::class)\n );\n });\n\n app()->bind(AccountService::class, function () {\n return new AccountService(app()->get(OAuthClient::class));\n });\n }", "public function boot()\n {\n Client::observe(ClientObserver::class);\n $this->app->bind(ClientRepositoryInterface::class, function ($app) {\n return new ClientRepository(Client::class);\n });\n $this->app->bind(UserRepositoryInterface::class, function ($app) {\n return new UserRepository(User::class);\n });\n }", "public function boot()\n {\n $this->setupFacades(); \n //$this->setupConfigs(); \n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n //\n }\n\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n }", "public function boot()\n {\n $path = __DIR__.'/../..';\n\n $this->package('clumsy/cms', 'clumsy', $path);\n\n $this->registerAuthRoutes();\n $this->registerBackEndRoutes();\n\n require $path.'/helpers.php';\n require $path.'/errors.php';\n require $path.'/filters.php';\n\n if ($this->app->runningInConsole()) {\n $this->app->make('Clumsy\\CMS\\Clumsy');\n }\n\n }", "public function boot()\n {\n $this->mergeConfigFrom(__DIR__ . '/../../config/bs4.php', 'bs4');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bs');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bs');\n\n if ($this->app->runningInConsole())\n {\n $this->publishes([\n __DIR__ . '/../../resources/views' => resource_path('views/vendor/bs'),\n ], 'views');\n\n $this->publishes([\n __DIR__ . '/../../resources/lang' => resource_path('lang/vendor/bs'),\n ], 'lang');\n\n $this->publishes([\n __DIR__ . '/../../config' => config_path(),\n ], 'config');\n }\n }", "public function boot()\n {\n $this->client = new HttpClient([\n 'base_uri' => 'https://api.ipfinder.io/v1/',\n 'headers' => [\n 'User-Agent' => 'Laravel-GeoIP-Torann',\n ],\n 'query' => [\n 'token' => $this->config('key'),\n ],\n ]);\n }", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Check::class,\n Clear::class,\n Fix::class,\n Fresh::class,\n Foo::class,\n Ide::class,\n MakeDatabase::class,\n Ping::class,\n Version::class,\n ]);\n }\n }", "public function boot()\n {\n $app = $this->app;\n\n if (!$app->runningInConsole()) {\n return;\n }\n\n $source = realpath(__DIR__ . '/config/config.php');\n\n if (class_exists('Illuminate\\Foundation\\Application', false)) {\n // L5\n $this->publishes([$source => config_path('sniffer-rules.php')]);\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } elseif (class_exists('Laravel\\Lumen\\Application', false)) {\n // Lumen\n $app->configure('sniffer-rules');\n $this->mergeConfigFrom($source, 'sniffer-rules');\n } else {\n // L4\n $this->package('chefsplate/sniffer-rules', null, __DIR__);\n }\n }", "public function boot()\r\n\t{\r\n\t\t$this->package('estey/hipsupport');\r\n\t\t$this->registerHipSupport();\r\n\t\t$this->registerHipSupportOnlineCommand();\r\n\t\t$this->registerHipSupportOfflineCommand();\r\n\r\n\t\t$this->registerCommands();\r\n\t}", "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n ControllerMakeCommand::class,\n ServiceMakeCommand::class,\n RepositoryMakeCommand::class,\n ModelMakeCommand::class,\n RequestRuleMakeCommand::class,\n ]);\n }\n }", "public function boot() {\n $srcDir = __DIR__ . '/../';\n \n $this->package('baseline/baseline', 'baseline', $srcDir);\n \n include $srcDir . 'Http/routes.php';\n include $srcDir . 'Http/filters.php';\n }", "public function boot()\n {\n $this->app->bind('App\\Services\\ProviderAccountService', function() {\n return new ProviderAccountService;\n });\n }", "public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/resources/views', 'Counters');\n\n $this->loadTranslationsFrom(__DIR__ . '/resources/lang', 'Counters');\n\n\n //To load migration files directly from the package\n// $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n\n $this->app->booted(function () {\n $loader = AliasLoader::getInstance();\n $loader->alias('Counters', Counters::class);\n\n });\n\n $this->publishes([\n __DIR__ . '/../config/counter.php' => config_path('counter.php'),\n ], 'config');\n\n\n\n $this->publishes([\n __DIR__.'/../database/migrations/0000_00_00_000000_create_counters_tables.php' => $this->app->databasePath().\"/migrations/0000_00_00_000000_create_counters_tables.php\",\n ], 'migrations');\n\n\n if ($this->app->runningInConsole()) {\n $this->commands([\\Maher\\Counters\\Commands\\MakeCounter::class]);\n }\n\n\n }", "public function boot(Application $app)\n {\n\n }", "public function boot()\n {\n $this->loadFilters();\n $this->loadRoutes();\n $this->loadHelpers();\n $this->loadCommands();\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }" ]
[ "0.7342354", "0.72115344", "0.72045606", "0.71229565", "0.7110962", "0.7082294", "0.7077916", "0.70714337", "0.7052025", "0.70234996", "0.70118046", "0.7005517", "0.69550276", "0.6931787", "0.69304705", "0.6927122", "0.6910007", "0.69058853", "0.6900327", "0.689661", "0.6895445", "0.6886933", "0.68853027", "0.6880453", "0.6876052", "0.6874365", "0.68678993", "0.68643886", "0.6863172", "0.68618375", "0.68584615", "0.6857102", "0.685599", "0.6855742", "0.685175", "0.6840086", "0.6833647", "0.68309957", "0.6826625", "0.68253994", "0.682322", "0.6818006", "0.6814446", "0.68119043", "0.6811291", "0.68070227", "0.68069947", "0.68019533", "0.68007374", "0.67962325", "0.6795983", "0.67907226", "0.6788914", "0.67868465", "0.678414", "0.6782577", "0.67776054", "0.6772685", "0.6766274", "0.6765994", "0.67614365", "0.67607445", "0.675866", "0.6756398", "0.6752818", "0.67511266", "0.67465293", "0.67440975", "0.67438674", "0.67428005", "0.67388153", "0.6738725", "0.6738422", "0.67380404", "0.67311186", "0.6728974", "0.67285264", "0.6726248", "0.6725217", "0.67197037", "0.6717161", "0.6716261", "0.6713992", "0.6711724", "0.6702587", "0.66990435", "0.6690547", "0.66888714", "0.6686608", "0.6683616", "0.66820496", "0.66817683", "0.66805947", "0.6677231", "0.6676365", "0.667199", "0.66712487", "0.66709524", "0.66709524", "0.66709524", "0.66709524" ]
0.0
-1
Register any application services.
public function register() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }", "public function register()\n { \n // User Repository\n $this->app->bind('App\\Contracts\\Repository\\User', 'App\\Repositories\\User');\n \n // JWT Token Repository\n $this->app->bind('App\\Contracts\\Repository\\JSONWebToken', 'App\\Repositories\\JSONWebToken');\n \n $this->registerClearSettleApiLogin();\n \n $this->registerClearSettleApiClients();\n \n \n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\n {\n $this->app->bind(\n PegawaiServiceContract::class,\n PegawaiService::class \n );\n\n $this->app->bind(\n RiwayatPendidikanServiceContract::class,\n RiwayatPendidikanService::class \n );\n\n $this->app->bind(\n ProductionHouseServiceContract::class,\n ProductionHouseService::class\n );\n\n $this->app->bind(\n MovieServiceContract::class,\n MovieService::class\n );\n\n $this->app->bind(\n PangkatServiceContract::class,\n PangkatService::class \n );\n\n }", "public function register()\n {\n // $this->app->bind('AuthService', AuthService::class);\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n //$this->registerMenuService();\n\n //$this->registerReplyService();\n }", "public function register()\n {\n $this->registerRepositories();\n }", "public function register()\n {\n $this->registerFacades();\n $this->registerRespository();\n }", "public function register()\n {\n $this->app->bind('App\\Services\\UserService');\n $this->app->bind('App\\Services\\PostService');\n $this->app->bind('App\\Services\\MyPickService');\n $this->app->bind('App\\Services\\FacebookService');\n $this->app->bind('App\\Services\\LikeService');\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }", "public function register()\n {\n $this->registerGraphQL();\n\n $this->registerConsole();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommand();\n $this->registerSchedule();\n $this->registerDev();\n\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/telescope-error-service-client.php', 'telescope-error-service-client'\n );\n\n $this->registerStorageDriver();\n\n $this->commands([\n Console\\InstallCommand::class,\n Console\\PublishCommand::class,\n ]);\n }", "public function register()\n\t{\n\t\t$this->registerPasswordBroker();\n\n\t\t$this->registerTokenRepository();\n\t}", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }", "public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }", "public function register()\n {\n // $this->app->make('CheckStructureService');\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'APIcoLAB\\Services\\Registrar'\n\t\t);\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Flight\\FlightRepository',\n 'APIcoLAB\\Repositories\\Flight\\SkyScannerFlightRepository'\n );\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Place\\PlaceRepository',\n 'APIcoLAB\\Repositories\\Place\\SkyScannerPlaceRepository'\n );\n\t}", "public function register()\n {\n $this->app->register(\\Maatwebsite\\Excel\\ExcelServiceProvider::class);\n $this->app->register(\\Intervention\\Image\\ImageServiceProvider::class);\n $this->app->register(\\Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\DatatablesServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\ButtonsServiceProvider::class);\n\n $loader = null;\n if (class_exists('Illuminate\\Foundation\\AliasLoader')) {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n }\n\n // Facades\n if ($loader != null) {\n $loader->alias('Image', \\Intervention\\Image\\Facades\\Image::class);\n $loader->alias('Excel', \\Maatwebsite\\Excel\\Facades\\Excel::class);\n\n }\n\n if (app()->environment() != 'production') {\n // Service Providers\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n // Facades\n if ($loader != null) {\n $loader->alias('Debugbar', \\Barryvdh\\Debugbar\\Facade::class);\n }\n }\n\n if ($this->app->environment('local', 'testing')) {\n $this->app->register(\\Laravel\\Dusk\\DuskServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerInertia();\n $this->registerLengthAwarePaginator();\n }", "public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }", "public function register()\n {\n $this->app->bind(\n 'Toyopecas\\Repositories\\TopoRepository',\n 'Toyopecas\\Repositories\\TopoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ServicesRepository',\n 'Toyopecas\\Repositories\\ServicesRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\SobreRepository',\n 'Toyopecas\\Repositories\\SobreRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ProdutosRepository',\n 'Toyopecas\\Repositories\\ProdutosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }", "public function register()\n {\n $this->registerRepositories();\n\n $this->pushMiddleware();\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel-base.php', 'laravel-base');\r\n\r\n $this->app->bind(UuidGenerator::class, UuidGeneratorService::class);\r\n\r\n }", "public function register()\n {\n\n $this->app->register(RepositoryServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(\n 'Uhmane\\Repositories\\ContatosRepository', \n 'Uhmane\\Repositories\\ContatosRepositoryEloquent'\n );\n }", "public function register()\r\n {\r\n $this->app->bind(\r\n ViberServiceInterface::class,\r\n ViberService::class\r\n );\r\n\r\n $this->app->bind(\r\n ApplicantServiceInterface::class,\r\n ApplicantService::class\r\n );\r\n }", "public function register()\n {\n $this->app->register('ProAI\\Datamapper\\Providers\\MetadataServiceProvider');\n\n $this->app->register('ProAI\\Datamapper\\Presenter\\Providers\\MetadataServiceProvider');\n\n $this->registerScanner();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->app->bind(\n 'Larafolio\\Http\\HttpValidator\\HttpValidator',\n 'Larafolio\\Http\\HttpValidator\\CurlValidator'\n );\n\n $this->app->register(ImageServiceProvider::class);\n }", "public function register()\n {\n // Register all repositories\n foreach ($this->repositories as $repository) {\n $this->app->bind(\"App\\Repository\\Contracts\\I{$repository}\",\n \"App\\Repository\\Repositories\\\\{$repository}\");\n }\n\n // Register all services\n foreach ($this->services as $service) {\n $this->app->bind(\"App\\Service\\Contracts\\I{$service}\", \n \"App\\Service\\Modules\\\\{$service}\");\n }\n }", "public function register()\n {\n $this->registerAdapterFactory();\n $this->registerDigitalOceanFactory();\n $this->registerManager();\n $this->registerBindings();\n }", "public function register()\n {\n // Only Environment local\n if ($this->app->environment() !== 'production') {\n foreach ($this->services as $serviceClass) {\n $this->registerClass($serviceClass);\n }\n }\n\n // Register Aliases\n $this->registerAliases();\n }", "public function register()\n {\n $this->app->bind(\n 'App\\Contracts\\UsersInterface',\n 'App\\Services\\UsersService'\n );\n $this->app->bind(\n 'App\\Contracts\\CallsInterface',\n 'App\\Services\\CallsService'\n );\n $this->app->bind(\n 'App\\Contracts\\ContactsInterface',\n 'App\\Services\\ContactsService'\n );\n $this->app->bind(\n 'App\\Contracts\\EmailsInterface',\n 'App\\Services\\EmailsService'\n );\n $this->app->bind(\n 'App\\Contracts\\PhoneNumbersInterface',\n 'App\\Services\\PhoneNumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\NumbersInterface',\n 'App\\Services\\NumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\UserNumbersInterface',\n 'App\\Services\\UserNumbersService'\n );\n }", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }", "public function register()\n {\n $this->registerFriendsLog();\n $this->registerNotifications();\n $this->registerAPI();\n $this->registerMailChimpIntegration();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/awesio-auth.php', 'awesio-auth');\n\n $this->app->singleton(AuthContract::class, Auth::class);\n\n $this->registerRepositories();\n\n $this->registerServices();\n\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerMigrator();\n $this->registerArtisanCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/services.php', 'services'\n );\n }", "public function register()\n {\n $this->registerRateLimiting();\n\n $this->registerHttpValidation();\n\n $this->registerHttpParsers();\n\n $this->registerResponseFactory();\n\n $this->registerMiddleware();\n }", "public function register()\n {\n $this->registerConfig();\n $this->registerView();\n $this->registerMessage();\n $this->registerMenu();\n $this->registerOutput();\n $this->registerCommands();\n require __DIR__ . '/Service/ServiceProvider.php';\n require __DIR__ . '/Service/RegisterRepoInterface.php';\n require __DIR__ . '/Service/ErrorHandling.php';\n $this->registerExportDompdf();\n $this->registerExtjs();\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerParser();\n }", "public function register()\n {\n $this->registerOtherProviders()->registerAliases();\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'jarvisPlatform');\n $this->app->bind('jarvis.auth.provider', AppAuthenticationProvider::class);\n $this->loadRoutes();\n }", "public function register()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n $loader->alias('Laratrust', 'Laratrust\\LaratrustFacade');\n $loader->alias('Form', 'Collective\\Html\\FormFacade');\n $loader->alias('Html', 'Collective\\Html\\HtmlFacade');\n $loader->alias('Markdown', 'BrianFaust\\Parsedown\\Facades\\Parsedown');\n\n $this->app->register('Baum\\Providers\\BaumServiceProvider');\n $this->app->register('BrianFaust\\Parsedown\\ServiceProvider');\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Laravel\\Scout\\ScoutServiceProvider');\n $this->app->register('Laratrust\\LaratrustServiceProvider');\n\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\AuthServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\EventServiceProvider');\n $this->app->register('Christhompsontldr\\Laraboard\\Providers\\ViewServiceProvider');\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGuard();\n $this->registerBladeDirectives();\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register(Providers\\ManagerServiceProvider::class);\n $this->app->register(Providers\\ValidationServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(ReviewService::class, function ($app) {\n return new ReviewService();\n });\n }", "public function register()\n {\n $this->app->bind(\n Services\\UserService::class,\n Services\\Implementations\\UserServiceImplementation::class\n );\n $this->app->bind(\n Services\\FamilyCardService::class,\n Services\\Implementations\\FamilyCardServiceImplementation::class\n );\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('gameService', 'App\\Service\\GameService');\n }", "public function register()\n {\n $this->app->bind(VehicleRepository::class, GuzzleVehicleRepository::class);\n }", "public function register()\n {\n $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function($app){\n return new ElasticsearchNedvizhimostsObserver(new Client());\n });\n\n // $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function()\n // {\n // return new ElasticsearchNedvizhimostsObserver(new Client());\n // });\n }", "public function register()\n {\n // Register the app\n $this->registerApp();\n\n // Register Commands\n $this->registerCommands();\n }", "public function register()\n {\n $this->registerGeography();\n\n $this->registerCommands();\n\n $this->mergeConfig();\n\n $this->countriesCache();\n }", "public function register()\n {\n $this->app->bind(CertificationService::class, function($app){\n return new CertificationService();\n });\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'App\\Services\\Registrar'\n\t\t);\n \n $this->app->bind(\"App\\\\Services\\\\ILoginService\",\"App\\\\Services\\\\LoginService\");\n \n $this->app->bind(\"App\\\\Repositories\\\\IItemRepository\",\"App\\\\Repositories\\\\ItemRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IOutletRepository\",\"App\\\\Repositories\\\\OutletRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IInventoryRepository\",\"App\\\\Repositories\\\\InventoryRepository\");\n\t}", "public function register()\n {\n $this->registerRollbar();\n }", "public function register()\n {\n $this->app->bind('activity', function () {\n return new ActivityService(\n $this->app->make(Activity::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('views', function () {\n return new ViewService(\n $this->app->make(View::class),\n $this->app->make(PermissionService::class)\n );\n });\n\n $this->app->bind('setting', function () {\n return new SettingService(\n $this->app->make(Setting::class),\n $this->app->make(Repository::class)\n );\n });\n\n $this->app->bind('images', function () {\n return new ImageService(\n $this->app->make(Image::class),\n $this->app->make(ImageManager::class),\n $this->app->make(Factory::class),\n $this->app->make(Repository::class)\n );\n });\n }", "public function register()\n {\n App::bind('CreateTagService', function($app) {\n return new CreateTagService;\n });\n\n App::bind('UpdateTagService', function($app) {\n return new UpdateTagService;\n });\n }", "public function register()\n {\n $this->registerDomainLocalization();\n $this->registerDomainLocaleFilter();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MailConfigServiceProvider::class);\n }", "public function register()\n {\n $this->registerUserProvider();\n $this->registerGroupProvider();\n $this->registerNeo();\n\n $this->registerCommands();\n\n $this->app->booting(function()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Neo', 'Wetcat\\Neo\\Facades\\Neo');\n });\n }", "public function register()\n {\n //\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\CompanyInterface', \n 'App\\Repositories\\CompanyRepo'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\UtilityInterface', \n 'App\\Repositories\\UtilityRepo'\n );\n }", "public function register()\n {\n $this->registerPayment();\n\n $this->app->alias('image', 'App\\Framework\\Image\\ImageService');\n }", "public function register()\n {\n $this->app->bind(AttributeServiceInterface::class,AttributeService::class);\n $this->app->bind(ProductServiceIntarface::class,ProductService::class);\n\n\n }", "public function register()\n {\n App::bind('App\\Repositories\\UserRepositoryInterface','App\\Repositories\\UserRepository');\n App::bind('App\\Repositories\\AnimalRepositoryInterface','App\\Repositories\\AnimalRepository');\n App::bind('App\\Repositories\\DonationTypeRepositoryInterface','App\\Repositories\\DonationTypeRepository');\n App::bind('App\\Repositories\\NewsAniRepositoryInterface','App\\Repositories\\NewsAniRepository');\n App::bind('App\\Repositories\\DonationRepositoryInterface','App\\Repositories\\DonationRepository');\n App::bind('App\\Repositories\\ProductRepositoryInterface','App\\Repositories\\ProductRepository');\n App::bind('App\\Repositories\\CategoryRepositoryInterface','App\\Repositories\\CategoryRepository');\n App::bind('App\\Repositories\\TransferMoneyRepositoryInterface','App\\Repositories\\TransferMoneyRepository');\n App::bind('App\\Repositories\\ShippingRepositoryInterface','App\\Repositories\\ShippingRepository');\n App::bind('App\\Repositories\\ReserveProductRepositoryInterface','App\\Repositories\\ReserveProductRepository');\n App::bind('App\\Repositories\\Product_reserveRepositoryInterface','App\\Repositories\\Product_reserveRepository');\n App::bind('App\\Repositories\\Ordering_productRepositoryInterface','App\\Repositories\\Ordering_productRepository');\n App::bind('App\\Repositories\\OrderingRepositoryInterface','App\\Repositories\\OrderingRepository');\n App::bind('App\\Repositories\\UserUpdateSlipRepositoryInterface','App\\Repositories\\UserUpdateSlipRepository');\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->registerPublishing();\n }\n }", "public function register()\n {\n $this->app->bind(HttpClient::class, function ($app) {\n return new HttpClient();\n });\n\n $this->app->bind(SeasonService::class, function ($app) {\n return new SeasonService($app->make(HttpClient::class));\n });\n\n $this->app->bind(MatchListingController::class, function ($app) {\n return new MatchListingController($app->make(SeasonService::class));\n });\n\n }", "public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }", "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Console\\MakeEndpointCommand::class,\n Console\\MakeControllerCommand::class,\n Console\\MakeRepositoryCommand::class,\n Console\\MakeTransformerCommand::class,\n Console\\MakeModelCommand::class,\n ]);\n }\n\n $this->registerFractal();\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }", "public function register()\n {\n\n $config = $this->app['config']['cors'];\n\n $this->app->bind('Yocome\\Cors\\CorsService', function() use ($config){\n return new CorsService($config);\n });\n\n }", "public function register()\n {\n // Bind facade\n\n $this->registerRepositoryBibdings();\n $this->registerFacades();\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(\\Laravel\\Socialite\\SocialiteServiceProvider::class);\n }", "public function register()\n {\n\n\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\UserRepository',\n 'Onlinecorrection\\Repositories\\UserRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ClientRepository',\n 'Onlinecorrection\\Repositories\\ClientRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ProjectRepository',\n 'Onlinecorrection\\Repositories\\ProjectRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentRepository',\n 'Onlinecorrection\\Repositories\\DocumentRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderRepository',\n 'Onlinecorrection\\Repositories\\OrderRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderItemRepository',\n 'Onlinecorrection\\Repositories\\OrderItemRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentImageRepository',\n 'Onlinecorrection\\Repositories\\DocumentImageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\PackageRepository',\n 'Onlinecorrection\\Repositories\\PackageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\StatusRepository',\n 'Onlinecorrection\\Repositories\\StatusRepositoryEloquent'\n );\n\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->registerDataStore();\n\n $this->registerStorageFactory();\n\n $this->registerStorageManager();\n\n $this->registerSimplePhoto();\n }", "public function register()\n {\n // Default configuration file\n $this->mergeConfigFrom(\n __DIR__.'/Config/auzo_tools.php', 'auzoTools'\n );\n\n $this->registerModelBindings();\n $this->registerFacadesAliases();\n }", "public function register()\n {\n $this->app->bind(\\Cookiesoft\\Repositories\\CategoryRepository::class, \\Cookiesoft\\Repositories\\CategoryRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\BillpayRepository::class, \\Cookiesoft\\Repositories\\BillpayRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\UserRepository::class, \\Cookiesoft\\Repositories\\UserRepositoryEloquent::class);\n //:end-bindings:\n }", "public function register()\n {\n $this->app->singleton(ThirdPartyAuthService::class, function ($app) {\n return new ThirdPartyAuthService(\n config('settings.authentication_services'),\n $app['Laravel\\Socialite\\Contracts\\Factory'],\n $app['Illuminate\\Contracts\\Auth\\Factory']\n );\n });\n\n $this->app->singleton(ImageValidator::class, function ($app) {\n return new ImageValidator(\n config('settings.image.max_filesize'),\n config('settings.image.mime_types'),\n $app['Intervention\\Image\\ImageManager']\n );\n });\n\n $this->app->singleton(ImageService::class, function ($app) {\n return new ImageService(\n config('settings.image.max_width'),\n config('settings.image.max_height'),\n config('settings.image.folder')\n );\n });\n\n $this->app->singleton(RandomWordService::class, function ($app) {\n return new RandomWordService(\n $app['App\\Repositories\\WordRepository'],\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.number_of_words_to_remember')\n );\n });\n\n $this->app->singleton(WordRepository::class, function ($app) {\n return new WordRepository(config('settings.min_number_of_chars_per_one_mistake_in_search'));\n });\n\n $this->app->singleton(CheckAnswerService::class, function ($app) {\n return new CheckAnswerService(\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.min_number_of_chars_per_one_mistake')\n );\n });\n\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerJWT();\n $this->registerJWSProxy();\n $this->registerJWTAlgoFactory();\n $this->registerPayload();\n $this->registerPayloadValidator();\n $this->registerPayloadUtilities();\n\n // use this if your package has a config file\n // config([\n // 'config/JWT.php',\n // ]);\n }", "public function register()\n {\n $this->registerManager();\n $this->registerConnection();\n $this->registerWorker();\n $this->registerListener();\n $this->registerFailedJobServices();\n $this->registerOpisSecurityKey();\n }", "public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind('App\\Services\\TripService.php', function ($app) {\n return new TripService();\n });\n }", "public function register()\n {\n $this->registerUserComponent();\n $this->registerLocationComponent();\n\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\UserCertificate\\IUserCertificateService::class,\n \\App\\Services\\UserCertificate\\UserCertificateService::class\n );\n }", "public function register()\n {\n $this->app->bind(FacebookMarketingContract::class,FacebookMarketingService::class);\n }", "public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }", "public function register()\n {\n $this->app->singleton('composer', function($app)\n {\n return new Composer($app['files'], $app['path.base']);\n });\n\n $this->app->singleton('forge', function($app)\n {\n return new Forge($app);\n });\n\n // Register the additional service providers.\n $this->app->register('Nova\\Console\\ScheduleServiceProvider');\n $this->app->register('Nova\\Queue\\ConsoleServiceProvider');\n }", "public function register()\n {\n\n\n\n $this->mergeConfigFrom(__DIR__ . '/../config/counter.php', 'counter');\n\n $this->app->register(RouteServiceProvider::class);\n\n\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__.'/../config/colissimo.php', 'colissimo');\r\n $this->mergeConfigFrom(__DIR__.'/../config/rules.php', 'colissimo.rules');\r\n $this->mergeConfigFrom(__DIR__.'/../config/prices.php', 'colissimo.prices');\r\n $this->mergeConfigFrom(__DIR__.'/../config/zones.php', 'colissimo.zones');\r\n $this->mergeConfigFrom(__DIR__.'/../config/insurances.php', 'colissimo.insurances');\r\n $this->mergeConfigFrom(__DIR__.'/../config/supplements.php', 'colissimo.supplements');\r\n // Register the service the package provides.\r\n $this->app->singleton('colissimo', function ($app) {\r\n return new Colissimo;\r\n });\r\n }", "public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyService::class,\n \\App\\Services\\Survey\\SurveyService::class\n );\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyQuestionService::class,\n \\App\\Services\\Survey\\SurveyQuestionService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptService::class,\n \\App\\Services\\Survey\\SurveyAttemptService::class\n );\n\n $this->app->bind(\n \\App\\Services\\Survey\\ISurveyAttemptDataService::class,\n \\App\\Services\\Survey\\SurveyAttemptDataService::class\n );\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/atlas.php', 'atlas'\n );\n \n $this->app->singleton(CoreContract::class, Core::class);\n \n $this->registerFacades([\n 'Atlas' => 'Atlas\\Facades\\Atlas',\n ]);\n }", "public function register()\n {\n $this->app->bind(TelescopeRouteServiceContract::class, TelescopeRouteService::class);\n }", "public function register()\n {\n $this->registerRepositoryBindings();\n\n $this->registerInterfaceBindings();\n\n $this->registerAuthorizationServer();\n\n $this->registerResourceServer();\n\n $this->registerFilterBindings();\n\n $this->registerCommands();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/faithgen-events.php', 'faithgen-events');\n\n $this->app->singleton(EventsService::class);\n $this->app->singleton(GuestService::class);\n }", "public function register()\n {\n $this->registerAliases();\n $this->registerFormBuilder();\n\n // Register package commands\n $this->commands([\n 'CoreDbCommand',\n 'CoreSetupCommand',\n 'CoreSeedCommand',\n 'EventEndCommand',\n 'ArchiveMaxAttempts',\n 'CronCommand',\n 'ExpireInstructors',\n 'SetTestLock',\n 'StudentArchiveTraining',\n 'TestBuildCommand',\n 'TestPublishCommand',\n ]);\n\n // Merge package config with one in outer app \n // the app-level config will override the base package config\n $this->mergeConfigFrom(\n __DIR__.'/../config/core.php', 'core'\n );\n\n // Bind our 'Flash' class\n $this->app->bindShared('flash', function () {\n return $this->app->make('Hdmaster\\Core\\Notifications\\FlashNotifier');\n });\n\n // Register package dependencies\n $this->app->register('Collective\\Html\\HtmlServiceProvider');\n $this->app->register('Bootstrapper\\BootstrapperL5ServiceProvider');\n $this->app->register('Codesleeve\\LaravelStapler\\Providers\\L5ServiceProvider');\n $this->app->register('PragmaRX\\ZipCode\\Vendor\\Laravel\\ServiceProvider');\n $this->app->register('Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider');\n\n $this->app->register('Zizaco\\Confide\\ServiceProvider');\n $this->app->register('Zizaco\\Entrust\\EntrustServiceProvider');\n }" ]
[ "0.7879658", "0.7600202", "0.74930716", "0.73852855", "0.736794", "0.7306089", "0.7291359", "0.72896826", "0.72802424", "0.7268026", "0.7267702", "0.72658145", "0.7249053", "0.72171587", "0.7208486", "0.7198799", "0.7196415", "0.719478", "0.7176513", "0.7176227", "0.7164647", "0.71484524", "0.71337837", "0.7129424", "0.71231985", "0.7120174", "0.7103653", "0.71020955", "0.70977163", "0.7094701", "0.7092148", "0.70914364", "0.7088618", "0.7087278", "0.70827085", "0.70756096", "0.7075115", "0.70741326", "0.7071857", "0.707093", "0.7070619", "0.7067406", "0.7066438", "0.7061766", "0.70562875", "0.7051525", "0.7049684", "0.70467263", "0.7043264", "0.7043229", "0.70429426", "0.7042174", "0.7038729", "0.70384216", "0.70348704", "0.7034105", "0.70324445", "0.70282733", "0.7025024", "0.702349", "0.7023382", "0.702262", "0.7022583", "0.7022161", "0.702139", "0.7021084", "0.7020801", "0.7019928", "0.70180106", "0.7017351", "0.7011482", "0.7008627", "0.7007786", "0.70065045", "0.7006424", "0.70060986", "0.69992065", "0.699874", "0.69980377", "0.69980335", "0.6997871", "0.6996457", "0.69961494", "0.6994749", "0.6991596", "0.699025", "0.6988414", "0.6987274", "0.69865865", "0.69862866", "0.69848233", "0.6978736", "0.69779474", "0.6977697", "0.6976002", "0.69734764", "0.6972392", "0.69721776", "0.6970663", "0.6968296", "0.696758" ]
0.0
-1
Returns the static model of the specified AR class.
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model() {\n return parent::model(get_called_class());\n }", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.74850124", "0.73803526", "0.7154113", "0.71401674", "0.70629025", "0.703232", "0.69285315", "0.69285315", "0.6925706", "0.6902751", "0.6894916", "0.6894916", "0.68900806", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424" ]
0.0
-1
Retrieves a list of models based on the current search/filter conditions.
public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria=new CDbCriteria; $criteria->compare('id',$this->id); $criteria->compare('name',$this->name,true); $criteria->compare('lastname',$this->name,true); $criteria->compare('address',$this->address,true); $criteria->compare('record_date',$this->record_date,true); $criteria->compare('position',$this->position,true); return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModels();", "public function getModels();", "public function findAll($model);", "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('warehouse_id');\n $client_id = ( !is_numeric(request()->get('client_id')) ) ? auth()->user()->current_client_id : request()->get('client_id');\n\n //instantiate model and run search\n $product_model = new Product();\n return $product_model->getListSearch(request()->get('search_term'), $warehouse_id, $client_id);\n }", "public function getModels()\n\t{\n\t\t$scope = $this->scopeName;\n\t\treturn CActiveRecord::model($this->baseModel)->$scope()->findAll();\n\t}", "protected function findModel()\n {\n $class = $this->model;\n $query = $class::query();\n\n foreach ($this->input as $key => $value) {\n $where = is_array($value) ? 'whereIn' : 'where';\n $query->$where($key, $value);\n }\n\n return $query->get();\n }", "public function modelScans()\n {\n if ($this->scanEverything) {\n return $this->getAllClasses();\n }\n\n return $this->scanModels;\n }", "public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n $config->setURL(self::BASE_URL.\"/models\");\n\n return $this->sendRequest($config);\n }", "public function getModelsForIndex()\n {\n $models = [];\n $all_models = $this->getAllModels();\n\n foreach ($all_models as $model) {\n //parse model\n $pieces = explode('.', $model);\n if (count($pieces) != 2) {\n throw new Exception('Parse error in AppModelList');\n }\n //check form match\n $app_model = $pieces[1];\n $link = $this->convertModelToLink($app_model);\n\n // add to actions\n $models[$app_model]['GET'] = [\n [\n 'action' => 'index',\n 'description' => 'List & filter all ' . $app_model . ' resources.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link\n ],\n [\n 'action' => 'show',\n 'description' => 'Show the ' . $app_model . ' that has the matching {id} from the route.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link . '/{id}'\n ]\n ];\n }\n return $models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function searchableBy()\n {\n return [];\n }", "public function all($model){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n $stmt = $this->pdo->prepare('select * from ' . $table);\n $stmt->execute();\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public static function find($model, $conditions = null, $orderby = null){\n\t\t$sql = \"SELECT * FROM \" . self::table_for($model);\n\t\tif ($conditions) $sql .= \" WHERE \" . self::make_conditions($conditions);\n\t\tif ($orderby)\t$sql .= \" ORDER BY \" . $orderby;\n\t\t\n\t\t$resultset = self::do_query($sql);\n\t\treturn self::get_results($resultset, $model);\n\t}", "function get_model_list($where=\"1\",$where_array,$sort_by=\"\"){\n\t\t$data= $this->select_query(\"make_model\",\"id,name,del_status\",$where,$where_array,$sort_by);\n\t\treturn $data;\n\t}", "public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }", "public function getList()\n {\n \treturn $this->model->where('is_base', '=', 0)->get();\n }", "public function getList()\n {\n $this->db->order_by(\"id\", 'desc');\n $this->db->where('status', 1);\n return $this->db->get($this->model);\n }", "public function findAll()\n {\n $fields = $options = [];\n //$options['debug'] = 1;\n $options['enablefieldsfe'] = 1;\n\n return $this->search($fields, $options);\n }", "public function findAll()\n {\n return $this->model->all();\n }", "public function get_multiple()\n\t{\n\t\t$options = array_merge(array(\n\t\t\t'offset' => 0,\n\t\t\t'limit' => 20,\n\t\t\t'sort_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t), Input::all(), $this->options);\n\n\t\t// Preparing our query\n\t\t$results = $this->model->with($this->includes);\n\n\t\tif(count($this->join) > 0)\n\t\t{\n\t\t\tforeach ($this->join as $table => $settings) {\n\t\t\t\t$results = $results->join($table, $settings['join'][0], $settings['join'][1], $settings['join'][2]);\n\t\t\t\tif($settings['columns'])\n\t\t\t\t{\n\t\t\t\t\t$options['sort_by'] = (in_array($options['sort_by'], $settings['columns']) ? $table : $this->model->table()).'.'.$options['sort_by'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(stripos($options['sort_by'], '.') === 0)\n\t\t{\n\t\t\t$options['sort_by'] = $this->model->table().'.' . $options['sort_by'];\n\t\t}\n\t\t\n\t\t// Add where's to our query\n\t\tif(array_key_exists('search', $options))\n\t\t{\n\t\t\tforeach($options['search']['columns'] as $column)\n\t\t\t{\n\t\t\t\t$results = $results->or_where($column, '~*', $options['search']['string']);\n\t\t\t}\n\t\t}\n\n\t\t$total = (int) $results->count();\n\n\t\t// Add order_by, skip & take to our results query\n\t\t$results = $results->order_by($options['sort_by'], $options['order'])->skip($options['offset'])->take($options['limit'])->get();\n\n\t\t$response = array(\n\t\t\t'results' => to_array($results),\n\t\t\t'total' => $total,\n\t\t\t'pages' => ceil($total / $options['limit'])\n\t\t);\n\n\t\treturn Response::json($response);\n\t}", "public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }", "public function filter($params) {\n $model = $this->model;\n $keyword = isset($params['keyword'])?$params['keyword']:'';\n $sort = isset($params['sort'])?$params['sort']:''; \n if ($sort == 'name') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('name'); \n }\n else if ($sort == 'newest') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('updated_at','desc'); \n }\n else {\n $query = $model->where('name','LIKE','%'.$keyword.'%'); \n }\n /** filter by class_id */ \n if (isset($params['byclass']) && isset($params['bysubject'])) {\n $query = $model->listClass($params['byclass'], $params['bysubject']);\n return $query; \n }\n else if (isset($params['byclass'])) { \n $query = $model->listClass($params['byclass']);\n return $query;\n }\n else if (isset($params['bysubject'])) {\n $query = $model->listClass(0,$params['bysubject']);\n return $query;\n }\n /** filter by course status */\n if (isset($params['incomming'])) {\n $query = $model->listCourse('incomming');\n return $query;\n }\n else if (isset($params['upcomming'])) {\n $query = $model->listCourse('upcomming');\n return $query;\n }\n $result = $query->paginate(10); \n return $result; \n }", "public function getAll($model, $filters = array())\n {\n $repo = $this->getRepository($model);\n\n return $repo->getAll($filters);\n }", "public function filters(Model $model): array\n {\n return [];\n }", "public function getResults()\n {\n if($this->search) {\n foreach ($this->filters as $field) {\n $field = array_filter(explode('.', $field));\n if(count($field) == 2) {\n $this->query->whereHas($field[0], function ($q) use ($field) {\n $q->where($field[1], 'ilike', \"%{$this->search}%\");\n });\n }\n if(count($field) == 1) {\n $this->query->orWhere($field[0], 'ilike', \"%{$this->search}%\");\n }\n }\n }\n\n if($this->where) {\n foreach ($this->where as $field => $value) {\n $this->query->where($field, $value);\n }\n }\n\n if ($this->whereBetween) {\n foreach ($this->whereBetween as $field => $value)\n $this->query->whereBetween($field, $value);\n }\n// dd($this->query->toSql());\n return $this->query->paginate($this->per_page);\n }", "protected function _searchInModel(Model $model, Builder $items){\n foreach($model->searchable as $param){\n if($param != 'id'){\n if(isset($this->request[$param]))\n $items = $items->where($param, $this->request[$param]);\n if(isset($this->request[$param.'_like']))\n $items = $items->where($param, 'like', '%'.$this->request[$param.'_like'].'%');\n }else{\n if(isset($this->request['id'])){\n $ids = explode(',', $this->request['id']);\n $items = $items->whereIn('id', $ids);\n }\n }\n }\n\n return $items;\n }", "public function getAll($model)\n {\n $sql = \"SELECT * FROM {$this->table}\";\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_CLASS,get_class($this->model));\n }", "private function getAllModels()\n {\n return (object)ModelRegistry::getAllObjects();\n }", "public function findAll()\n {\n return $this->driver->findAll($this->model);\n }", "public function getAllFilters();", "public function GetAll()\n {\n return $this->model->all();\n }", "public function fetch_all_models() {\n global $pdo;\n\n $query = $pdo->prepare(\"SELECT * FROM talents\");\n $query -> execute();\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function findWhere($model, $conditions, $limit = 0){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n\n $sql = 'select * from ' . $table . ' where ';\n $values = [];\n $counter = 1;\n\n foreach ($conditions as $key => $value) {\n if($counter > 1)\n $sql .= ' AND ';\n\n $sql .= $key . '=?';\n $values[] = $value; \n $counter++;\n }\n\n if($limit > 0)\n $sql .= ' LIMIT ' . $limit;\n \n $stmt = $this->pdo->prepare($sql);\n $stmt->execute($values);\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('type', $this->type);\n\n return $criteria;\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object_type_id);\n\t\t$criteria->compare('data_type_id',$this->data_type_id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('client_ip',$this->client_ip,true);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_origin',$this->url_origin,true);\n\t\t$criteria->compare('device',$this->device,true);\n\t\t$criteria->compare('country_name',$this->country_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('regionName',$this->regionName,true);\n\t\t$criteria->compare('cityName',$this->cityName,true);\n\t\t$criteria->compare('browser',$this->browser,true);\n\t\t$criteria->compare('os',$this->os,true);\n\t\t\t// se agrego el filtro por el usuario actual\n\t\t$idUsuario=Yii::app()->user->getId();\n\t\t$model = Listings::model()->finbyAttributes(array('user_id'=>$idUsuario));\n\t\tif($model->id!=\"\"){\n\t\t\t$criteria->compare('object_id',$model->id);\t\n\t\t}else{\n\t\t\t$criteria->compare('object_id',\"Null\");\t\n\t\t}\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getModels()\n {\n return $this->_models;\n }", "public function getSearchFields();", "public function all()\n {\n return $this->model->get();\n }", "public function getAllModels()\n {\n try {\n return AppModelList::models();\n }\n catch (Throwable $t) {\n throw new Exception('Parse Error: AppModelList.php has been corrupted.');\n }\n }", "protected function _list_items_query()\n\t{\n\t\t$this->filters = (array) $this->filters;\n\t\t$where_or = array();\n\t\t$where_and = array();\n\t\tforeach($this->filters as $key => $val)\n\t\t{\n\t\t\tif (is_int($key))\n\t\t\t{\n\t\t\t\tif (isset($this->filters[$val])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$key = $val;\n\t\t\t\t$val = $this->filter_value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// used for separating table names and fields since periods get translated to underscores\n\t\t\t\t$key = str_replace(':', '.', $key);\n\t\t\t}\n\t\t\t\n\t\t\t$joiner = $this->filter_join;\n\t\t\t\n\t\t\tif (is_array($joiner))\n\t\t\t{\n\t\t\t\tif (isset($joiner[$key]))\n\t\t\t\t{\n\t\t\t\t\t$joiner = $joiner[$key];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$joiner = 'or';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($val)) \n\t\t\t{\n\t\t\t\t$joiner_arr = 'where_'.$joiner;\n\t\t\t\t\n\t\t\t\tif (strpos($key, '.') === FALSE AND strpos($key, '(') === FALSE) $key = $this->table_name.'.'.$key;\n\t\t\t\t\n\t\t\t\t//$method = ($joiner == 'or') ? 'or_where' : 'where';\n\t\t\t\t\n\t\t\t\t// do a direct match if the values are integers and have _id in them\n\t\t\t\tif (preg_match('#_id$#', $key) AND is_numeric($val))\n\t\t\t\t{\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\tarray_push($$joiner_arr, $key.'='.$val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// from imknight https://github.com/daylightstudio/FUEL-CMS/pull/113#commits-pushed-57c156f\n\t\t\t\t//else if (preg_match('#_from#', $key) OR preg_match('#_to#', $key))\n\t\t\t\telse if (preg_match('#_from$#', $key) OR preg_match('#_fromequal$#', $key) OR preg_match('#_to$#', $key) OR preg_match('#_toequal$#', $key) OR preg_match('#_equal$#', $key))\n\t\t\t\t{\n\t\t\t\t\t//$key = strtr($key, array('_from' => ' >', '_fromequal' => ' >=', '_to' => ' <', '_toequal' => ' <='));\n\t\t\t\t\t$key_with_comparison_operator = preg_replace(array('#_from$#', '#_fromequal$#', '#_to$#', '#_toequal$#', '#_equal$#'), array(' >', ' >=', ' <', ' <=', ' ='), $key);\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\t//$where_or[] = $key.'='.$this->db->escape($val);\n\t\t\t\t\tarray_push($$joiner_arr, $key_with_comparison_operator.$this->db->escape($val));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//$method = ($joiner == 'or') ? 'or_like' : 'like';\n\t\t\t\t\t//$this->db->$method('LOWER('.$key.')', strtolower($val), 'both');\n\t\t\t\t\tarray_push($$joiner_arr, 'LOWER('.$key.') LIKE \"%'.strtolower($val).'%\"');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// here we will group the AND and OR separately which should handle most cases me thinks... but if not, you can always overwrite\n\t\t$where = array();\n\t\tif (!empty($where_or))\n\t\t{\n\t\t\t$where[] = '('.implode(' OR ', $where_or).')';\n\t\t}\n\t\tif (!empty($where_and))\n\t\t{\n\t\t\t$where[] = '('.implode(' AND ', $where_and).')';\n\t\t}\n\t\tif (!empty($where))\n\t\t{\n\t\t\t$where_sql = implode(' AND ', $where);\n\t\t\t$this->db->where($where_sql);\n\t\t}\n\t\t\n\t\t\n\t\t// set the table here so that items total will work\n\t\t$this->db->from($this->table_name);\n\t}", "public function getAll()\n {\n return $this->fetchAll($this->searchQuery(0));\n }", "public function listAction() {\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$select = null;\n\t\t\n\t\tif ($this->_request->getParam('data')) {\n\t\t\t\n\t\t\t$data = unserialize($this->_request->getParam('data'));\n\t\t\t$aWhere = array();\n\t\t\t$searchText = array();\n\t\t\t\n\t\t\tforeach ($data['query'] as $key => $q) {\n\t\t\t\n\t\t\t\tif (isset($data['fields'][$key]) && !empty($data['fields'][$key])) {\n\t\t\t\t\n\t\t\t\t\t$func = addslashes($data['func'][$key]);\n\t\t\t\t\t$q =\taddslashes($q);\n\t\t\t\t\t$tmpWhere = array();\n\t\t\t\t\t$searchText[] = implode(' OU ', $data['fields'][$key]) . ' ' . $this->view->func[$func] . ' \"' . stripslashes($q) . '\"';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($data['fields'][$key] as $field) {\n\t\t\t\t\t\n\t\t\t\t\t\t$field\t=\taddslashes($field);\n\t\t\t\t\t\tswitch ($func) {\n\t\t\t\t\t\t\tcase 'LIKE':\n\t\t\t\t\t\t\tcase 'NOT LIKE':\n\t\t\t\t\t\t\tcase '=':\n\t\t\t\t\t\t\tcase '!=':\n\t\t\t\t\t\t\tcase '>':\n\t\t\t\t\t\t\tcase '>=':\n\t\t\t\t\t\t\tcase '<':\n\t\t\t\t\t\t\tcase '<=':\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' ' . $func . ' \\'' . $q . '\\''; }\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"= ''\":\n\t\t\t\t\t\t\tcase \"!= ''\":\n\t\t\t\t\t\t\tcase 'IS NULL':\n\t\t\t\t\t\t\tcase 'IS NOT NULL':\n\t\t\t\t\t\t\t\t$tmpWhere[] = $field . ' ' . stripslashes($func);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' LIKE \\'%' . $q . '%\\''; }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$aWhere[] = '(' . implode(' OR ', $tmpWhere) . ')';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($aWhere)) { $select = $model->select()->where(implode(' AND ', $aWhere)); }\n\t\t\t$this->view->searchText = $searchText;\n\t\t}\n\t\t$this->view->model = $modelName;\n\t\t$this->view->allData = $model->fetchAll($select);\n\t\t$this->view->data = Zend_Paginator::factory($this->view->allData)\n\t\t\t\t\t\t\t->setCurrentPageNumber($this->_getParam('page', 1));\n\t}", "public function index(Request $request)\n {\n $this->validate($request, [\n 'type' => 'required',\n 'searched' => 'required',\n ]);\n\n try {\n if ($request->type == 'Categories') {\n return Category::search($request->searched)->take(20)->get();\n }\n\n if ($request->type == 'Submissions') {\n return $this->sugarFilter(Submission::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Comments') {\n return $this->withoutChildren(Comment::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Users') {\n return User::search($request->searched)->take(20)->get();\n }\n } catch (\\Exception $exception) {\n app('sentry')->captureException($exception);\n\n return [];\n }\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getReturnModels(){\r\n return array_values($this->models);\r\n }", "public function findAll()\n {\n $models = $this->getDoctrineRepository()->findAll();\n $this->events()->trigger(__FUNCTION__ . '.post', $this, array(\n 'model' => $models,\n 'om' => $this->getObjectManager())\n );\n return $models;\n }", "public function models();", "public function search($conditions)\n\t{\n\t\t$limit = (isset($conditions['limit']) && $conditions['limit'] !== null ? $conditions['limit'] : 10);\n\t\t$result = array();\n\t\t$alphabets = [];\n\n\t\tDB::enableQueryLog();\n\n\t\t$mem = new Memcached();\n\t\t$mem->addServer(env('memcached_server'), env('memcached_port'));\n\n\t\t/* Get Default Logo Link on setting_object table */\n\t\t$logoMem = $mem->get('logo_course');\n\n\t\tif ($logoMem)\n\t\t{\n\t\t\t$default_logo = $logoMem;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$default_logo = $this->getDefaultLogo();\n\t\t\t$mem->set('logo_course', $default_logo);\n\t\t}\n\n\t\tif (isset($conditions['alphabet']) && $conditions['alphabet'] !== null && sizeof($conditions['alphabet']) > 0) {\n\t\t\tforeach ($conditions['alphabet'] as $item) {\n\t\t\t\t$alphabets[] = \"lower(entity.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t\t$alphabets[] = \"lower(curriculum.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t}\n\t\t}\n\n\t\t$extraGroup = (isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : '' );\n\t\t$extraGroup = str_replace(' ASC', '',$extraGroup);\n\t\t$extraGroup = str_replace(' DESC', '',$extraGroup);\n\n\t\t$searchData = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->limit($limit)\n\t\t\t->offset(isset($conditions['page']) && $conditions['page'] !== null ? ($conditions['page']-1) * $limit : 0)\n\t\t\t->get();\n\n\t\t$searchAll = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t//->groupBy('course.course_id','schedule.instructor_id','curriculum.curriculum_id','entity.logo', 'course.day_of_week','entity.name','curriculum.name','course.time_start', 'course.time_end','event_type.name')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->get();\n\n\t\t//echo(\"<br>Total : \" . sizeof($searchData) . \" records\");\n\t\tforeach ($searchData as $data) {\n\t\t\t/*echo('<br>' . $data->program_id . '|' . $data->program_name . '|'. $data->activity_id . '|' . $data->provider_name . '|' . $data->location_name);*/\n\t\t\t//echo('<br>' . $data->provider_id . '|' . $data->provider_name . '|' . $data->location_name);\n\n\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\n\n\t\t\t//echo('<br>' . $data->course_id . \"~\" . $data->program_name . '#'.$day->name. \"|\". date('h:i',strtotime($data->time_start)) . '-' .date('h:i',strtotime($data->time_end)));\n\t\t\t$item = ['course_id' => $data->course_id,\n\t\t\t\t'entity_logo' => ($data->entity_logo ? $data->entity_logo : $default_logo),\n\t\t\t\t'entity_name' => $data->entity_name,\n\t\t\t\t'curriculum_name' => $data->curriculum_name,\n\t\t\t\t'day_name' => $day->name,\n\t\t\t\t'time_start' => date('H:i',strtotime($data->time_start)),\n\t\t\t\t'time_end' => date('H:i',strtotime($data->time_end))];\n\n\t\t\t/*$schedules = DB::table('schedule')\n\t\t\t\t->select('schedule.schedule_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\tforeach ($schedules as $schedule) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t}*/\n\n\t\t\t$programs = DB::table('curriculum')\n\t\t\t\t->select('program.program_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\t$searchActivities = [];\n\t\t\tforeach ($programs as $program) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t\t$activities = DB::table('program')\n\t\t\t\t\t->select('activity.logo', 'program.provider_id', DB::raw('program.name program_name'))\n\t\t\t\t\t->join('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t\t\t->leftjoin('activity_classification', 'activity.activity_classification_id', 'activity_classification.activity_classification_id')\n\t\t\t\t\t->where('program.program_id', $program->program_id)\n\t\t\t\t\t->whereRaw(\n\t\t\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\t\t\t\t\t\t('program.status = 0')\n\t\t\t\t\t)\n\t\t\t\t\t//->groupBy('activity.logo')\n\t\t\t\t\t->get();\n\n\t\t\t\tforeach ($activities as $activity) {\n\t\t\t\t\t//echo('<img src=\"' . $activity->logo . '\" style=\"width:2%;\" alt=\"' . $activity->program_name . '\" title=\"' . $activity->program_name . '\">');\n\t\t\t\t\t$searchActivity = [\n\t\t\t\t\t\t'logo' => $activity->logo,\n\t\t\t\t\t\t'name' => $activity->program_name,\n\t\t\t\t\t];\n\t\t\t\t\tarray_push($searchActivities, $searchActivity);\n\t\t\t\t}\n\t\t\t}\n\t\t\tarray_push($result, array('item' => $item, 'activity' => $searchActivities));\n\t\t}\n\n\t\t$final = array('totalPage' => ceil(sizeof($searchAll)/$limit), 'total' => ( sizeof($searchAll) > 0 ? sizeof($searchAll) : 0), 'result' => $result, 'debug' => DB::getQueryLog()[0]['query']);\n\t\treturn $final;\n\t}", "public function searchAction() {\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$this->view->model = $this->_getParam('model');\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t\n\t\tif ($this->_request->isPost()) {\n\t\t\t$fields = array();\n\t\t\t$func \t= array();\n\t\t\t$query \t= array();\n\t\t\tforeach ($_POST['query'] as $key => $q) {\n\t\t\t\tif (isset($_POST['fields'][$key]) && !empty($_POST['fields'][$key])) {\n\t\t\t\t\t$fields[$key] = $_POST['fields'][$key];\n\t\t\t\t\t$func[$key] \t= $_POST['func'][$key];\n\t\t\t\t\t$query[$key] \t= $_POST['query'][$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data = array('fields' => $fields, 'func' => $func, 'query' => $query);\n\t\t\t$data = serialize($data);\n\t\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName, 'data' => $data));\n\t\t}\n\t}", "public function all()\n {\n return $this->model->get();\n }", "public function master_search() {\r\n $this->db->join(\r\n '__Vehicles', \r\n '__Vehicles.__ContactId = ' . $this->table_name. '.' . $this->contactId_fieldname ,\r\n 'left outer'\r\n ); \r\n return $this->get();\r\n }", "public function getList()\n {\n return $this->model->getList();\n }", "public function getItemsBy($params = false)\n {\n $query = $this->model->query();\n\n /*== RELATIONSHIPS ==*/\n if (in_array('*', $params->include)) {//If Request all relationships\n $query->with([]);\n } else {//Especific relationships\n $includeDefault = [];//Default relationships\n if (isset($params->include))//merge relations with default relationships\n $includeDefault = array_merge($includeDefault, $params->include);\n $query->with($includeDefault);//Add Relationships to query\n }\n\n /*== FILTERS ==*/\n if (isset($params->filter)) {\n $filter = $params->filter;//Short filter\n\n //Filter by date\n if (isset($filter->date)) {\n $date = $filter->date;//Short filter date\n $date->field = $date->field ?? 'created_at';\n if (isset($date->from))//From a date\n $query->whereDate($date->field, '>=', $date->from);\n if (isset($date->to))//to a date\n $query->whereDate($date->field, '<=', $date->to);\n }\n\n //Order by\n if (isset($filter->order)) {\n $orderByField = $filter->order->field ?? 'position';//Default field\n $orderWay = $filter->order->way ?? 'desc';//Default way\n $query->orderBy($orderByField, $orderWay);//Add order to query\n }\n\n // Filter By Menu\n if (isset($filter->menu)) {\n $query->where('menu_id', $filter->menu);\n }\n\n //add filter by search\n if (isset($filter->search)) {\n //find search in columns\n $query->where(function ($query) use ($filter) {\n $query->whereHas('translations', function ($query) use ($filter) {\n $query->where('locale', $filter->locale)\n ->where('title', 'like', '%' . $filter->search . '%');\n })->orWhere('id', 'like', '%' . $filter->search . '%')\n ->orWhere('updated_at', 'like', '%' . $filter->search . '%')\n ->orWhere('created_at', 'like', '%' . $filter->search . '%');\n });\n }\n\n }\n\n /*== FIELDS ==*/\n if (isset($params->fields) && count($params->fields))\n $query->select($params->fields);\n\n /*== REQUEST ==*/\n if (isset($params->page) && $params->page) {\n return $query->paginate($params->take);\n } else {\n $params->take ? $query->take($params->take) : false;//Take\n return $query->get();\n }\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function findBy(array $filters);", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('brand',$this->brand,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('width',$this->width);\n\t\t$criteria->compare('height',$this->height);\n\t\t$criteria->compare('goods_thumb',$this->goods_thumb,true);\n\t\t$criteria->compare('goods_img',$this->goods_img,true);\n\t\t$criteria->compare('model_search',$this->model_search,true);\n\t\t$criteria->compare('brand_search',$this->brand_search,true);\n\t\t$criteria->compare('brand2',$this->brand2,true);\n\t\t$criteria->compare('brand2_search',$this->brand2_search,true);\n\t\t$criteria->compare('brand3',$this->brand3,true);\n\t\t$criteria->compare('brand3_search',$this->brand3_search,true);\n\t\t$criteria->compare('brand4',$this->brand4,true);\n\t\t$criteria->compare('brand4_search',$this->brand4_search,true);\n\t\t$criteria->compare('model2',$this->model2,true);\n\t\t$criteria->compare('model2_search',$this->model2_search,true);\n\t\t$criteria->compare('model3',$this->model3,true);\n\t\t$criteria->compare('model3_search',$this->model3_search,true);\n\t\t$criteria->compare('model4',$this->model4,true);\n\t\t$criteria->compare('model4_search',$this->model4_search,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getList($params = [])\n {\n $model = $this->prepareModel();\n return $model::all();\n }", "abstract protected function getSearchModelName(): string;", "public function getItemsCriteria() {}", "public function getItemsCriteria() {}", "public function getFilters();", "public static function getList(array $filters){\n return self::model()->findAllByAttributes($filters);\n }", "public function getSearch();", "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }", "public function actionList() {\n switch ($_GET['model']) {\n case 'Product':\n $models = Product::model()->findAll();\n break;\n case 'Vendor':\n $models = Vendor::model()->findAll();\n break;\n case 'FavoriteProduct':\n $models = FavoriteProduct::model()->findAll();\n break;\n case 'Order':\n $models = Order::model()->findAll();\n break;\n case 'Rating':\n $models = Rating::model()->findAll();\n break;\n case 'Review':\n $models = Review::model()->findAll();\n break;\n case 'UserAddress':\n $models = UserAddress::model()->findAll();\n break;\n case 'OrderDetail':\n $models = OrderDetail::model()->findAll();\n break;\n default:\n $this->_sendResponse(0, 'You have pass invalid modal name');\n Yii::app()->end();\n }\n // Did we get some results?\n if (empty($models)) {\n // No\n $this->_sendResponse(0, 'No Record found ');\n } else {\n // Prepare response\n $rows = array();\n $i = 0;\n foreach ($models as $model) {\n $rows[] = $model->attributes;\n if ($_GET['model'] == 'Order') {\n $rows[$i]['cart_items'] = Product::model()->getProducts($model->product_id);\n $rows[$i]['order_detail'] = OrderDetail::model()->findAll(array('condition' => 'order_id ='.$model->id));\n }\n $i = $i + 1;\n }\n // Send the response\n $this->_sendResponse(1, '', $rows);\n }\n }", "static public function filterData($model_name)\n {\n $query = \"{$model_name}Query\";\n $objects = $query::create()->find();\n \n if ($objects != null) {\n\n $array = array();\n foreach ($objects as $object) {\n $array[$object->getId()] = $object->__toString();\n }\n\n return $array;\n } else {\n return array();\n }\n }", "public static function getList(string $filter='')\n {\n $query = self::with(['product','insuredPerson','agency'])->whereNotNull('n_OwnerId_FK');\n\n $filterArray = json_decode(request('filter'));\n\n if (is_object($filterArray)) {\n foreach($filterArray as $key=>$value) {\n if (empty($value)) {\n continue;\n }\n if (is_array($value)) {\n $query->whereIn($key, $value);\n continue;\n }\n $query->where($key, 'like', \"%$value%\");\n }\n }\n return $query;\n }", "public function getCriteria();", "public static function getSearchable()\n {\n return [\n 'columns' => [],\n 'joins' => [\n \n ]\n ];\n }", "static function filter($model) {\n $cond = Session::get('filter', strtolower($model->source));\n $param = array(\n /* Relaciones */\n 'rel' => array(\n '=' => 'Igual',\n 'LIKE' => 'Parecido',\n '<>' => 'Diferente',\n '<' => 'Menor',\n '>' => 'Mayor'\n ),\n 'col' => array_diff($model->fields, $model->_at, $model->_in, $model->primary_key),\n 'model' => $model,\n 'cond' => $cond\n );\n ob_start();\n View::partial('backend/filter', false, $param);\n return ob_get_clean();\n }", "public function findByModelName($model_name);", "abstract public function getFieldsSearchable();", "function _get_by_related($model, $arguments = array())\r\n\t{\r\n\t\tif ( ! empty($model))\r\n\t\t{\r\n\t\t\t// Add model to start of arguments\r\n\t\t\t$arguments = array_merge(array($model), $arguments);\r\n\t\t}\r\n\r\n\t\t$this->_related('where', $arguments);\r\n\r\n\t\treturn $this->get();\r\n\t}", "public static function getModels()\n\t{\n\t\t$result = [];\n\t\t$path = __DIR__ . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR;\n\t\t$Iterator = new RecursiveDirectoryIterator($path);\n\t\t$objects = new RecursiveIteratorIterator($Iterator, RecursiveIteratorIterator::SELF_FIRST);\n\t\tforeach ($objects as $name => $object)\n\t\t{\n\t\t\tif (strtolower(substr($name, -4) != '.php'))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$name = strtolower(str_replace($path, '', substr($name, 0, strlen($name) - 4)));\n\t\t\t$name = str_replace(DIRECTORY_SEPARATOR, '\\\\', $name);\n\t\t\t$name = 'Model\\\\' . ucwords($name, '\\\\');\n\t\t\tif (class_exists($name))\n\t\t\t{\n\t\t\t\t$result[]= $name;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function autocomplete_search() {\n\tif (!empty($this->request->query['term'])) {\n\t $model = Inflector::camelize(Inflector::singularize($this->request->params['controller']));\n\t $my_models = $this->$model->find('all', array(\n\t\t 'conditions' => array($model . '.name LIKE' => $this->request->query['term'] . '%'),\n\t\t 'limit' => 10,\n\t\t 'contain' => false,\n\t\t\t ));\n\t $json_array = array();\n\t foreach ($my_models as $my_model) {\n\t\t$json_array[] = $my_model[$model];\n\t }\n\t $json_str = json_encode($json_array);\n\t $this->autoRender = false;\n\t return $json_str;\n\t}\n }", "public function getListQuery();", "public function search($model, $request)\n {\n $search = filter_var($request->get('search'), FILTER_SANITIZE_STRING);\n\n // Get optional filters\n // FILTER: GEOLOCATION\n if($request->input('location')) {\n $location = filter_var($request->get('location'), FILTER_SANITIZE_STRING);\n }\n if($request->input('geo_lat')) {\n $geo_lat = filter_var($request->get('geo_lat'), FILTER_SANITIZE_STRING);\n $geo_lng = filter_var($request->get('geo_lng'), FILTER_SANITIZE_STRING);\n }\n\n /**\n * Get current page number for location manual Pagination\n */\n $page = $request->get('page') ? $request->get('page') : 1;\n\n\n // Location first, since it's a special query\n if(isset($geo_lat) && isset($geo_lng)) {\n \n $location_data = Posts::location($geo_lat, $geo_lng, $search, 25, 100); \n\n // Hard and dirty search function through collection\n // since search with location method doesn't work still\n if($search !== '') {\n $location_data = $location_data->filter(function ($item) use ($search) {\n return stripos($item->name, $search) !== false;\n });\n }\n\n // Paginate results because location method can't\n $paginate = new Paginate;\n return $paginate->paginate($location_data, 15, $page, [\n 'path' => '/search/'\n ]);\n\n } \n // Section selection handler (brands/shops/prods/strains)\n elseif($search)\n {\n return $model->where('name', 'like', \"%$search%\");\n }\n\n }", "public function getWorkFlowModels()\n {\n return $this->postRequest('GetWorkFlowModels');\n }", "public function getList()\n {\n $filter = $this->getEvent()->getRouteMatch()->getParam('filter', null);\n return $this->getService()\n ->getList($filter);\n }", "private function _getAllModels(): array {\n\t\t$models = Array();\n\t\t$folder = Environment::$dirs->models;\n\t\t$files = array_diff(scandir($folder), array('.', '..'));\n\t\tforeach ($files as $fileName) {\n\t\t\tinclude_once($folder.DIRECTORY_SEPARATOR.$fileName);\n\t\t\t$className = basename($fileName, \".php\");\n\t\t\t$classNameNamespaced = \"\\\\Jeff\\\\Api\\\\Models\\\\\" . ucfirst($className);\n\t\t\t$model = new $classNameNamespaced($this->db, $this->account);\n\t\t\t$models[$model->modelNamePlural] = $model;\n\t\t}\n\t\treturn $models;\n\t}", "function getAll(){\n\n\t\t\t$this->db->order_by(\"status\", \"asc\");\n\t\t\t$query = $this->db->get_where($this->table);\n\t\t\treturn $query;\n\t\t}", "public function actionViewModelList($modelName)\n\t{\n\t\t$pageSize = BaseModel::PAGE_SIZE;\n\t\tif ($_POST[\"sortBy\"]) {\n\t\t\t$order = $_POST[\"sortBy\"];\n\t\t}\n\t\t//echo $order;\n\t\t/*if (!$modelName) {\n\t\t\t\n\t\t}*/\n\t\t$sess_data = Yii::app()->session->get($modelName.'search');\n\t\t$searchId = $_GET[\"search_id\"];\n\t\t$fromSearchId = TriggerValues::model() -> decodeSearchId($searchId);\n\t\t//print_r($fromSearchId);\n\t\t//echo \"<br/>\";\n\t\t//Если задан $_POST/GET с формы, то сливаем его с массивом из searchId с приоритетом у searchId\n\t\tif ($_POST[$modelName.'SearchForm'])\n\t\t{\n\t\t\t$fromPage = array_merge($_POST[$modelName.'SearchForm'], $fromSearchId);\n\t\t} else {\n\t\t\t//Если же он не задан, то все данные берем из searchId\n\t\t\t$fromPage = $fromSearchId;\n\t\t}\n\t\t//print_r($fromPage);\n\t\tif ((!$fromPage)&&(!$sess_data))\n\t\t{\n\t\t\t//Если никаких критереев не задано, то выдаем все модели.\n\t\t\t$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t} else {\n\t\t\tif ($_GET[\"clear\"]==1)\n\t\t\t{\n\t\t\t\t//Если критерии заданы, но мы хотим их сбросить, то снова выдаем все и обнуляем нужную сессию\n\t\t\t\tYii::app()->session->remove($modelName.'search');\n\t\t\t\t$page = 1;\n\t\t\t\t//was://$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromSearchId,$order);\n\t\t\t} else {\n\t\t\t\t//Если же заданы какие-то критерии, но не со страницы, то вместо них подаем данные из сессии\n\t\t\t\tif (!$fromPage)\n\t\t\t\t{\n\t\t\t\t\t$fromPage = $sess_data;\n\t\t\t\t\t//echo \"from session\";\n\t\t\t\t}\n\t\t\t\t//Адаптируем критерии под специализацию. Если для данной специализации нет какого-то критерия, а он где-то сохранен, то убираем его.\n\t\t\t\t$fromPage = Filters::model() -> FilterSearchCriteria($fromPage, $modelName);\n\t\t\t\t//Если критерии заданы и обнулять их не нужно, то запускаем поиск и сохраняем его критерии в сессию.\n\t\t\t\tYii::app()->session->add($modelName.'search',$fromPage);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromPage,$order);\n\t\t\t}\n\t\t}\n\t\t//делаем из массива объектов dataProvider\n $dataProvider = new CArrayDataProvider($searched['objects'],\n array( 'keyField' =>'id'\n ));\n\t\t$this -> layout = 'layoutNoForm';\n\t\t//Определяем страницу.\n\t\t$maxPage = ceil(count($searched['objects'])/$pageSize);\n\t\tif ($_GET[\"page\"]) {\n\t\t\t$_POST[\"page\"] = $_GET[\"page\"];\n\t\t}\n\t\t$page = $_POST[\"page\"] ? $_POST[\"page\"] : 1;\n\t\t$page = (($page >= 1)&&($page <= $maxPage)) ? $page : 1;\n\t\t$_POST[$modelName.'SearchForm'] = $fromPage;\n\t\t$this->render('show_list', array(\n\t\t\t'objects' => array_slice($searched['objects'],($page - 1) * $pageSize, $pageSize),\n\t\t\t'modelName' => $modelName,\n\t\t\t'filterForm' => $modelName::model() -> giveFilterForm($fromPage),\n\t\t\t'fromPage' => $fromPage,\n\t\t\t'description' => $searched['description'],\n\t\t\t'specialities' => Filters::model() -> giveSpecialities(),\n\t\t\t'page' => $page,\n\t\t\t'maxPage' => $maxPage,\n\t\t\t'total' => count($searched['objects'])\n\t\t));\n\t\t\n\t}", "public function search_through(Request $request)\n {\n $reports = Payment::query();\n\n if (!empty($request->query())) {\n foreach ($request->query() as $key => $value) {\n if ($key == 'date') {\n $reports->whereDate('created_at', '>=', $value);\n } else {\n $reports->where($key, $value);\n }\n }\n }\n\n return $reports->get();\n }", "public function models($query, array $options = [])\n {\n $hits = $this->run($query);\n list($models, $totalCount) = $this->search->config()->models($hits, $options);\n // Remember total number of results.\n $this->setCachedCount($query, $totalCount);\n\n return Collection::make($models);\n }", "public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n return $this->repository->all();\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n $criteria->with=array('c','b');\n\t\t$criteria->compare('pid',$this->pid,true);\n\t\t$criteria->compare('t.cid',$this->cid,true);\n\t\t$criteria->compare('t.bid',$this->bid,true);\n\n $criteria->compare('c.classify_name',$this->classify,true);\n\t\t$criteria->compare('b.brand_name',$this->brand,true);\n \n $criteria->addCondition('model LIKE :i and model REGEXP :j');\n $criteria->params[':i'] = \"%\".$this->index_search.\"%\";\n $criteria->params[':j'] = \"^\".$this->index_search;\n\n \n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('package',$this->package,true);\n\t\t$criteria->compare('RoHS',$this->RoHS,true);\n\t\t$criteria->compare('datecode',$this->datecode,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('direction',$this->direction,true);\n $criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function queryset(){\n return $this->_get_queryset();\n }", "public function index(Request $request)\n {\n $keyword = $request->get('search');\n $perPage = $request->get('limit');\n $perPage = empty($perPage) ? 25 : $perPage;\n\n if (!empty($keyword)) {\n $filters = Filter::where('sl_gender', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_color', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_occasion', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_style', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_age', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_from', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_to', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_city_id', 'LIKE', \"%$keyword%\")\n ->orWhere('user_id', 'LIKE', \"%$keyword%\")\n ->paginate($perPage);\n } else {\n $filters = Filter::paginate($perPage);\n }\n\n return $filters;\n }", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getSearchCriterias()\n {\n return $this->_searchCriterias;\n }", "private function getSearchConditions()\n {\n $searchConditions = [];\n\n $userIds = $this->request->get('ids') ?? [];\n if ($userIds) {\n $searchConditions['id'] = $userIds;\n }\n\n $email = $this->request->get('email') ?? '';\n if ($email) {\n $searchConditions['email'] = $email;\n }\n\n return $searchConditions;\n }", "public function findAllAction();", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sSavedFilterList = \"\";\n\n\t\t// Load server side filters\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\" && isset($UserProfile))\n\t\t\t$sSavedFilterList = $UserProfile->GetSearchFilters(CurrentUserName(), \"fsolicitudlistsrch\");\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id->AdvancedSearch->ToJson(), \",\"); // Field id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nombre_contacto->AdvancedSearch->ToJson(), \",\"); // Field nombre_contacto\n\t\t$sFilterList = ew_Concat($sFilterList, $this->name->AdvancedSearch->ToJson(), \",\"); // Field name\n\t\t$sFilterList = ew_Concat($sFilterList, $this->lastname->AdvancedSearch->ToJson(), \",\"); // Field lastname\n\t\t$sFilterList = ew_Concat($sFilterList, $this->_email->AdvancedSearch->ToJson(), \",\"); // Field email\n\t\t$sFilterList = ew_Concat($sFilterList, $this->address->AdvancedSearch->ToJson(), \",\"); // Field address\n\t\t$sFilterList = ew_Concat($sFilterList, $this->phone->AdvancedSearch->ToJson(), \",\"); // Field phone\n\t\t$sFilterList = ew_Concat($sFilterList, $this->cell->AdvancedSearch->ToJson(), \",\"); // Field cell\n\t\t$sFilterList = ew_Concat($sFilterList, $this->created_at->AdvancedSearch->ToJson(), \",\"); // Field created_at\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_sucursal->AdvancedSearch->ToJson(), \",\"); // Field id_sucursal\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoinmueble->AdvancedSearch->ToJson(), \",\"); // Field tipoinmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipovehiculo->AdvancedSearch->ToJson(), \",\"); // Field tipovehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomaquinaria->AdvancedSearch->ToJson(), \",\"); // Field tipomaquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomercaderia->AdvancedSearch->ToJson(), \",\"); // Field tipomercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->documento_mercaderia->AdvancedSearch->ToJson(), \",\"); // Field documento_mercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoespecial->AdvancedSearch->ToJson(), \",\"); // Field tipoespecial\n\t\t$sFilterList = ew_Concat($sFilterList, $this->email_contacto->AdvancedSearch->ToJson(), \",\"); // Field email_contacto\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "public function search(Request $request)\n {\n if(!$request->has('query')) {\n return response()->json(['message' => 'Please type a keyword.']);\n }\n\n $userTenant = Auth::userTenant();\n $user = Auth::user();\n\n $searchableModelNameSpace = 'App\\\\Models\\\\';\n $result = [];\n // Loop through the searchable models.\n foreach (config('scout.searchableModels') as $model) {\n $modelClass = $searchableModelNameSpace.$model;\n $modelService = app($model.'Ser');\n\n if($model == 'Task') {\n $allowedModels = $modelService->searchForUserTenant($userTenant, $request->get('query'))->get();\n } else {\n $foundModels = $modelClass::search($request->get('query'))->get();\n if ($model === 'Comment') {\n $foundModels->where('groupId', '!=', null)->toArray();\n }\n $policy = app()->make('App\\Policies\\V2\\\\' . $model . 'Policy');\n $allowedModels = $foundModels->filter(function(BaseModel $foundModel) use($user, $policy) {\n return $policy->getAccess($user, $foundModel);\n });\n }\n\n $result[Str::lower($model) . 's'] = $allowedModels;\n }\n\n $responseData = ['message' => 'Keyword(s) matched!', 'results' => $result, 'pagination' => ['more' => false]];\n $responseHeader = Response::HTTP_OK;\n if (!count($result)) {\n $responseData = ['message' => 'No results found, please try with different keywords.'];\n $responseHeader = Response::HTTP_NOT_FOUND;\n }\n\n return response()->json($responseData, $responseHeader);\n }", "public function getAndFilter() {\n\t\treturn $this->db->getAndFilter();\n\t}" ]
[ "0.6745192", "0.6745192", "0.6607936", "0.6480248", "0.6380478", "0.6346251", "0.6309924", "0.6302481", "0.62549895", "0.62511677", "0.62511677", "0.6111791", "0.60769993", "0.60728127", "0.60465515", "0.60351735", "0.6033834", "0.601554", "0.5982608", "0.59806865", "0.5979308", "0.5970091", "0.59315383", "0.5928182", "0.59239197", "0.5891605", "0.588925", "0.5849558", "0.58478904", "0.58265656", "0.5818011", "0.5813345", "0.5808009", "0.5790819", "0.57766616", "0.57694167", "0.5765023", "0.57642305", "0.57522315", "0.5740738", "0.5738047", "0.5727545", "0.5724201", "0.5723084", "0.57225823", "0.5721401", "0.5718913", "0.5714439", "0.5712011", "0.5707315", "0.5694636", "0.5680138", "0.56711453", "0.5670484", "0.56703377", "0.56703377", "0.56703377", "0.5669673", "0.56673825", "0.56659126", "0.5656451", "0.5651109", "0.56498116", "0.564325", "0.5635642", "0.5633513", "0.56310356", "0.56235486", "0.56176996", "0.5612909", "0.560956", "0.5595046", "0.5579938", "0.557241", "0.5556209", "0.5550101", "0.55487776", "0.5547998", "0.5547349", "0.5535324", "0.5534813", "0.55342954", "0.55319065", "0.5525128", "0.55199116", "0.5518253", "0.55144674", "0.5509604", "0.55057275", "0.550087", "0.550019", "0.54966915", "0.54966915", "0.54966915", "0.54954666", "0.54937917", "0.5492664", "0.5492298", "0.5490264", "0.5489261", "0.54850507" ]
0.0
-1
Display a listing of content.
public function index($resourceable, $id, Section $section) { save_resource_url(); $section->load('sections'); return $this->view('resources.sections.components.section_components')->with('section', $section); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listContent()\n {\n }", "public function renderListContent() {}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function index() {\n\t\t$ids = $this->CmsFrontpage->find('list', array(\n\t\t\t'fields' => array(\n\t\t\t\t$this->modelClass . '.id',\n\t\t\t\t$this->modelClass . '.id'\n\t\t\t)\n\t\t));\n\n\t\t$contents = $this->CmsFrontpage->CmsContent->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'CmsContent.id' => $ids\n\t\t\t),\n\t\t\t'order' => $this->CmsFrontpage->CmsContent->_order\n\t\t));\n\n\t\t$this->set('contents', $contents);\n\t\t$this->render('index', null, App::pluginPath('Cms') . 'views' . DS . 'contents' . DS . 'index.ctp');\n\t}", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function view(){\n\t\t$this->buildListing();\n\t}", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function displayContentOverview() {}", "public function index()\n {\n return view('admin.page_contents.page_content_list');\n }", "public function showList()\n {\n // Get posts datas\n $postList = $this->currentModel->getListWithAuthor();\n // Loop to find any existing comments attached to each post\n for ($i = 0; $i < count($postList); $i ++) {\n // Retrieve (or not) single post comments\n $postComments = $this->currentModel->getCommentListForSingle($postList[$i]->id);\n // Comments are found for a post.\n if ($postComments != false) {\n // Add temporary param \"postComments\" to object\n $postList[$i]->postComments = $postComments;\n }\n // Retrieve single post images\n $postImages = $this->currentModel->getImageListForSingle($postList[$i]->id);\n // Images are found for a post.\n if ($postImages != false) {\n // Add temporary param \"postImages\" to object\n $postList[$i]->postImages = $postImages;\n }\n }\n $varsArray = [\n 'metaTitle' => 'Posts list',\n 'metaDescription' => 'Here, you can follow our news and technical topics.',\n 'imgBannerCSSClass' => 'post-list',\n 'postList' => $postList\n ];\n echo $this->page->renderTemplate('Blog/Post/post-list.tpl', $varsArray);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Content::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function actionList()\n {\n $this->adminOnly();\n\n $pages = $this->findAll();\n return $this->render('@custom_pages/views/common/list', [\n 'pages' => $pages,\n 'label' => Yii::createObject($this->getPageClassName())->getLabel(),\n 'subNav' => \\humhub\\modules\\custom_pages\\widgets\\ContainerPageMenu::widget()\n ]);\n }", "public function actionIndex()\n {\n\n $dataProvider = new ActiveDataProvider([\n 'query' => Content::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function showList(): void\n {\n \n $admin = filter_input(INPUT_GET, 'admin');\n $type = (isset($admin)) ? 'admin' : 'front';\n \n $path = 'posts-list';\n \n switch($type)\n {\n case 'front':\n $pageTitle = 'News';\n $condition = 'status = '.self::STATUS_APPROVED.' AND publication_date <= NOW()'; // only approved and published posts\n $order = 'publication_date DESC';\n $filter_com = true; // count only approved comments in getComments function\n break;\n case 'admin':\n $this->checkAccess(); // redirect to login page if not connected\n $pageTitle = 'Gérer les posts';\n $condition = '1 = 1';\n // If user is not admin, he can only see his own posts\n if(!($this->isAdmin())) $condition = 'author = '.$_SESSION['user_id'];\n $order = 'last_update_date DESC';\n $filter_com = false; // count all comments (= approved or not) in getComments function\n break;\n }\n\n $posts = $this->model->findAll($condition, $order);\n\n foreach ($posts as $post)\n { \n $post->nb_comments = $post->getComments($filter_com, true); // get the number of comments on the post (only approved ones in public list)\n }\n\n $this->display($type, $path, $pageTitle, compact('posts'));\n }", "public function Index() {\n $content = new CMContent();\n $this->views->SetTitle('Content Controller')\n ->AddInclude(__DIR__ . '/index.tpl.php', array(\n 'contents' => $content->ListAll(),\n ));\n }", "public function display() {\n\t\t$singular = $this->_args['singular'];\n\n\t\t$data_attr = '';\n\n\t\tif ( $singular ) {\n\t\t\t$data_attr = \" data-wp-lists='list:$singular'\";\n\t\t}\n\n\t\t$this->display_tablenav( 'top' );\n\n?>\n<div class=\"wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>\">\n<?php\n\t$this->screen->render_screen_reader_content( 'heading_list' );\n?>\n\t<div id=\"the-list\"<?php echo $data_attr; ?>>\n\t\t<?php $this->display_rows_or_placeholder(); ?>\n\t</div>\n</div>\n<?php\n\t\t$this->display_tablenav( 'bottom' );\n\t}", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "function listing() {\r\n\r\n }", "public function index()\n {\n //Отобразить список материалов, которые уже добавлены\n $this->title = Lang::get('ru.manager_articles');\n\n //выбор статей из бд коллекции моделей\n $articles = $this->getArticles();\n //формируем контент - with - передать переменные\n $this->content = view(config('settings.theme') . '.admin.articles_content')->with('articles', $articles)->render();\n\n\n return $this->renderOut();\n }", "abstract protected function displayContent();", "public function indexAction() {\n $this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer();\n if (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n\n $viewer_id = $viewer->getIdentity();\n if (!empty($viewer_id)) {\n $this->view->level_id = $viewer->level_id;\n } else {\n $this->view->level_id = 0;\n }\n\n // Get subject and check auth\n $list = Engine_Api::_()->core()->getSubject('list_listing');\n $this->view->list = $list;\n $delete_id = $this->_getParam('delete_id');\n if (!empty($delete_id)) {\n $this->delete($delete_id);\n }\n\n $table = Engine_Api::_()->getDbTable('reviews', 'list');\n $select = $table->select()\n ->where('listing_id = ?', $list->getIdentity())\n ->order('modified_date DESC');\n\n $this->view->paginator = $paginator = Zend_Paginator::factory($select);\n $paginator->setItemCountPerPage(10);\n $this->view->paginator = $paginator->setCurrentPageNumber($this->_getParam('page'));\n\n // Do not render if nothing to show and not viewer\n if ($paginator->getTotalItemCount() <= 0 && !$viewer->getIdentity()) {\n return $this->setNoRender();\n }\n\n // Add count to title if configured\n if ($this->_getParam('titleCount', false) && $paginator->getTotalItemCount() > 0) {\n $this->_childCount = $paginator->getTotalItemCount();\n }\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function printlist(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t$this->title = 'Media list';\t\t\r\n\t\treturn $this->renderWith(array('Media_printresults','Print'));\r\n\t}", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function story_list()\n\t{\n\t\t$data['page']='Story List';\n\t\t$data['stories_list']=$this->stories->get_all();\n\t\t$view = 'admin/stories/admin_stories_list_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "public function index()\n {\n return Admin::content(function (Content $content) {\n\n $content->header(__('cms.entries.index_header'));\n $content->description(__('cms.entries.index_description'));\n\n $content->body($this->grid());\n });\n }", "public function index()\n {\n $contents = Content::all();\n\n return ContentResource::collection($contents);\n }", "public function index()\n {\n $this->title = 'Менеджер статей блога';\n $articles = $this->getArticles();\n $this->content = view('admin.articles_content')->with('articles', $articles)->render();\n\n return $this->renderOutput();\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function listing() {\n check_access($this->session->userdata('role_id'),3);\n \n $data = array();\n $data['title'] = \"Day Listings\";\n $data['content'] = \"admin/dayopenclose/listing\";\n $this->load->view(ADMIN_BODY, $data);\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "function index()\n {\n \n $data = array();\n $content = $this->load->view('categories/category_listing.php', $data, true);\n $this->load->view('main', array('content' => $content));\n }", "public function viewlistAction()\n\t{\n\t\t$view = new ViewModel();\n\t\t// this is not needed since it matches \"module/controller/action\"\n\t\t// $view->setTemplate('content/article/view');\n\t\t$article = 'var article';\n\t\t$articleView = new ViewModel(array(\n\t\t\t'article' => $article\n\t\t));\n\t\t$articleView->setTemplate('content/article');\n\t\t$primarySidebarView = new ViewModel();\n\t\t$primarySidebarView->setTemplate('content/main-sidebar');\n\t\t$config = $this->getServiceLocator()->get('Config');\n\t\t$dir = $config['settings']['audiodata'];\n\t\tif (file_exists($dir)) {\n\t\t\t$files = $this->dirToArray($dir);\n\t\t\tkrsort($files);\n\t\t}\n\t\t// $filelistView = new ViewModel();\n\t\t$filelistView = new ViewModel(array(\n\t\t\t'files' => $files,\n\t\t\t'dir' => $dir\n\t\t));\n\t\t$filelistView->setTemplate('audio/filelist');\n\t\t$secondarySidebarView = new ViewModel();\n\t\t$secondarySidebarView->setTemplate('content/secondary-sidebar');\n\t\t$sidebarBlockView = new ViewModel();\n\t\t$sidebarBlockView->setTemplate('content/block');\n\t\t$secondarySidebarView->addChild($sidebarBlockView, 'block');\n\t\t$view->addChild($articleView, 'article')->addChild($primarySidebarView, 'sidebar_primary')->addChild($filelistView, 'filelist')->addChild($secondarySidebarView, 'sidebar_secondary');\n\t\t\n\t\treturn $view;\n\t}", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function liste()\n {\n $discs = $this->LoadModel('Disc');\n $discDetail = $discs->info_record();\n $this->render('liste', [\n 'discs' => $discDetail\n ]);\n }", "static function content_listing(){\n\n\t\tif(Indira::get('modules.sections.active') && Indira::get('modules.posts.active') || Indira::get('modules.blog.active')){\n\n\n\t\t\tif(Indira::get('modules.sections.active') && Indira::get('modules.posts.active')){\n\t\t\t\t\n\t\t\t\t$data[\"sections\"] \t= \tSections::where('lang', '=', Session::get('lang'))\n\t\t\t\t\t\t\t\t\t\t->order_by('order')\n\t\t\t\t\t\t\t\t\t\t->add('id', 'count', 'qty')\n\t\t\t\t\t\t\t\t\t\t->get();\n\n\t\t\t\t$data[\"posts\"] \t\t= \tPosts::where('lang', '=', Session::get('lang'))\n\t\t\t\t\t\t\t\t\t\t->and_where('published', '=', 'true')\n\t\t\t\t\t\t\t\t\t\t->and_where('access', '<=', Session::get('user.access'))\n\t\t\t\t\t\t\t\t\t\t->group('section', array('order', 'ASC'))\n\t\t\t\t\t\t\t\t\t\t->get();\n\t\t\t}\n\n\t\t\tif(Indira::get('modules.blog.active')){\n\n\t\t\t\t$data[\"blogs\"] \t\t= \tBlog::where('lang', '=', Session::get('lang'))\n\t\t\t\t\t\t\t\t\t\t->and_where('published', '=', 'true')\n\t\t\t\t\t\t\t\t\t\t->and_where('access', '<=', Session::get('user.access'))\n\t\t\t\t\t\t\t\t\t\t->order_by('order')\n\t\t\t\t\t\t\t\t\t\t->limit(0, 10)\n\t\t\t\t\t\t\t\t\t\t->get();\n\t\t\t}\n\n\t\t\tif(isset($data[\"sections\"]) && isset($data[\"posts\"]) && $data[\"sections\"] && $data[\"posts\"]){\n\n\t\t\t\t\n\t\t\t\t$data[\"posts_link\"] \t= \tIndira::get('modules.posts.link');\n\t\t\t\t$data[\"sections_link\"] \t= \tIndira::get('modules.sections.link');\n\t\t\t\t$data[\"page\"] \t\t\t= \t'templates::content_listing';\n\n\t\t\t}elseif(isset($data[\"blog\"]) && $data[\"blog\"]){\n\n\t\t\t\t$data[\"blog_link\"] \t\t= \tIndira::get('modules.blog.link');\n\t\t\t\t$data[\"page\"] \t\t\t= \t'templates::content_listing';\n\t\t\t\n\t\t\t}else{\n\n\t\t\t\t$data[\"page\"] = 'templates::assets.no_content';\n\t\t\t}\n\n\t\t\t$data[\"images\"] = Media::get(array('id', 'formats'));\n\n\t\t\treturn (Request::ajax()) ? View::make($data[\"page\"], $data) : View::make('templates::main', $data);\n\n\t\t}else{\n\n\t\t\treturn void;\n\t\t}\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index() {\n $this->view->title = 'Egyéb tartalom oldal';\n $this->view->description = 'Egyéb tartalom oldal description';\n\n\n $this->view->js_link[] = $this->make_link('js', ADMIN_JS, 'pages/content.js');\n\n $this->view->all_content = $this->content_model->all_content();\n\n $this->view->render('content/tpl_content');\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n return $this->setNoRender();\n }\n\n //GET SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject('sitereview_listing');\n Engine_Api::_()->sitereview()->setListingTypeInRegistry($sitereview->listingtype_id);\n $sitereviewPhotoCarousel = Zend_Registry::isRegistered('sitereviewPhotoCarousel') ? Zend_Registry::get('sitereviewPhotoCarousel') : null;\n $this->view->listingType = $listingType = Zend_Registry::get('listingtypeArray' . $sitereview->listingtype_id);\n $this->view->listingtype_id = $sitereview->listingtype_id;\n $this->view->album = $album = $sitereview->getSingletonAlbum();\n $this->view->photo_paginator = $photo_paginator = $album->getCollectiblesPaginator();\n $this->view->total_images = $photo_paginator->getTotalItemCount();\n $minMum = $this->_getParam('minMum', 0);\n \n if (empty($this->view->total_images) || $this->view->total_images < $minMum || empty($sitereviewPhotoCarousel)) {\n return $this->setNoRender();\n }\n \n $this->view->itemCount = $itemCount = $this->_getParam('itemCount', 3);\n $this->view->includeInWidget = $this->_getParam('includeInWidget', null);\n $photo_paginator->setItemCountPerPage(100);\n \n if ($this->view->includeInWidget) {\n $this->getElement()->removeDecorator('Title');\n $this->getElement()->removeDecorator('Container');\n }\n }", "public function index()\n {\n\t\t$totalComments = count($this->model->findAllWithTheirAuthor(\"p_datetime DESC\"));\n\t\t$itemPerpage = 5;\n\t\t$totalPages = ceil($totalComments/$itemPerpage); //ceil around superior number\n\t\t\n\t\tif(isset($_GET['page']) AND !empty($_GET['page']) AND $_GET['page'] > 0)\n {\n $_GET['page'] = intval($_GET['page']); //return an entier value\n $currentPage = $_GET['page'];\n }\n else\n {\n $currentPage = 1;\n\t\t}\n\t\t$start = ($currentPage - 1)*$itemPerpage;\n $posts = $this->model->countItems($start, $itemPerpage, \"p_datetime\");\n\t\t\n\t\t$pageTitle = \"Articles\";\n\t\t\n\t\t$description = \"Liste des articles\";\n\n\t\t$author = \"Invest People\";\n\n \\Renderer::render('post/index', compact('pageTitle', 'posts', 'description', 'author', 'totalPages')); \n\t}", "public function Index() {\n $content = new CMContent();\n $modules = new CMModules();\n $controllers = $modules->AvailableControllers();\n $this->views->SetTitle('Sida')\n ->AddInclude(__DIR__ . '/index.tpl.php', array(\n 'content' => null,\n ), 'primary')\n ->AddInclude(__DIR__ . '/../adminsidebar.tpl.php', array('is_authenticated'=>$this->user['isAuthenticated'], \n 'user'=>$this->user,'controllers'=>$controllers,'contents'=>$content->ListAll(array('type'=>'post', 'order-by'=>'title', 'order-order'=>'DESC')),), 'sidebar');\n }", "public function index() {\n // $header = 'Articles';\n\n // возврязает все выбранное из таблицы\n $articles = Article::select(['id','title','description'])->get();\n // dump($articles);\n\n return view('page')->with([\n 'message'=>$this->message,\n 'header'=>$this->header,\n 'articles'=>$articles\n ]);\n }", "public function actionList() {\n $this->_getList();\n }", "public function listing() \r\n\t{\r\n\t\t$data['header']['title'] = 'Country listing';\r\n\t\t$data['footer']['scripts']['homescript.js'] = 'home';\r\n\t\t$data['view_name'] = 'country/country_listing_view';\r\n\t\t$data['view_data'] = $this->country->get();\r\n\t\t$this->load->view('country/page_view', $data);\r\n\t}", "public function index()\n {\n $this->data['list'] = $this->cms_page_model->get_all();\n \n $this->template->load_asset(array('datatable', 'dialog', 'bootstrap_switch'));\n \n $this->template->build('admin/cms/page/index', $this->data);\n }", "function moduleContent()\t{\n\t\t$this->content .= $this->makeList();\n\t}", "public function index() {\n $this->html->displayHeaderAndFooter(true);\n $this->load_content();\n }", "public function index(){\n $this->title = 'Articles management';\n $articles = $this->getArticles();\n $this->content = view(env('THEME').'.admin.articles_content')->with('articles', $articles)->render();\n return $this->renderOutput();\n }", "public function index()\n {\n return view('list_wrapper', [\n 'entityType' => 'qbd',\n 'datatable' => new QBDDatatable(),\n 'title' => mtrans('qbd', 'qbd_list'),\n ]);\n }", "public function index()\r\n {\r\n $this->page_list_grid();\r\n }", "public function actionIndex()\n {\n $criteria = new CDbCriteria();\n $criteria->compare('status', Article::STATUS_PUBLISHED);\n $criteria->order = 'article_id DESC';\n \n $count = Article::model()->count($criteria);\n \n $pages = new CPagination($count);\n $pages->pageSize = 10;\n $pages->applyLimit($criteria);\n \n $articles = Article::model()->findAll($criteria);\n \n $this->setData(array(\n 'pageMetaTitle' => $this->data->pageMetaTitle.' | '.Yii::t('articles', 'Helpful articles'), \n 'pageBreadcrumbs' => array()\n ));\n\n $this->render('index', compact('articles', 'pages'));\n }", "public function renderList()\n {\n $this->template->articles = $this->articleManager->getArticles();\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n\t\t{\n\t\t\t$pageHeader = \tarray( 'pagetitle' => 'Page Listing',\n\t\t\t'slug'=>'pages',\n\t\t\t'font_icon'=>'book',\n\t\t\t);\n\t\t\t\n\t\t\t//Get All pages data\n\t\t\t$data['pagesdata'] = $this->AdminPageModel->GetAllPages();\n\t\t\t\n\t\t\t$this->load->view('admin/share-template/header', $pageHeader);\n\t\t\t$this->load->view('admin/admin_pages_listing_view', $data);\n\t\t\t$this->load->view('admin/share-template/footer');\n\t\t\t\n\t\t}", "public function index()\n\t{\n\t\t$snippets = Snippet::paginate(10);\n\t\t// return $snippets;\n\t\treturn View::make('admin.snippets')\n\t\t\t->with('snippets', $snippets);\n\t}", "private function getContentList(){\n if(isset($_GET['content_search']) && strlen($_GET['content_search']) > 0){\n $searchstring = $this->setSearchstring();\n };\n\n //Set per page cookie\n if(isset($_GET['limit'])){\n $this->setPerPage(intval($_GET['limit']));\n }else if($_COOKIE[$this->main->module_mode.'_list_per_page_limit']){\n $this->per_page = intval($_COOKIE[$this->main->module_mode.'_list_per_page_limit']);\n };\n\n $this->main->current_per_page = $this->per_page;\n\n if(strlen($searchstring) > 0){\n $where = \" WHERE \".$searchstring;\n };\n\n $counter_query = \"\n SELECT\n count(*) AS `count`\n FROM\n `\".$this->main->db->quote($this->current_module_table).\"`\n \";\n\n $counter_result = mysql_fetch_row($this->main->db->query($counter_query));\n $limit = $this->main->getLimitsForList($counter_result[0], $this->per_page);\n \n $query = \"\n SELECT\n `id`,\n `name`,\n `publish`,\n `sort`\n \".$this->getAdditionalListFields().\"\n FROM\n `\".$this->main->db->quote($this->current_module_table).\"`\n \".$where.$this->main->getSortingParams().\"\n LIMIT\n \".$limit[0].\", \".$limit[1];\n\n return $this->main->db->assocMulti($query);\n }", "public function index()\n {\n $data = [\n 'title' => 'Category list',\n 'path' => 'category/list_category_view',\n 'data' => [\n 'categories' => $this->category_model->readCategories(),\n ]\n ];\n\n $this->load->view('template/template_view', $data);\n }", "public function index(){\r\n $this->display(index);\r\n }", "public function list_page_content () {\n // Check permissions\n if ( ! current_user_can( 'list_users' ) ) {\n return;\n }\n\n // Main listing query\n $this->list_query_users();\n\n // Set urls for column sorting links.\n $sort_link_username = $this->sort_link( 'user_name', $this->orderby, $this->order );\n $sort_link_displayname = $this->sort_link( 'display_name', $this->orderby, $this->order );\n\n // Include template\n include CTAL_PATH.'/admin/templates/users-page.php';\n }", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function listView()\r\n {\r\n $data['page'] = lang('jobs');\r\n $data['menu'] = 'jobs';\r\n $pagedata['companies'] = objToArr($this->AdminCompanyModel->getAll());\r\n $pagedata['departments'] = objToArr($this->AdminDepartmentModel->getAll());\r\n $this->load->view('admin/layout/header', $data);\r\n $this->load->view('admin/jobs/list', $pagedata);\r\n }", "public function index()\n {\n $page_contents = PageContents::get();\n return view('admin.page_contents.index',compact('page_contents'));\n }", "public function index() {\n $this->data['posts'] = $this->blog_model->get_many_by(['status' => 1]);\n\n $this->template->build('public/blog/index', $this->data);\n }", "public function listview() {\n\n $photo_list = Doctrine::getTable('Photo')->findAll();\n $data['photo_list'] = $photo_list;\n\n $data['view_name'] = \"photo_list_view\";\n $this->load->view(\"admin/common/template\", $data);\n }", "public function index()\n {\n if (null != $this->request->ifParameter(\"id\")) {\n $items_current_page = $this->request->getParameter(\"id\");\n } else {\n $items_current_page = 1;\n }\n $items = $this->item->getItemsFront($items_current_page);\n $previous_page = $items_current_page - 1;\n $next_page = $items_current_page + 1;\n $number_of_items_pages = $this->calculate->getNumberOfPagesOfExtHome();\n $number_of_items = $this->calculate->getTotalOfItemsHome();\n $number_of_cards = $this->calculate->getTotalOfCards();\n $number_of_links = $this->calculate->getTotalOfLinks();\n $this->generateView(array(\n 'items' => $items,\n 'number_of_items' => $number_of_items,\n 'number_of_cards' => $number_of_cards,\n 'number_of_links' => $number_of_links,\n 'items_current_page' => $items_current_page,\n 'previous_page' => $previous_page,\n 'next_page' => $next_page,\n 'number_of_items_pages' => $number_of_items_pages\n ));\n }", "public function index()\n {\n $articles = Article::latest()->published()->get();\n\n return view('admin.content', compact('articles'));\n }", "public function index()\n {\n\n return view('admin.category.listing');\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "function _syndicated_content_listings_page()\n{\n}", "public function index()\n {\n $content = content::all();\n return view('front-end.index', compact('content'));\n }", "public function get_list() {\n //Grab all of the posts which are set as 'viewable'\n $posts = Post::where_status('1')->paginate($this->perPage);\n\n //If we find some posts\n if(!is_null($posts)) {\n //Create a data array\n $data = array(\n 'pageTitle' => 'title',\n 'pageDescription' => 'description',\n 'posts' => $posts,\n );\n\n //Build the view\n \t\treturn View::make('public.post.list', $data);\n }\n //No posts found\n else {\n return 'todo :: Add message here to say no post posts in the system';\n }\n\t}", "public function indexAction()\n {\n $posts = PostService::readAll();\n\n View::renderTemplate('Posts/index.html', [\n 'posts' => $posts\n ]);\n }", "public function index()\n {\n $contentBlocks = $this->contentBlockRepository->paginateAll();\n\n return view('contentBlocks.index')->with('contentBlocks', $contentBlocks);\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function index()\n {\n \t$contents = Content::orderBy('created_at', 'desc')->paginate(10);\n $subjects = Subject::orderBy('subject_title','asc')->get();\n return view('/backend/index_contents', compact('contents','subjects'));\n }", "public function index(){\n \n $this->display();\n }", "public function index()\n {\n TypiCMS::setModel($this->repository->getModel());\n\n $page = Input::get('page');\n $itemsPerPage = Config::get('events::public.itemsPerPage');\n\n $data = $this->repository->byPage($page, $itemsPerPage, array('translations'));\n\n $models = Paginator::make($data->items, $data->totalItems, $itemsPerPage);\n\n $this->layout->content = View::make('events.public.index')->withModels($models);\n }", "public function index()\n {\n $this->view_all_posts();\n }", "public function index() {\n\t\t$data = $this->load_module_info ();\n\t\t\n\t\t$this->layout->display_admin ( $this->folder . $this->module . \"-list\", $data );\n\t}", "public function actionIndex()\n\t{\n\t\t$this->session->delete('page.lastSearch');\n\n\t\treturn $this->template->partial('content', 'pages/index', [\n\t\t\t'pages' => Page::findAll('SELECT * FROM nerd_pages'),\n\t\t]);\n\t}", "public function lists()\n\t{\n\t\t$this->OnlyAdmin();\n\t\t$info = $this->TicketModel->getList('desc');\n\t\t$this->loadView('views/ticket', array('info'=> $info), true);\n\t}", "public function index()\n {\n $status = Status::paginate(10);\n return view('firetakeaway::content.' . $this->route . '.index', compact('status'));\n }", "public function index()\n {\n //$crawlcontents = $this->crawlcontent->all();\n\n return view('crawl::admin.crawlcontents.crawl', compact(''));\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function newslist()\n {\n $this -> load -> model('news_model');\n $news_result = $this -> news_model -> get_all_news();\n $data = array(\n 'list' => $news_result,\n );\n $this->load->view('home/newslist', $data);\n }", "public function listPosts()\n {\n $PostsRepository = new PostsRepository();\n $posts = $PostsRepository->getAllPosts();\n require 'src/View/postListView.php';\n }", "public function index()\n {\n $titles = $this->titles->paginate(10);\n\n return view('backend.titles.index',compact('titles'));\n }", "public function lists()\n {\n $data['id'] = Input::get('gallery_id');\n $data['gallery'] = PhotoGallery::where('id', '=', $data['id'])->first();\n $data['thisPageId'] = $this->thisPageId;\n $data['thisModuleId'] = $this->thisModuleId;\n $data['photos'] = $this->photo->listByGallery($data['id']);\n\n return view('cms.modules.multicms.photos_listall', $data);\n }", "public function indexAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::BLOGS);\n $this->_useAdditionalContent = true;\n \n \t$page = $this->_request->getParam('page');\n \t$table = new Blog();\n \t$select = $table->getActiveBlogSelect();\n \t$activeBlogs = $this->_helper->dataPaginator($select, $page, 'commonviews/pagination.phtml', BLOGS_PER_PAGE);\n \t$this->view->activeBlogs = $activeBlogs;\n \t$this->_helper->layout->setLayout('two-columns');\n \t$this->view->wrapperIsCard = false;\n $this->view->separateFirstContentCardHeader = true;\n }", "public function searchList() {\n include 'views/search-list.php';\n }" ]
[ "0.7871713", "0.7623326", "0.7553536", "0.7463454", "0.746067", "0.7341932", "0.7324924", "0.71986073", "0.71625435", "0.7082724", "0.70504284", "0.70407856", "0.70377886", "0.70255566", "0.698529", "0.69520384", "0.6926845", "0.6926845", "0.6926845", "0.6885061", "0.6880269", "0.6830607", "0.6813093", "0.68022805", "0.6801372", "0.67873937", "0.67533076", "0.67336965", "0.67291373", "0.67288464", "0.67196405", "0.6713494", "0.6706104", "0.669304", "0.6692425", "0.6692396", "0.6690957", "0.6674896", "0.6673133", "0.66629195", "0.6661647", "0.66547006", "0.6653495", "0.66483533", "0.6623707", "0.6618807", "0.66159165", "0.6602468", "0.6594998", "0.65938574", "0.65935385", "0.6593125", "0.65896213", "0.6586437", "0.6585024", "0.65829223", "0.65765196", "0.6575982", "0.6574117", "0.656923", "0.65466285", "0.6546628", "0.6544982", "0.6544976", "0.65363854", "0.6534678", "0.6534086", "0.65211403", "0.6505937", "0.65000594", "0.6492438", "0.64912397", "0.6490057", "0.648742", "0.6480441", "0.6474211", "0.64701027", "0.64687526", "0.64645946", "0.6455212", "0.64540225", "0.6453288", "0.6446567", "0.6436262", "0.64352465", "0.6430039", "0.6429433", "0.6428025", "0.64233476", "0.6421463", "0.6417208", "0.6415868", "0.64136297", "0.6410519", "0.64049375", "0.6404318", "0.64014536", "0.6399765", "0.6397858", "0.6397569", "0.6395543" ]
0.0
-1
Display a listing of content.
public function show() { return $this->view('resources.sections.components.index')->with('items', Content::with('sections')->get()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listContent()\n {\n }", "public function renderListContent() {}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function index() {\n\t\t$ids = $this->CmsFrontpage->find('list', array(\n\t\t\t'fields' => array(\n\t\t\t\t$this->modelClass . '.id',\n\t\t\t\t$this->modelClass . '.id'\n\t\t\t)\n\t\t));\n\n\t\t$contents = $this->CmsFrontpage->CmsContent->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'CmsContent.id' => $ids\n\t\t\t),\n\t\t\t'order' => $this->CmsFrontpage->CmsContent->_order\n\t\t));\n\n\t\t$this->set('contents', $contents);\n\t\t$this->render('index', null, App::pluginPath('Cms') . 'views' . DS . 'contents' . DS . 'index.ctp');\n\t}", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function view(){\n\t\t$this->buildListing();\n\t}", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function displayContentOverview() {}", "public function index()\n {\n return view('admin.page_contents.page_content_list');\n }", "public function showList()\n {\n // Get posts datas\n $postList = $this->currentModel->getListWithAuthor();\n // Loop to find any existing comments attached to each post\n for ($i = 0; $i < count($postList); $i ++) {\n // Retrieve (or not) single post comments\n $postComments = $this->currentModel->getCommentListForSingle($postList[$i]->id);\n // Comments are found for a post.\n if ($postComments != false) {\n // Add temporary param \"postComments\" to object\n $postList[$i]->postComments = $postComments;\n }\n // Retrieve single post images\n $postImages = $this->currentModel->getImageListForSingle($postList[$i]->id);\n // Images are found for a post.\n if ($postImages != false) {\n // Add temporary param \"postImages\" to object\n $postList[$i]->postImages = $postImages;\n }\n }\n $varsArray = [\n 'metaTitle' => 'Posts list',\n 'metaDescription' => 'Here, you can follow our news and technical topics.',\n 'imgBannerCSSClass' => 'post-list',\n 'postList' => $postList\n ];\n echo $this->page->renderTemplate('Blog/Post/post-list.tpl', $varsArray);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Content::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function actionList()\n {\n $this->adminOnly();\n\n $pages = $this->findAll();\n return $this->render('@custom_pages/views/common/list', [\n 'pages' => $pages,\n 'label' => Yii::createObject($this->getPageClassName())->getLabel(),\n 'subNav' => \\humhub\\modules\\custom_pages\\widgets\\ContainerPageMenu::widget()\n ]);\n }", "public function actionIndex()\n {\n\n $dataProvider = new ActiveDataProvider([\n 'query' => Content::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function showList(): void\n {\n \n $admin = filter_input(INPUT_GET, 'admin');\n $type = (isset($admin)) ? 'admin' : 'front';\n \n $path = 'posts-list';\n \n switch($type)\n {\n case 'front':\n $pageTitle = 'News';\n $condition = 'status = '.self::STATUS_APPROVED.' AND publication_date <= NOW()'; // only approved and published posts\n $order = 'publication_date DESC';\n $filter_com = true; // count only approved comments in getComments function\n break;\n case 'admin':\n $this->checkAccess(); // redirect to login page if not connected\n $pageTitle = 'Gérer les posts';\n $condition = '1 = 1';\n // If user is not admin, he can only see his own posts\n if(!($this->isAdmin())) $condition = 'author = '.$_SESSION['user_id'];\n $order = 'last_update_date DESC';\n $filter_com = false; // count all comments (= approved or not) in getComments function\n break;\n }\n\n $posts = $this->model->findAll($condition, $order);\n\n foreach ($posts as $post)\n { \n $post->nb_comments = $post->getComments($filter_com, true); // get the number of comments on the post (only approved ones in public list)\n }\n\n $this->display($type, $path, $pageTitle, compact('posts'));\n }", "public function Index() {\n $content = new CMContent();\n $this->views->SetTitle('Content Controller')\n ->AddInclude(__DIR__ . '/index.tpl.php', array(\n 'contents' => $content->ListAll(),\n ));\n }", "public function display() {\n\t\t$singular = $this->_args['singular'];\n\n\t\t$data_attr = '';\n\n\t\tif ( $singular ) {\n\t\t\t$data_attr = \" data-wp-lists='list:$singular'\";\n\t\t}\n\n\t\t$this->display_tablenav( 'top' );\n\n?>\n<div class=\"wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>\">\n<?php\n\t$this->screen->render_screen_reader_content( 'heading_list' );\n?>\n\t<div id=\"the-list\"<?php echo $data_attr; ?>>\n\t\t<?php $this->display_rows_or_placeholder(); ?>\n\t</div>\n</div>\n<?php\n\t\t$this->display_tablenav( 'bottom' );\n\t}", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "function listing() {\r\n\r\n }", "public function index()\n {\n //Отобразить список материалов, которые уже добавлены\n $this->title = Lang::get('ru.manager_articles');\n\n //выбор статей из бд коллекции моделей\n $articles = $this->getArticles();\n //формируем контент - with - передать переменные\n $this->content = view(config('settings.theme') . '.admin.articles_content')->with('articles', $articles)->render();\n\n\n return $this->renderOut();\n }", "abstract protected function displayContent();", "public function indexAction() {\n $this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer();\n if (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n\n $viewer_id = $viewer->getIdentity();\n if (!empty($viewer_id)) {\n $this->view->level_id = $viewer->level_id;\n } else {\n $this->view->level_id = 0;\n }\n\n // Get subject and check auth\n $list = Engine_Api::_()->core()->getSubject('list_listing');\n $this->view->list = $list;\n $delete_id = $this->_getParam('delete_id');\n if (!empty($delete_id)) {\n $this->delete($delete_id);\n }\n\n $table = Engine_Api::_()->getDbTable('reviews', 'list');\n $select = $table->select()\n ->where('listing_id = ?', $list->getIdentity())\n ->order('modified_date DESC');\n\n $this->view->paginator = $paginator = Zend_Paginator::factory($select);\n $paginator->setItemCountPerPage(10);\n $this->view->paginator = $paginator->setCurrentPageNumber($this->_getParam('page'));\n\n // Do not render if nothing to show and not viewer\n if ($paginator->getTotalItemCount() <= 0 && !$viewer->getIdentity()) {\n return $this->setNoRender();\n }\n\n // Add count to title if configured\n if ($this->_getParam('titleCount', false) && $paginator->getTotalItemCount() > 0) {\n $this->_childCount = $paginator->getTotalItemCount();\n }\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function printlist(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t$this->title = 'Media list';\t\t\r\n\t\treturn $this->renderWith(array('Media_printresults','Print'));\r\n\t}", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function story_list()\n\t{\n\t\t$data['page']='Story List';\n\t\t$data['stories_list']=$this->stories->get_all();\n\t\t$view = 'admin/stories/admin_stories_list_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "public function index()\n {\n return Admin::content(function (Content $content) {\n\n $content->header(__('cms.entries.index_header'));\n $content->description(__('cms.entries.index_description'));\n\n $content->body($this->grid());\n });\n }", "public function index()\n {\n $contents = Content::all();\n\n return ContentResource::collection($contents);\n }", "public function index()\n {\n $this->title = 'Менеджер статей блога';\n $articles = $this->getArticles();\n $this->content = view('admin.articles_content')->with('articles', $articles)->render();\n\n return $this->renderOutput();\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function listing() {\n check_access($this->session->userdata('role_id'),3);\n \n $data = array();\n $data['title'] = \"Day Listings\";\n $data['content'] = \"admin/dayopenclose/listing\";\n $this->load->view(ADMIN_BODY, $data);\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "function index()\n {\n \n $data = array();\n $content = $this->load->view('categories/category_listing.php', $data, true);\n $this->load->view('main', array('content' => $content));\n }", "public function viewlistAction()\n\t{\n\t\t$view = new ViewModel();\n\t\t// this is not needed since it matches \"module/controller/action\"\n\t\t// $view->setTemplate('content/article/view');\n\t\t$article = 'var article';\n\t\t$articleView = new ViewModel(array(\n\t\t\t'article' => $article\n\t\t));\n\t\t$articleView->setTemplate('content/article');\n\t\t$primarySidebarView = new ViewModel();\n\t\t$primarySidebarView->setTemplate('content/main-sidebar');\n\t\t$config = $this->getServiceLocator()->get('Config');\n\t\t$dir = $config['settings']['audiodata'];\n\t\tif (file_exists($dir)) {\n\t\t\t$files = $this->dirToArray($dir);\n\t\t\tkrsort($files);\n\t\t}\n\t\t// $filelistView = new ViewModel();\n\t\t$filelistView = new ViewModel(array(\n\t\t\t'files' => $files,\n\t\t\t'dir' => $dir\n\t\t));\n\t\t$filelistView->setTemplate('audio/filelist');\n\t\t$secondarySidebarView = new ViewModel();\n\t\t$secondarySidebarView->setTemplate('content/secondary-sidebar');\n\t\t$sidebarBlockView = new ViewModel();\n\t\t$sidebarBlockView->setTemplate('content/block');\n\t\t$secondarySidebarView->addChild($sidebarBlockView, 'block');\n\t\t$view->addChild($articleView, 'article')->addChild($primarySidebarView, 'sidebar_primary')->addChild($filelistView, 'filelist')->addChild($secondarySidebarView, 'sidebar_secondary');\n\t\t\n\t\treturn $view;\n\t}", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function liste()\n {\n $discs = $this->LoadModel('Disc');\n $discDetail = $discs->info_record();\n $this->render('liste', [\n 'discs' => $discDetail\n ]);\n }", "static function content_listing(){\n\n\t\tif(Indira::get('modules.sections.active') && Indira::get('modules.posts.active') || Indira::get('modules.blog.active')){\n\n\n\t\t\tif(Indira::get('modules.sections.active') && Indira::get('modules.posts.active')){\n\t\t\t\t\n\t\t\t\t$data[\"sections\"] \t= \tSections::where('lang', '=', Session::get('lang'))\n\t\t\t\t\t\t\t\t\t\t->order_by('order')\n\t\t\t\t\t\t\t\t\t\t->add('id', 'count', 'qty')\n\t\t\t\t\t\t\t\t\t\t->get();\n\n\t\t\t\t$data[\"posts\"] \t\t= \tPosts::where('lang', '=', Session::get('lang'))\n\t\t\t\t\t\t\t\t\t\t->and_where('published', '=', 'true')\n\t\t\t\t\t\t\t\t\t\t->and_where('access', '<=', Session::get('user.access'))\n\t\t\t\t\t\t\t\t\t\t->group('section', array('order', 'ASC'))\n\t\t\t\t\t\t\t\t\t\t->get();\n\t\t\t}\n\n\t\t\tif(Indira::get('modules.blog.active')){\n\n\t\t\t\t$data[\"blogs\"] \t\t= \tBlog::where('lang', '=', Session::get('lang'))\n\t\t\t\t\t\t\t\t\t\t->and_where('published', '=', 'true')\n\t\t\t\t\t\t\t\t\t\t->and_where('access', '<=', Session::get('user.access'))\n\t\t\t\t\t\t\t\t\t\t->order_by('order')\n\t\t\t\t\t\t\t\t\t\t->limit(0, 10)\n\t\t\t\t\t\t\t\t\t\t->get();\n\t\t\t}\n\n\t\t\tif(isset($data[\"sections\"]) && isset($data[\"posts\"]) && $data[\"sections\"] && $data[\"posts\"]){\n\n\t\t\t\t\n\t\t\t\t$data[\"posts_link\"] \t= \tIndira::get('modules.posts.link');\n\t\t\t\t$data[\"sections_link\"] \t= \tIndira::get('modules.sections.link');\n\t\t\t\t$data[\"page\"] \t\t\t= \t'templates::content_listing';\n\n\t\t\t}elseif(isset($data[\"blog\"]) && $data[\"blog\"]){\n\n\t\t\t\t$data[\"blog_link\"] \t\t= \tIndira::get('modules.blog.link');\n\t\t\t\t$data[\"page\"] \t\t\t= \t'templates::content_listing';\n\t\t\t\n\t\t\t}else{\n\n\t\t\t\t$data[\"page\"] = 'templates::assets.no_content';\n\t\t\t}\n\n\t\t\t$data[\"images\"] = Media::get(array('id', 'formats'));\n\n\t\t\treturn (Request::ajax()) ? View::make($data[\"page\"], $data) : View::make('templates::main', $data);\n\n\t\t}else{\n\n\t\t\treturn void;\n\t\t}\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index() {\n $this->view->title = 'Egyéb tartalom oldal';\n $this->view->description = 'Egyéb tartalom oldal description';\n\n\n $this->view->js_link[] = $this->make_link('js', ADMIN_JS, 'pages/content.js');\n\n $this->view->all_content = $this->content_model->all_content();\n\n $this->view->render('content/tpl_content');\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function Index() {\n $content = new CMContent();\n $modules = new CMModules();\n $controllers = $modules->AvailableControllers();\n $this->views->SetTitle('Sida')\n ->AddInclude(__DIR__ . '/index.tpl.php', array(\n 'content' => null,\n ), 'primary')\n ->AddInclude(__DIR__ . '/../adminsidebar.tpl.php', array('is_authenticated'=>$this->user['isAuthenticated'], \n 'user'=>$this->user,'controllers'=>$controllers,'contents'=>$content->ListAll(array('type'=>'post', 'order-by'=>'title', 'order-order'=>'DESC')),), 'sidebar');\n }", "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n return $this->setNoRender();\n }\n\n //GET SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject('sitereview_listing');\n Engine_Api::_()->sitereview()->setListingTypeInRegistry($sitereview->listingtype_id);\n $sitereviewPhotoCarousel = Zend_Registry::isRegistered('sitereviewPhotoCarousel') ? Zend_Registry::get('sitereviewPhotoCarousel') : null;\n $this->view->listingType = $listingType = Zend_Registry::get('listingtypeArray' . $sitereview->listingtype_id);\n $this->view->listingtype_id = $sitereview->listingtype_id;\n $this->view->album = $album = $sitereview->getSingletonAlbum();\n $this->view->photo_paginator = $photo_paginator = $album->getCollectiblesPaginator();\n $this->view->total_images = $photo_paginator->getTotalItemCount();\n $minMum = $this->_getParam('minMum', 0);\n \n if (empty($this->view->total_images) || $this->view->total_images < $minMum || empty($sitereviewPhotoCarousel)) {\n return $this->setNoRender();\n }\n \n $this->view->itemCount = $itemCount = $this->_getParam('itemCount', 3);\n $this->view->includeInWidget = $this->_getParam('includeInWidget', null);\n $photo_paginator->setItemCountPerPage(100);\n \n if ($this->view->includeInWidget) {\n $this->getElement()->removeDecorator('Title');\n $this->getElement()->removeDecorator('Container');\n }\n }", "public function index()\n {\n\t\t$totalComments = count($this->model->findAllWithTheirAuthor(\"p_datetime DESC\"));\n\t\t$itemPerpage = 5;\n\t\t$totalPages = ceil($totalComments/$itemPerpage); //ceil around superior number\n\t\t\n\t\tif(isset($_GET['page']) AND !empty($_GET['page']) AND $_GET['page'] > 0)\n {\n $_GET['page'] = intval($_GET['page']); //return an entier value\n $currentPage = $_GET['page'];\n }\n else\n {\n $currentPage = 1;\n\t\t}\n\t\t$start = ($currentPage - 1)*$itemPerpage;\n $posts = $this->model->countItems($start, $itemPerpage, \"p_datetime\");\n\t\t\n\t\t$pageTitle = \"Articles\";\n\t\t\n\t\t$description = \"Liste des articles\";\n\n\t\t$author = \"Invest People\";\n\n \\Renderer::render('post/index', compact('pageTitle', 'posts', 'description', 'author', 'totalPages')); \n\t}", "public function index() {\n // $header = 'Articles';\n\n // возврязает все выбранное из таблицы\n $articles = Article::select(['id','title','description'])->get();\n // dump($articles);\n\n return view('page')->with([\n 'message'=>$this->message,\n 'header'=>$this->header,\n 'articles'=>$articles\n ]);\n }", "public function actionList() {\n $this->_getList();\n }", "public function listing() \r\n\t{\r\n\t\t$data['header']['title'] = 'Country listing';\r\n\t\t$data['footer']['scripts']['homescript.js'] = 'home';\r\n\t\t$data['view_name'] = 'country/country_listing_view';\r\n\t\t$data['view_data'] = $this->country->get();\r\n\t\t$this->load->view('country/page_view', $data);\r\n\t}", "public function index()\n {\n $this->data['list'] = $this->cms_page_model->get_all();\n \n $this->template->load_asset(array('datatable', 'dialog', 'bootstrap_switch'));\n \n $this->template->build('admin/cms/page/index', $this->data);\n }", "function moduleContent()\t{\n\t\t$this->content .= $this->makeList();\n\t}", "public function index() {\n $this->html->displayHeaderAndFooter(true);\n $this->load_content();\n }", "public function index(){\n $this->title = 'Articles management';\n $articles = $this->getArticles();\n $this->content = view(env('THEME').'.admin.articles_content')->with('articles', $articles)->render();\n return $this->renderOutput();\n }", "public function index()\n {\n return view('list_wrapper', [\n 'entityType' => 'qbd',\n 'datatable' => new QBDDatatable(),\n 'title' => mtrans('qbd', 'qbd_list'),\n ]);\n }", "public function index()\r\n {\r\n $this->page_list_grid();\r\n }", "public function actionIndex()\n {\n $criteria = new CDbCriteria();\n $criteria->compare('status', Article::STATUS_PUBLISHED);\n $criteria->order = 'article_id DESC';\n \n $count = Article::model()->count($criteria);\n \n $pages = new CPagination($count);\n $pages->pageSize = 10;\n $pages->applyLimit($criteria);\n \n $articles = Article::model()->findAll($criteria);\n \n $this->setData(array(\n 'pageMetaTitle' => $this->data->pageMetaTitle.' | '.Yii::t('articles', 'Helpful articles'), \n 'pageBreadcrumbs' => array()\n ));\n\n $this->render('index', compact('articles', 'pages'));\n }", "public function renderList()\n {\n $this->template->articles = $this->articleManager->getArticles();\n }", "public function index()\n\t\t{\n\t\t\t$pageHeader = \tarray( 'pagetitle' => 'Page Listing',\n\t\t\t'slug'=>'pages',\n\t\t\t'font_icon'=>'book',\n\t\t\t);\n\t\t\t\n\t\t\t//Get All pages data\n\t\t\t$data['pagesdata'] = $this->AdminPageModel->GetAllPages();\n\t\t\t\n\t\t\t$this->load->view('admin/share-template/header', $pageHeader);\n\t\t\t$this->load->view('admin/admin_pages_listing_view', $data);\n\t\t\t$this->load->view('admin/share-template/footer');\n\t\t\t\n\t\t}", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n\t{\n\t\t$snippets = Snippet::paginate(10);\n\t\t// return $snippets;\n\t\treturn View::make('admin.snippets')\n\t\t\t->with('snippets', $snippets);\n\t}", "private function getContentList(){\n if(isset($_GET['content_search']) && strlen($_GET['content_search']) > 0){\n $searchstring = $this->setSearchstring();\n };\n\n //Set per page cookie\n if(isset($_GET['limit'])){\n $this->setPerPage(intval($_GET['limit']));\n }else if($_COOKIE[$this->main->module_mode.'_list_per_page_limit']){\n $this->per_page = intval($_COOKIE[$this->main->module_mode.'_list_per_page_limit']);\n };\n\n $this->main->current_per_page = $this->per_page;\n\n if(strlen($searchstring) > 0){\n $where = \" WHERE \".$searchstring;\n };\n\n $counter_query = \"\n SELECT\n count(*) AS `count`\n FROM\n `\".$this->main->db->quote($this->current_module_table).\"`\n \";\n\n $counter_result = mysql_fetch_row($this->main->db->query($counter_query));\n $limit = $this->main->getLimitsForList($counter_result[0], $this->per_page);\n \n $query = \"\n SELECT\n `id`,\n `name`,\n `publish`,\n `sort`\n \".$this->getAdditionalListFields().\"\n FROM\n `\".$this->main->db->quote($this->current_module_table).\"`\n \".$where.$this->main->getSortingParams().\"\n LIMIT\n \".$limit[0].\", \".$limit[1];\n\n return $this->main->db->assocMulti($query);\n }", "public function index()\n {\n $data = [\n 'title' => 'Category list',\n 'path' => 'category/list_category_view',\n 'data' => [\n 'categories' => $this->category_model->readCategories(),\n ]\n ];\n\n $this->load->view('template/template_view', $data);\n }", "public function index(){\r\n $this->display(index);\r\n }", "public function list_page_content () {\n // Check permissions\n if ( ! current_user_can( 'list_users' ) ) {\n return;\n }\n\n // Main listing query\n $this->list_query_users();\n\n // Set urls for column sorting links.\n $sort_link_username = $this->sort_link( 'user_name', $this->orderby, $this->order );\n $sort_link_displayname = $this->sort_link( 'display_name', $this->orderby, $this->order );\n\n // Include template\n include CTAL_PATH.'/admin/templates/users-page.php';\n }", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function listView()\r\n {\r\n $data['page'] = lang('jobs');\r\n $data['menu'] = 'jobs';\r\n $pagedata['companies'] = objToArr($this->AdminCompanyModel->getAll());\r\n $pagedata['departments'] = objToArr($this->AdminDepartmentModel->getAll());\r\n $this->load->view('admin/layout/header', $data);\r\n $this->load->view('admin/jobs/list', $pagedata);\r\n }", "public function index()\n {\n $page_contents = PageContents::get();\n return view('admin.page_contents.index',compact('page_contents'));\n }", "public function index() {\n $this->data['posts'] = $this->blog_model->get_many_by(['status' => 1]);\n\n $this->template->build('public/blog/index', $this->data);\n }", "public function listview() {\n\n $photo_list = Doctrine::getTable('Photo')->findAll();\n $data['photo_list'] = $photo_list;\n\n $data['view_name'] = \"photo_list_view\";\n $this->load->view(\"admin/common/template\", $data);\n }", "public function index()\n {\n if (null != $this->request->ifParameter(\"id\")) {\n $items_current_page = $this->request->getParameter(\"id\");\n } else {\n $items_current_page = 1;\n }\n $items = $this->item->getItemsFront($items_current_page);\n $previous_page = $items_current_page - 1;\n $next_page = $items_current_page + 1;\n $number_of_items_pages = $this->calculate->getNumberOfPagesOfExtHome();\n $number_of_items = $this->calculate->getTotalOfItemsHome();\n $number_of_cards = $this->calculate->getTotalOfCards();\n $number_of_links = $this->calculate->getTotalOfLinks();\n $this->generateView(array(\n 'items' => $items,\n 'number_of_items' => $number_of_items,\n 'number_of_cards' => $number_of_cards,\n 'number_of_links' => $number_of_links,\n 'items_current_page' => $items_current_page,\n 'previous_page' => $previous_page,\n 'next_page' => $next_page,\n 'number_of_items_pages' => $number_of_items_pages\n ));\n }", "public function index()\n {\n $articles = Article::latest()->published()->get();\n\n return view('admin.content', compact('articles'));\n }", "public function index()\n {\n\n return view('admin.category.listing');\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "function _syndicated_content_listings_page()\n{\n}", "public function index()\n {\n $content = content::all();\n return view('front-end.index', compact('content'));\n }", "public function get_list() {\n //Grab all of the posts which are set as 'viewable'\n $posts = Post::where_status('1')->paginate($this->perPage);\n\n //If we find some posts\n if(!is_null($posts)) {\n //Create a data array\n $data = array(\n 'pageTitle' => 'title',\n 'pageDescription' => 'description',\n 'posts' => $posts,\n );\n\n //Build the view\n \t\treturn View::make('public.post.list', $data);\n }\n //No posts found\n else {\n return 'todo :: Add message here to say no post posts in the system';\n }\n\t}", "public function indexAction()\n {\n $posts = PostService::readAll();\n\n View::renderTemplate('Posts/index.html', [\n 'posts' => $posts\n ]);\n }", "public function index()\n {\n $contentBlocks = $this->contentBlockRepository->paginateAll();\n\n return view('contentBlocks.index')->with('contentBlocks', $contentBlocks);\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function index()\n {\n \t$contents = Content::orderBy('created_at', 'desc')->paginate(10);\n $subjects = Subject::orderBy('subject_title','asc')->get();\n return view('/backend/index_contents', compact('contents','subjects'));\n }", "public function index(){\n \n $this->display();\n }", "public function index()\n {\n TypiCMS::setModel($this->repository->getModel());\n\n $page = Input::get('page');\n $itemsPerPage = Config::get('events::public.itemsPerPage');\n\n $data = $this->repository->byPage($page, $itemsPerPage, array('translations'));\n\n $models = Paginator::make($data->items, $data->totalItems, $itemsPerPage);\n\n $this->layout->content = View::make('events.public.index')->withModels($models);\n }", "public function index()\n {\n $this->view_all_posts();\n }", "public function index() {\n\t\t$data = $this->load_module_info ();\n\t\t\n\t\t$this->layout->display_admin ( $this->folder . $this->module . \"-list\", $data );\n\t}", "public function actionIndex()\n\t{\n\t\t$this->session->delete('page.lastSearch');\n\n\t\treturn $this->template->partial('content', 'pages/index', [\n\t\t\t'pages' => Page::findAll('SELECT * FROM nerd_pages'),\n\t\t]);\n\t}", "public function lists()\n\t{\n\t\t$this->OnlyAdmin();\n\t\t$info = $this->TicketModel->getList('desc');\n\t\t$this->loadView('views/ticket', array('info'=> $info), true);\n\t}", "public function index()\n {\n $status = Status::paginate(10);\n return view('firetakeaway::content.' . $this->route . '.index', compact('status'));\n }", "public function index()\n {\n //$crawlcontents = $this->crawlcontent->all();\n\n return view('crawl::admin.crawlcontents.crawl', compact(''));\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function newslist()\n {\n $this -> load -> model('news_model');\n $news_result = $this -> news_model -> get_all_news();\n $data = array(\n 'list' => $news_result,\n );\n $this->load->view('home/newslist', $data);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listPosts()\n {\n $PostsRepository = new PostsRepository();\n $posts = $PostsRepository->getAllPosts();\n require 'src/View/postListView.php';\n }", "public function index()\n {\n $titles = $this->titles->paginate(10);\n\n return view('backend.titles.index',compact('titles'));\n }", "public function indexAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::BLOGS);\n $this->_useAdditionalContent = true;\n \n \t$page = $this->_request->getParam('page');\n \t$table = new Blog();\n \t$select = $table->getActiveBlogSelect();\n \t$activeBlogs = $this->_helper->dataPaginator($select, $page, 'commonviews/pagination.phtml', BLOGS_PER_PAGE);\n \t$this->view->activeBlogs = $activeBlogs;\n \t$this->_helper->layout->setLayout('two-columns');\n \t$this->view->wrapperIsCard = false;\n $this->view->separateFirstContentCardHeader = true;\n }", "public function lists()\n {\n $data['id'] = Input::get('gallery_id');\n $data['gallery'] = PhotoGallery::where('id', '=', $data['id'])->first();\n $data['thisPageId'] = $this->thisPageId;\n $data['thisModuleId'] = $this->thisModuleId;\n $data['photos'] = $this->photo->listByGallery($data['id']);\n\n return view('cms.modules.multicms.photos_listall', $data);\n }", "public function searchList() {\n include 'views/search-list.php';\n }" ]
[ "0.7873065", "0.7623184", "0.75524914", "0.746411", "0.7461237", "0.7341645", "0.7324418", "0.71985316", "0.71633404", "0.70831954", "0.7050303", "0.7039518", "0.70375407", "0.70261985", "0.69851136", "0.69517004", "0.6926285", "0.6926285", "0.6926285", "0.6884927", "0.6881414", "0.68303853", "0.6812774", "0.68024105", "0.6801015", "0.6788746", "0.67524135", "0.6733714", "0.6728672", "0.67282784", "0.67195123", "0.67139846", "0.67069834", "0.66928166", "0.66914374", "0.6691373", "0.66908425", "0.66749257", "0.6673087", "0.66616917", "0.6661429", "0.66543645", "0.6653793", "0.6648255", "0.66233397", "0.66189295", "0.6615553", "0.6602224", "0.6594046", "0.65933895", "0.6593008", "0.6592622", "0.65897816", "0.65860087", "0.65851855", "0.65838504", "0.6577302", "0.6575775", "0.65732104", "0.6569252", "0.6546479", "0.654584", "0.6544778", "0.6544565", "0.65361303", "0.65358806", "0.65335536", "0.65210724", "0.6505922", "0.64997697", "0.6492144", "0.6491518", "0.64900047", "0.64863545", "0.6479423", "0.6474152", "0.6469295", "0.6467372", "0.6465044", "0.645465", "0.64535064", "0.64530283", "0.6446206", "0.64355206", "0.6434329", "0.6430249", "0.6428686", "0.64285415", "0.6423335", "0.6421521", "0.641717", "0.6415282", "0.6414056", "0.641034", "0.6404238", "0.6403806", "0.6401324", "0.6398862", "0.63976175", "0.6396302", "0.63950104" ]
0.0
-1
Show the form for creating a new content.
public function create($resourceable, $id, Section $section) { $resource = Str::plural($resourceable, 1); $resourceable = Str::singular($resourceable, 1); $model_name = str_replace('-', ' ',ucwords($resourceable)); $model_name = str_replace(' ', '',ucwords($model_name)); $resource_type = 'App\Models\\'.$model_name; $model = app($resource_type); $model = $model->find($id); $back = url()->previous(); return $this->view('resources.sections.components.content')->with('section', $section)->with('resource', $resourceable)->with('resourceable', $model)->with('back', $back); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.content.create');\n }", "public function create()\n {\n return view(\"backend.cms.form\");\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n return view('admin.pages.forms.create', $this->data);\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create()\n {\n $this->layout->content = View::make('newStoryForm');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n $data['title'] = 'Inserir página';\n return view('adm.pages.form', $data);\n }", "public function create()\n\t{\t\n\t\t\n\t\t// load the create form (app/views/fbf_presenca/create.blade.php)\n\t\t$this->layout->content = View::make('fbf_presenca.create')\n;\n\t}", "protected function addShowForm() \n {\n return view('dashboard.article.add');\n }", "public function createForm(){\n return view('articles_form');\n }", "public function create()\n {\n return view('pages.form');\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n $title = 'Khởi tạo chi nhánh';\n\n return view(PAGE_VIEW_FORM, compact('title'));\n }", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n $data = [\n 'title' => sc_language_render($this->plugin->pathPlugin.'::Content.admin.add_new_title'),\n 'subTitle' => '',\n 'title_description' => sc_language_render($this->plugin->pathPlugin.'::Content.admin.add_new_des'),\n 'icon' => 'fa fa-plus',\n 'languages' => $this->languages,\n 'content' => [],\n 'categories' => (new AdminCmsCategory)->getTreeCategoriesAdmin(),\n 'url_action' => sc_route_admin('admin_cms_content.create'),\n ];\n return view($this->plugin->pathPlugin.'::Admin.cms_content')\n ->with($data);\n }", "public function create()\n {\n return view('admin.forms');\n }", "public function create()\n {\n return view('contents.create');\n }", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n\t{\n\t\t//\n\t\treturn view('Gallery/Admin/form');\n\t}", "public function create()\n {\n $data['page_title'] = 'Content';\n $data['categories'] = Category::all()->sortBy('name');\n $data['languages'] = Settings::LANGUAGES;\n $data['genres'] = Settings::GENRES;\n return view('client.content.create', $data);\n }", "public function create()\n\t{\n\t \n\t \n\t return view('admin.godpagecontent.create');\n\t}", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return view('Form');\n }", "public function addForm() {\n $this->view->displayForm();\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create()\n {\n $this->title = __('admin.create_personal_information');\n\n //Page content definition\n $this->content = $this->getViewContent('personal_info.personal_info_form',\n [\n 'title' => $this->title\n ]\n );\n\n return $this->renderCurrentView();\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function create()\n {\n return view('dashboard.pages.form');\n }", "public function create()\n {\n return Admin::content(function (Content $content) {\n\n $content->header(__('cms.entries.create_header'));\n $content->description(__('cms.entries.create_description'));\n\n $content->body($this->form());\n\n });\n }", "public function create()\n {\n return view('admin.pages.forms.pengirim');\n }", "public function create() {\n return view('blog/form');\n }", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function actionCreate()\n {\n $model = new Content();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function newAction(): void\n {\n $this->view->form = new AnaForm(null, ['edit' => true]);\n }", "public function create() {\n\n return view('auth.pages.form');\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n return view(self::$folder . 'add')->withTitle(self::$mainTitle)->with('link', self::$link);\n }", "public function create()\n {\n return view('Samples.create', [\n 'create' => new FormBuilder(\n [\n 'title'=>'text',\n 'slug'=>'text',\n 'type_id'=>'hidden',\n 'id'=>'hidden' \n ],\n ['samples.store'],\n 'POST',\n 'Create'\n ) \n ]);\n }", "public function create()\n {\n return view('admin/form/form-blog');\n }", "public function create()\n {\n return view('admin.add-page');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view('contato.form');\n }", "public function showAddForm()\n {\n $cmsInfo = [\n 'moduleTitle' => __(\"Master Data\"),\n 'subModuleTitle' => __(\"Module Management\"),\n 'subTitle' => __(\"Add Module\")\n ];\n\n $dynamic_route = Config::get('constants.defines.APP_MODULES_CREATE');\n return view('modules.edit_add', compact('cmsInfo', 'dynamic_route'));\n }", "public function create()\n {\n return view('admin.message-content.create');\n }", "public function create()\n {\n $template = (object) $this->template;\n $form = $this->form();\n return view('admin.disposisi.create', compact('template','form'));\n }", "public function create()\n {\n return view('crawl::admin.crawlcontents.create');\n }", "public function create()\n {\n $categories = Category::all();\n return view('content/edit', ['title' => 'Add Content', 'action' => 'content', 'categories' => $categories]);\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function create()\n {\n return view('share.form');\n }", "public function create()\n {\n $elements = $this->createForm('formAlerte.json');\n\n return view('admin.editCreateForm', [\n 'elements' => $elements,\n ]);\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('mes.create-edit');\n }", "public function create() {\n\n\t\treturn view('/mailer/createform');\n\n\t}", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n return view('url.form');\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n \n // Retorna a View\n return view(\"post.form\");\n\n }", "public function create()\n {\n $parents=Page::all();\n return view('admin.pages.form', compact('parents'));\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "protected function setFormContent()\n {\n\t\t$content = $this->getTitle();\n\t\t\n\t\t$content .= '<p>Your meditation time on <b>';\n\t\t$content .= $this->data['long_date'];\n\t\t$content .= '</b> has been deleted. Would you like to restore it?</p>';\n\t\t\n\t\t$this->Form = new Form;\n\t\t$this->buildForm();\n\t\t$content .= $this->Form->getHtml();\n\t\t\n\t\t// Add the cancel link\n\t\t$content .= $this->cancelLink();\n\t\t\n\t\t$this->content = $content;\n }", "public function create()\n {\n return view('forming');\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n {\n return view('admin.about.add_new_about');\n }", "public function create()\n {\n return view('backend.seos.form', [\n 'nameAction' => 'Новое правило SEO',\n 'controllerPathList' => self::$path,\n 'controllerAction' => 'add',\n 'controllerEntity' => new SEO()\n ]);\n }", "public function create()\n\t{\n\t\treturn view('editor')->with('action', 'save');\n\t}", "public function create()\n {\n View::share('page_title', Lang::get('page::index.category.create_edit'));\n return view('page::backend.category.create_edit');\n }", "public function create()\n {\n return view('forms.cps.create');\n }", "public function create()\n {\n return view('questions::frontend.create');\n }", "public function create()\n\t{\n\t\treturn View::make(\"admin.newPost\");\n\n\t}", "public function create()\n {\n $data['module'] = $this->module();\n return view(\"backend.{$this->module()['module']}.create-edit\", $data);\n }", "public function create()\n {\n return view('backend::page.create');\n }", "public function create()\n {\n $content = 'components/add-edit';\n return view('welcome', compact('content'));\n }", "public function create()\n\t{\n\t\treturn View::make('usp.koperasi.create')->with('page','Koperasi')\n\t\t->with('modul','Create');\n\t}", "public function create()\n {\n $this->view->course_list_array = \\App\\Http\\Models\\Course::courseListArray();\n $this->view->title = 'Add Questionnaire';\n return $this->view('tes.form-management.questionnaire-list.add-questionnaire');\n }", "public function create()\n {\n $showURL = url()->current();\n $flagShow = strpos($showURL, 'edit');\n $authors = Author::all();\n $tags = Tag::all();\n\n return view('backoffice.create', compact('authors', 'tags', 'flagShow'));\n }", "public function create()\n\t{\t\n\t\t\n\t\t// load the create form (app/views/fbf_historico_atleta_cameponato/create.blade.php)\n\t\t$this->layout->content = View::make('fbf_historico_atleta_cameponato.create')\n;\n\t}", "public function create()\n {\n return view('admin.createpage');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }" ]
[ "0.77291125", "0.75865006", "0.7565976", "0.75320345", "0.75203985", "0.75145537", "0.748292", "0.7471893", "0.74698454", "0.74330366", "0.7432138", "0.73854476", "0.7378215", "0.73714966", "0.73714", "0.7365239", "0.73643476", "0.7356483", "0.73495996", "0.73395455", "0.73379546", "0.73180115", "0.73180115", "0.7308387", "0.7301509", "0.72940654", "0.7291535", "0.7290555", "0.7272539", "0.7263665", "0.7262513", "0.7255304", "0.7248863", "0.7233739", "0.7231136", "0.721128", "0.7209545", "0.7204837", "0.7200898", "0.7189744", "0.7183521", "0.7180506", "0.7168848", "0.716091", "0.7159471", "0.7159471", "0.7159471", "0.7148263", "0.7141236", "0.71409196", "0.7136239", "0.7131622", "0.71241736", "0.7118674", "0.71130246", "0.71125925", "0.7110627", "0.71080846", "0.71080846", "0.71011466", "0.7100883", "0.7099203", "0.70949113", "0.70738006", "0.7072219", "0.7071894", "0.7068427", "0.70665586", "0.70642203", "0.706324", "0.7053246", "0.7046365", "0.70458883", "0.7033713", "0.7010052", "0.7008591", "0.70078075", "0.70053744", "0.7005279", "0.6992223", "0.6982965", "0.6981098", "0.6977581", "0.69773465", "0.6975233", "0.6972313", "0.69706094", "0.6969282", "0.6967237", "0.6966874", "0.69627374", "0.69624555", "0.6961955", "0.69613373", "0.69611186", "0.6957108", "0.69560874", "0.6954525", "0.69465214", "0.69456095", "0.6938396" ]
0.0
-1
Store a newly created article in storage.
public function store($resourceable, $id, Section $section, Request $request) { $resource = Str::plural($resourceable); if (request()->file('media') === null) { $attributes = request()->validate(Arr::except(Content::$rules, 'media'), Content::$messages); } else { $attributes = request()->validate(Content::$rules, Content::$messages); $media = $this->moveAndCreatePhoto($attributes['media'], $size = ['l' => Content::$LARGE_SIZE, 's' => Content::$THUMB_SIZE]); if ($media) { $attributes['media'] = $media; } } $sectionContent = $this->createEntry(Content::class, $attributes); $sectionContent->sections()->syncWithoutDetaching([$section->id]); return redirect('admin/'.$resource.'/' . $id . '/sections/'.$request->section_id.'/content/' . $sectionContent->id . '/edit'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(createArticleRequest $request)\n\t{\n\t\t$article = new Article($request->all());\n\n\t\t$name = $request->input('interest');\n\n\t\t$tag_id = DB::table('interests')\n\t\t\t->select('interests.id')\n\t\t\t->where('name','=',$name)->get();\n\n\t\t$article->interest()->attach($tag_id);\n\n\t\tAuth::user()->article()->save($article);\n\n\n\n\t\tflash()->overlay('Your article has been created', 'Thank you for posting');\n\t\t\n\t\treturn redirect('article');\n\t}", "public function store(ArticlesFormRequest $request)\n {\n $article = new Article;\n $article->fill($request->all());\n $article->published = $request->get('published', false);\n $article->featured = $request->get('featured', false);\n $article->authenticated = $request->get('authenticated', false);\n $article->is_page = $request->get('is_page', false);\n $article->save();\n\n $article->permissions()->sync($request->get('permissions', []));\n if ($request->tags) {\n $article->tag(explode(',', $request->tags));\n }\n\n event(new ArticleWasCreated($article));\n\n flash()->success(trans('cms::article.store.success'));\n\n return redirect()->route('administrator.articles.index');\n }", "public function store()\n {\n $article = Article::create($this->validateRequest());\n $this->storeImage($article);\n return redirect('articles');\n }", "public function store()\n\t{\n\t\tif ($this->validateArticleForm() === true)\n\t\t{\n\t\t\t$Article = $this->saveArticleProperties();\n\t\t\tif (!is_null($Article))\t$this->saveArticleDetail($Article);\n\t\n\t\t\t// redirect\n\t\t\tSession::flash('message', 'Successfully created article!');\n\t\t\treturn Redirect::to('admin/articles');\n\t\t}else return $this->validateArticleForm();\n\t}", "public function store(Requests\\ArticleRequest $request)\n {\n $input = $request->all();\n\n Article::create($input);\n\n return redirect('/articles');\n }", "public function store(CreateArticleRequest $request)\n {\n $article = new Article($request->validated());\n $article->user_id = Auth::user()->id;\n// $article->title = $request->input('title');\n// $article->body = $request->input('body');\n $article->save();\n foreach($request->validated()['image'] as $img) {\n $path = $img->store('public');\n $image = new Image();\n $image->path = Storage::url($path);\n $article->images()->save($image);\n }\n foreach ($request->validated()['tags'] as $tagId) {\n $article->tags()->attach($tagId);\n }\n return response()->redirectToRoute('articles.index');\n }", "public function store(StoreArticleRequest $request)\n {\n //\n $input = $request->all();\n $input['intro']=mb_substr($request->get('content'),0,46);\n //$input['publish_at'] = Carbon::now();\n $article = Article::create($input);\n \n $article->tags()->attach($request->input('tag_list'));\n \n return redirect('/');\n }", "public function store(Requests\\ArticleRequest $request) {\n\n /*\n $input = Request::all();\n $input['published_at'] = Carbon::now();\n $input['users_id'] = Auth::id();\n Article::create($input);\n */\n\n $request['users_id'] = Auth::id();\n Article::create($request->all());\n\n //Session::flash('flash_message', 'Article has been created!');\n flash()->success('Article has been created!');\n \n return redirect('articles');\n }", "public function store(CreateArticleRequest $request)\n {\n\n $tags = $request->input('tags');\n $currentTags = array_filter($tags, 'is_numeric');\n $newTags = array_diff($tags, $currentTags);\n\n foreach ($newTags as $newTag):\n if ($tag = Tag::create(['name' => $newTag]))\n $currentTags[] = $tag->id;\n endforeach;\n\n // $article = Auth::user()->articles()->create($request->all());\n\n $article = Article::create($request->all());\n $article->tags()->attach($currentTags);\n // $article->tags()->sync($currentTags);\n\n if($request->hasFile('cover')):\n $this->uploadFile($request->file('cover'));\n endif;\n\n return redirect('admin/content');\n }", "public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'title' => 'required',\n\t\t\t'text' => 'required'\n\t\t);\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif ($validator->fails()) {\n\t\t\treturn Redirect::to('article/create');\n\t\t} else {\n\t\t\t$article = new Article;\n\t\t\t$article->title = Input::get('title');\n\t\t\t$article->text = Input::get('text');\n\t\t\t$article->save();\n\t\t\tSession::flash('message', 'Successfully created article!');\n\t\t\treturn Redirect::to('article/'.$article->id);\n\t\t}\n\t}", "public function store(Requests\\ArticleRequest $request)\n {\n //Unless validation pass the code below will never be fired\n $this->createArticle($request);\n \n flash()->success('Your article has been created');\n return redirect('articles');\n }", "public function store(CreateArticleRequest $request) {\n\t\t$article = $this->article->store($request->all());\n\t\tif($article) {\n\t\t\treturn redirect()->action('ArticlesController@show', [$article['slug']]);\n\t\t}\n\t\treturn redirect()->action('ArticlesController@create')->with($request->all());\n\t}", "public function store(ArticleRequest $request)\n\t{\n\t\tArticle::create($request->all());\n\n\t\tflash()->success('O artigo foi criado!')->important();\n\n\t\treturn redirect('articles');\n\t}", "public function store(ArticleCreateRequest $request)\n {\n $formInput = $this->formatRequestInput($request);\n\n // Store the New article\n $fournisseur = Article::create($formInput); // $request->input()\n\n // Sessions Message\n $request->session()->flash('msg_success',__('messages.modelSaved', ['modelname' => 'Article'] ));\n\n return redirect()->action('ArticleController@index');\n }", "public function store(StoreArticleRequest $request)\n {\n $path = Storage::disk('public')->putFile('articles/images', $request->file('image'));\n\n Article::create($request->only(['title', 'content', 'category_id']) + ['image' => $path]);\n\n return redirect()->back()->with(['status' => 'success', 'message' => 'Article added successfully.']);\n }", "public function store(CreateArticleRequest $request)\n {\n $input = $request->all();\n\n $article = $this->articleRepository->create($input);\n\n Flash::success('Article saved successfully.');\n\n return redirect(route('articles.index'));\n }", "public function store(StoreArticleRequest $request)\n {\n $data = $this->handleRequest($request);\n $this->article->create($data);\n return response()->api('创建成功');\n }", "public function store(ArticleRequest $request)\n {\n $article = new Article();\n $article->title = $request->title;\n $article->body = $request->body;\n $published_at = $request->published_at_date . ' '. $request->published_at_time;\n $article->published_at = $published_at;\n $article->author_id = $request->user_id;\n $article->slug = str_slug($request->title, '-');\n $article->save();\n\n session()->flash('flash_message', 'the article has been created');\n session()->flash('flash_message_important', true);\n\n $tags = $request->tags;\n foreach ($tags as $tag) {\n if (is_numeric($tag))\n {\n $tagArr[] = $tag;\n }\n else\n {\n $newTag = Tag::create(['name'=>$tag]);\n $tagArr[] = $newTag->id;\n }\n }\n $article->tags()->sync($tagArr);\n return redirect('articles');\n }", "public function store(ArticleRequest $request)\n {\n $article = new Article;\n $article->article = $request->article;\n $article->category_id = $request->category;\n $article->content = $request->content;\n $article->status = $request->status;\n $article->user_id = $request->author;\n $article->view = \"0\";\n if ($request->hasFile('image')) {\n $filename = time().\".\".$request->file('image')->getClientOriginalExtension();\n Image::make($request->file('image'))->save(public_path('images/articles/' . $filename));\n Image::make($request->file('image'))->resize(350, 183)->save(public_path('images/thumbnails/' . $filename));\n $article->image = $filename;\n } else {\n $article->image = 'article.jpg';\n }\n $article->slug = slug_th($request->article);\n $article->save();\n $article->tags()->sync($request->tags, false);\n return back()->with([\n 'alert' => 'alert-success',\n 'message' => 'บันทึกข้อมูลเรียบร้อย!',\n ]);\n }", "public function store(Request $request)\n {\n\n Article::create($request->all());\n\n /*Article::create([\n 'user_id' => Auth::user()->id,\n 'content' => $request->content,\n 'live' => $request->live,\n 'post_on' => $request->post_on\n ]);*/\n\n }", "public function store(ArticleAdd $request)\n {\n $data = $request->except('_token');\n $data['url'] = '';\n try {\n Article::create($data);\n } catch (\\Exception $e) {\n error_info();\n }\n success_info();\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$category = Category::whereName('news')->first();\n\t\t$member = Auth::user()->member;\n\n\t\t$validator = Article::validate($input);\n\n\t\tif($validator->fails()) {\n\t\t\treturn Redirect::to('/news/create/')->withInput($input)->withErrors($validator);\n\t\t}\n\n\t\t$article = new Article();\n\t\t$article->slug = $input['slug'];\n\t\t$article->subject = $input['subject'];\n\t\t$article->body = $input['body'];\n\t\t$article->member()->associate($member);\n\t\t$article->category()->associate($category);\n\t\t$article->save();\n\n\t\treturn Redirect::to('/news/');\n\t}", "public function store() {\n\n //\n try {\n $article = new Article;\n $article->title = Input::get('title');\n $article->description = Input::get('description');\n $article->category = Input::get('category');\n $article->open_at = Input::get('open_at');\n $article->status = Input::get('status');\n $article->lang = Input::get('lang');\n $article->meta_name = Input::get('meta_name');\n $article->meta_content = Input::get('meta_content');\n $article->meta_title = Input::get('meta_title');\n $article->h1 = Input::get('h1');\n\n $article->save();\n //create a corresponding tw/cn article at same time.\n $refLang = (Input::get('lang')=='tw') ? 'cn' : 'tw';\n $refArticle = new Article;\n $refArticle->title = Input::get('title');\n $refArticle->description = Input::get('description');\n $refArticle->category = Input::get('category');\n $refArticle->status = 0;\n $refArticle->lang = $refLang;\n $article->meta_name = Input::get('meta_name');\n $article->meta_content = Input::get('meta_content');\n $article->meta_title = Input::get('meta_title');\n $article->h1 = Input::get('h1');\n\n $refArticle->save();\n\n $refArticle->langRef = $article->id;\n $article->langRef = $refArticle->id;\n $refArticle->save();\n $article->save();\n\n return Redirect::to('admin/articles?category=' . Input::get('category') . '&lang=' . Input::get('lang'));\n }\n catch(Exception $e) {\n return Redirect::back()->withInput()->withErrors('新增失敗');\n }\n }", "public function store(ArticleRequest $request)\n {\n $article = Article::create($request->all());\n\n return redirect()->route('articles.index')\n ->with('success', 'The Article: ' . $article->name . ' has been successfully created!');\n }", "public function store(ArticleRequest $request)\n {\n $post = new Post();\n $post->post_name = request('name');\n $post->post_title = request('title');\n $post->post_content = request('content');\n $post->post_date = now();\n $post->post_type = 'article';\n $post->user_id = auth()->user()->id;\n $post->save();\n \n return redirect()->route('article.show', $post->post_name);\n }", "public static function store(ArticleRequest $request)\n {\n $article = New Article;\n $input=$request->all();\n $article->titre=$input['titre'];\n if (!isset($input['anonym'])){\n $article->auteur=$input['auteur'];\n } else {\n $article->auteur=\"Auteur anonyme\";\n }\n $article->contenu=$input['contenu'];\n $article->published_at=$input['published_at'];\n $article->presentation=$input['presentation'];\n $article->cat_id=$input['cat_id'];\n $article->relu=false;\n $article->save();\n\n $article->image = Article::saveFile($request,'image',\"Image_$article->id\");\n $article->fichier=Article::saveFile($request,'fichier',\"Article_$article->id\");\n $article->save();\n\n return redirect('/')->with('message','Merci d\\'avoir publié cet article ! Il sera mis en ligne au plus tôt.');\n }", "public function store(Request $request)\n {\n $attributes = $request->validate([\n 'title' => 'required',\n 'content' => 'required',\n 'excerpt' => 'nullable|max:255',\n 'slug' => 'required|unique:articles,slug',\n 'password' => 'nullable',\n 'private' => 'nullable',\n ]);\n\n $article = Article::create([\n 'title' => $request->title,\n 'content' => $request->content,\n 'excerpt' => $request->excerpt,\n 'user_id' => Auth::user()->id,\n 'slug' => $request->slug,\n 'password' => $request->password,\n 'private' => $request->private,\n 'published_at' => \\Carbon\\Carbon::now(),\n ]);\n \n if($request->wantsJson()) {\n return $article;\n }\n \n return redirect(route('articles.show', $article->id)); \n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required|max:100',\n 'body' => 'required'\n ]);\n\n $article = new Article;\n $article->title = $request->title;\n $article->body = $request->body;\n $article->save();\n\n Cache::forget('article:all');\n\n return redirect(route('article.index'));\n }", "public function store(CreateRequest $request)\n {\n \n\n $articles = new Article();\n if ($request->hasFile('pic')) {\n $pic = $request->file('pic');\n \n $fileName = time() . '.'.$pic->getClientOriginalExtension();\n if (Image::make($pic)->save(public_path('images/'.$fileName))) {\n $articles->pic = $fileName;\n }\n }\n \n $articles->title = $request->title;\n $articles->text = $request->text;\n $articles->datum = $request->datum;\n $articles->latLngLat = $request->latLngLat;\n $articles->latLngLng = $request->latLngLng;\n\n $articles->tijdstip = $request->tijdstip;\n $articles->category_id = $request->category_id;\n \n \n $articles->user_id = auth()->user()->id;\n if ($articles->save()) {\n \n session()->flash('success','Uw munchie werd toegevoegd!');\n return redirect('/myarticles');\n }\n \n \n \n }", "public function store(ArticleFormRequest $request)\n {\n $this->validate($request, [\n 'img' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ]);\n\n $image = $request->file('img');\n $newName = time().'.'.$image->getClientOriginalExtension();\n $image->move(public_path('images'), $newName);\n\n // $user_id = Auth::user()->id;\n\n $article = new Article(array(\n 'title' => $request->get('title'),\n 'content' => $request->get('content'),\n 'img' => $newName,\n 'h2' => $request->get('h2'),\n 'slug' => Str::slug($request->get('title'), '-'),\n //'user_id' => $user_id\n ));\n\n $article->save();\n\n // we can use sync() attach the selected pages to the articles\n $article->pages()->sync($request->get('pages'));\n\n return redirect('/admin/articles/create')->with('status', 'The Article has been created!');\n\n // return redirect(action('Admin\\ArticlesController@create', $article->id))->with('status', 'updat!'); \n }", "public function store()\n {\n if( $this->isPersistent() )\n {\n $this->update();\n }\n else\n {\n $this->insert();\n }\n }", "public function store(Request $request)\n {\n $request->validate([\n \"title\" => \"required\",\n \"thumbnail\" => \"required|string\",\n \"description\" => \"required|string\",\n \"tags\" => \"required\",\n \"category\" => \"required\"\n ]);\n\n $article = Auth::user()->article()->create([\n \"category_id\" => $request->category,\n \"title\" => $request->title,\n \"slug\" => \\Str::slug($request->title),\n \"thumbnail\" => $request->thumbnail,\n \"description\" => $request->description,\n ]);\n\n $article->tags()->attach($request->tags);\n\n return response()->json([\"status\" => \"success\", \"content\" => $this->resourceArticleArray(Article::latest()->get())]);\n }", "public function store(Requests\\AdminArticleCreate $article)\n {\n $this->dispatch(new CreateArticle(\\Auth::user(), \\Input::get('title'), \\Input::get('text')));\n\n return \\Redirect::route('admin.article.index');\n }", "public function store(Request $request)\n {\n $store = new Article;\n\n $store->date = $request->date;\n $store->titre = $request->titre;\n $store->auteur = $request->auteur;\n $store->texte = $request->texte;\n $store->image = $request->file('image')->hashName();\n\n $store->save();\n $request->file('image')->storePublicly('images', 'public');\n return redirect()->back();\n }", "public function store(ArticleRequest $request){\n\n $fileNameToStore= $this->helperObj->storeImage($request);\n\n $fields = $request->all();\n\n $published= ($request->published)?true:false;\n\n $fields['cover_image'] = $fileNameToStore;\n $fields['published']= $published;\n\n $article = Auth::user()->articles()->create($fields);\n\n $article->tags()->sync($request->tags,false);\n\n Session::flash('success','The article was successfully saved');\n\n return redirect()->route('articles.show',$article);\n }", "public function store(ArticleRequest $request)\n {\n \n// $data = $request->all();\n// $data['user_id'] = Auth::user()->id;\n// $image = Input::file('image');\n// if(isset($image)) {\n// $imageName = time().'.'.$image->getClientOriginalExtension();\n// $data['image'] = $imageName;\n// $image->move(\"uploads\",$imageName);\n// } else {\n// $data['image'] = '';\n// }\n//\n//<<<<<<< stefan_ristevski\n// Article::create($data);\n \n//=======\n// $article = Article::create($data);\n// var_dump($request->all());exit;\n//>>>>>>> master\n $data = $request->all();\n $image = Input::file('image');\n if(isset($image)) {\n $imageName = time().'.'.$image->getClientOriginalExtension();\n $data['image'] = $imageName;\n $image->move(\"uploads\",$imageName);\n } else {\n $data['image'] = '';\n }\n//<<<<<<< stefan_ristevski\n // Auth::user()->articles()->save(new Article($data));\n//=======\n // $article = Auth::user()->articles()->save(new Article($data));\n // if($request->input('tag') != null) {\n // $article->tags()->attach($request->input('tag'));\n // }\n//>>>>>>> master\n return redirect('article');\n }", "public function store(Request $request)\n {\n\t\t$this->validate($request,[\n\t\t\t'title' => 'required|max:255|unique:article',\n 'content' => 'required|max:60000',\n 'tag' =>'required',\n ]);\n //使用Purifier防止Xss注入\n $content = Purifier::clean($request->input('content'));\n\n $article = new Article;\n $article->title = $request->input('title');\n $article->content = $content;\n $article->original_content = $request->input('content');\n $article->user_id = $request->session()->get('admin')['id'];\n if(is_array($request->input('tag'))){\n $tag_id = ','.implode(',',$request->input('tag')).',';\n }\n $article->tag_id = $tag_id;\n $article->state = 1;\n\n if($article->save()){\n $id = $article->id;\n return Redirect::to('article/show/'.$id);\n }else{\n return Redirect::back()->withInput()->withError('保存失败');\n }\n }", "public function store(ArticleRequest $request)\n {\n $data = array_merge($request->all(), [\n 'user_id' => \\Auth::id(),\n 'last_user_id' => \\Auth::id()\n ]);\n\n $data['is_draft'] = isset($data['is_draft']);\n $data['is_original'] = isset($data['is_original']);\n\n\n\n $art = $this->article->store($data);\n\n $sou_data = [\n \"pid\"=> $art->id,\n \"category_id\"=>$data[\"category_id\"],\n \"user_id\"=>$data['user_id'],\n \"slug\"=>$art->slug,\n \"title\"=>$data['title'],\n \"page_image\"=>$data['page_image'],\n \"subtitle\"=>$data['subtitle'],\n \"meta_description\"=>$data['meta_description'],\n \"content\"=>$data[\"content\"],\n \"updated_at\"=>strtotime($data[\"published_at\"]),\n ];\n Xunsearch::add($sou_data);\n\n $this->article->syncTag(json_decode($request->get('tags')));\n\n return $this->noContent();\n }", "public function store(Request $request){\n $this->validator($request->all())->validate();\n $articleData = $this->articleData($request);\n \n if($this->articleRepo->save($articleData, $this->auth()->id())){\n return redirect(route(\"user.profile\"))->with('success', 'Article published.');\n }else{\n return redirect()->back()->with('error', 'Failed to save this article. Please try again, if this error persists please contact us.');\n } \n }", "public function store(ArticleRequest $request)\n {\n\n $article = Auth::user()->articles()->create($request->all());\n\n $article->tags()->attach(request('tags'));\n\n \\Mail::to('[email protected]')->send(\n new ArticleCreated($article)\n );\n\n session()->flash('flash_message','The article has been created');\n\n return redirect('articles');\n\n }", "public function store(ArticlesRequest $request)\n {\n // create new article\n $article = new Article();\n $article->user_id = Auth::user()->id;\n $article->title = $request->input('title');\n $article->body = $request->input('body');\n\n // create image file\n if ($file = $request->file('image')) {\n $name = uniqid('threedium_', true).'.'.$file->getClientOriginalExtension();\n \\Image::make($file)->save(public_path('images/').$name);\n $article->image = $name;\n }\n\n if ($article->save()) {\n return redirect()->back()->with('success', 'Article added successfully!');\n }\n }", "public function store(Request $request)\n {\n $article = new Article();\n $article->title = $request->title;\n $article->category_id = $request->category_id;\n $article->user_id = Auth::user()->id;\n $article->text = $request->text;\n if ($article->save()) {\n return redirect()->back()->with('status', 'Article add successful!');\n }\n }", "public function insert($article);", "public function store(ArticleRequest $request)\n {\n $this->service->store($request);\n return redirect()->route('article.index');\n }", "public function store(Article $article)\n {\n\n /*$article->addStep([\n 'description' => \\request('description'),\n ]);*/\n\n $article->addStep(\\request()->validate([\n 'description' => 'required|min:5'\n ]));\n\n return back();\n }", "public function store(ArticleRequest $request)\n {\n if ( $request->file('image')){\n //manipulacion de imagenes \n $file = $request->file('image');\n //crear nombres a las imagenes para evitar duplicadas\n $name = 'img_' . time() . '.' . $file->getClientOriginalExtension();\n $path = public_path() . '/images/articles/';\n $file->move( $path , $name ); //parametros = ruta , nombre \n }\n \n \t$articulo = new Article($request->all()); \n $articulo->user_id = \\Auth::user()->id;\n $articulo->save();\n\n $image = new Image();\n $image->article()->associate($articulo); //associate lo que hace es obtener el id del articulo que acaba de crear\n $image->name = $name;\n $image->save();\n\n $articulo->tags()->sync($request->tags); //llenamos la tabla pivote de tags y articulos , relacion muchos a muchos\n\n flash(\"Se ha registrado el articulo de forma exitosa\", 'success');\n\n return redirect()->route('admin.articles.index');\n }", "public function store(Request $request)\n {\n $this->validate(request(), [\n 'title' => 'required|unique:articles',\n 'description' => 'required',\n 'category' => 'required'\n ]);\n Article::create([\n 'title' => $request->title,\n 'description' => $request->description,\n 'category_id' => $request->category\n ]);\n session()->flash('success', \"Article created successfully\");\n return redirect(route('articles.index'));\n }", "public function store (Article $article){\n\n \t$this->validate(request(),['body' => 'required|min:2']);\n\n \tCommentMod::create([\n \t\t'body' => request('body'),\n \t\t'article_id' => $article->id,\n 'user_id' => Auth::user()->id\n \t\t]);\n\n\n \treturn back();\n\n }", "public function store();", "public function store();", "public function store();", "public function store(Request $request)\n {\n Article::create( $this->validateArticle());\n\n redirect(route('articles.index'));\n\n\n }", "public function store(Request $request)\n {\n Gate::authorize(PermissionEnum::AddArticle);\n\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string|between:3,200',\n 'excerpt' => 'string|max:200|nullable',\n 'body' => 'required|string',\n 'image' => 'image|nullable',\n 'is_pinned' => 'nullable',\n ]);\n\n if($validator->fails()){\n return response()->json($validator->errors()->toJson(), 400);\n }\n\n $article = new Article;\n $article->uuid = Str::uuid();\n\n $this->updateArticle($request, $article);\n\n return response()->json(ArticleResource::make($article), 201);\n }", "public function store(Request $request)\n {\n $validate = $request->validate([\n 'title'=>'required|string|max:500',\n 'content'=>'required'\n ]);\n $article = new Article();\n $article->title = $request->title;\n $article->content = $request->content;\n if (Auth::user()->role_id == 1 || Auth::user()->role_id == 4) {\n $article->user_id = $request->user_id;\n } else {\n $article->user_id = Auth::user()->id;\n }\n $article->save();\n\n return redirect()->route('articles.index');\n }", "public function store(Request $request)\n {\n // dd($request->input());\n $article = new Article();\n $article->title = $request->input('title');\n $article->date = $request->input('date');\n $article->author = $request->input('author');\n $article->details = $request->input('details');\n $article->save();\n\n return redirect()->route('article.add')->with('message', 'บันทึกข้อมูลได้สำเร็จ');\n }", "public function store(Request $request , Article $article)\n {\n $article->title = $request->input('title');\n $article->desc = $request->input('desc');\n $article->content = $request->input('content');\n\n if($article->save()){\n // article_category\n $category = $request->input('categorySelected');\n if($category){\n DB::table('article_category')->insert([\n 'article_id'=>$article->id,\n 'category_id'=>$category['id'],\n 'created_at'=>date('Y-m-d H:i:s',time()),\n 'updated_at'=>date('Y-m-d H:i:s',time()),\n ]);\n }\n // article_tag\n $tags = $request->input('tagSelected');\n if($tags){\n foreach($tags as $tag){\n DB::table('article_tag')->insert([\n 'article_id'=>$article->id,\n 'tag_id'=>$tag['id'],\n 'created_at'=>date('Y-m-d H:i:s',time()),\n 'updated_at'=>date('Y-m-d H:i:s',time()),\n ]);\n }\n }\n return response()->json(1);\n }else{\n return response()->json(0);\n }\n }", "public function store(ArticleRequest $request)\n {\n $validated = $request->validated();\n \n $this->articleManager->build(new Article(), $request);\n \n return redirect()->route('articles.index')->with('success', \"L'article a bien été sauvegardé\");\n }", "public function store(Request $request)\n {\n $this->validate($request, Article::$rules);\n\n Article::create($request->input());\n Session::flash('success', 'Successfully added article');\n\n return redirect()->route('article.index');\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $validData = $request->validate($this->validation_rules);\n\n $article = new Article();\n $article->title = $validData['title'];\n $article->desc = $validData['desc'];\n $article->price_per_day = $request->price_per_day;\n $article->price_per_week = $request->price_per_week;\n $article->city = $request->city;\n $article->images_url = $request->images_url;\n $article->category_id = $request->category_id;\n $article->user_id = Auth::user()->id;\n $article->save();\n\n return redirect('/articles/' . $article->id)->with('status', 'Artikeln skapades');\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'category_id' => 'required',\n 'tags_id' => 'required',\n 'title' => 'required|max:250',\n 'alias' => 'required|max:250',\n 'description' => 'required',\n 'short_description' => 'required|max:1000',\n 'meta_description' => 'required|max:1000'\n ]);\n\n $article = new Articles();\n $article->fill($request->all());\n $article->user_id = Auth::user()->id;\n $article->save();\n\n// $article = Auth::user()->articles()->create($request->all());\n /**\n * Check tags_id input and create tags if not number in input\n */\n $tag_ids = [];\n foreach ($request->input('tags_id') as $tag_input) {\n if (ctype_digit($tag_input)) {\n //it`s number, save to ids array\n array_push($tag_ids, $tag_input);\n }\n else {\n //create new tag with this input name if not exist\n $tag = Tags::where('name', $tag_input)->first();\n if (!$tag) {\n $tag = Tags::create(['name' => $tag_input]);\n }\n array_push($tag_ids, $tag->id);\n }\n }\n\n $article->tags()->attach($tag_ids);\n\n \\Flash::success('Article created');\n\n return redirect()->action('ArticlesController@index');\n }", "public function store(CreateArticleRequest $request, Article $article)\n {\n \n \n $uploaded_file = $request->file('image_file');\n \n\n $parameter = $request->all();\n\n unset($parameter['image_file']);\n $article = $article->create($parameter);\n if(isset($uploaded_file)){\n $ext = $uploaded_file->getClientOriginalExtension();\n \n $imageName = $article->id . \".\" . $ext;\n\n\n $uploaded_file->move(\n base_path() . '/public/img/uploads/article', $imageName\n );\n\n Image::make(base_path() . '/public/img/uploads/article/' . $imageName, array(\n 'width' => 200,\n 'height' => 160,\n ))->save(base_path() . '/public/img/uploads/thumbnails/article/' . $imageName);\n\n\n $article->update(array('image' => $imageName));\n }\n Session::flash('message', 'The article was successfully added!.');\n Session::flash('flash_type', 'alert-success');\n\n return redirect('articles');\n }", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store(Request $request)\n {\n $validatedData = $request->validate([\n 'title' => 'required|max:255',\n 'body' => 'required',\n 'category_id' => 'required|exists:categories,id',\n 'tags' => 'exists:tags,id'\n ]);\n Article::create($validatedData); // prende i dati validati e li salva nella tabella articles\n $article = Article::orderBy('id', 'desc')->first();\n $article->tags()->attach($request->tags);\n return redirect()->route('articles.index');\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store(Request $request)\n {\n $requestData = $request->all();\n $requestData['created_by_user_id']= $request->user()->id;\n $requestData['updated_by_user_id']= $request->user()->id;\n \n $this->article->create($requestData);\n\n flash()->success(trans('core::core.messages.resource created', ['name' => trans('pearlskin::articles.title.articles')]));\n\n return redirect()->route('admin.pearlskin.article.index');\n }", "public function store(Request $request)\n {\n $article=New Article;\n $article->Catagory_id=$request->catagory;\n $article->title=$request->title;\n $article->content=$request->content;\n $article->created_by=$request->author;\n $article->status=$request->status;\n\n $article->save();\n return redirect('/article')->with('success','berhasil tampah article');\n }", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.75612706", "0.7366207", "0.73296756", "0.72329146", "0.7229053", "0.72288036", "0.7188128", "0.71688867", "0.7160443", "0.71065235", "0.70874155", "0.7077079", "0.7057374", "0.70266134", "0.7019121", "0.69773734", "0.6954956", "0.693735", "0.6934205", "0.69257087", "0.6922324", "0.6921784", "0.68692803", "0.68658274", "0.68449485", "0.68448305", "0.68170536", "0.6779711", "0.6765555", "0.67551786", "0.6729103", "0.67228115", "0.6714122", "0.6706006", "0.67029524", "0.669572", "0.6693927", "0.6689247", "0.6651623", "0.66465986", "0.6632257", "0.6627593", "0.6612699", "0.6598554", "0.65823704", "0.6582112", "0.657392", "0.6563369", "0.6551728", "0.6551728", "0.6551728", "0.65493804", "0.6548828", "0.6541644", "0.6541492", "0.6525761", "0.65201855", "0.6508055", "0.6507565", "0.64840007", "0.64788204", "0.64629966", "0.6457912", "0.6457912", "0.6457912", "0.64543384", "0.643682", "0.6424208", "0.6410991", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309", "0.6408309" ]
0.0
-1
Show the form for editing the specified content.
public function edit($resourceable, $id, Section $section, Content $content) { $resource = Str::plural($resourceable); $resourceable = Str::singular($resourceable, 1); $model_name = str_replace('-', ' ',ucwords($resourceable)); $model_name = str_replace(' ', '',ucwords($model_name)); $resource_type = 'App\Models\\'.$model_name; $model = app($resource_type); $model = $model->find($id); $navigationUrl = Navigation::where('slug', $resource)->first(); $back = $navigationUrl->url.'/'. $id .'/edit'; return $this->view('resources.sections.components.content')->with('section', $section)->with('item', $content)->with('resource', $resource)->with('resourceable', $model)->with('back', $back); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit(Content $content)\n {\n //\n }", "public function edit(Content $content)\n {\n //\n }", "public function editAction() {\n if($this->_getParam('id',false)) {\n $form = new ContentForm();\n $form->submit->setLabel('Submit changes');\n $form->author->setValue($this->getIdentityForForms());\n $this->view->form = $form;\n if($this->getRequest()->isPost() \n && $form->isValid($this->_request->getPost())){\n if ($form->isValid($form->getValues())) {\n $updateData = $form->getValues();\n $where = array();\n $where[] = $this->_content->getAdapter()\n ->quoteInto('id = ?', $this->_getParam('id'));\n $oldData = $this->_content->fetchRow($this->_content\n ->select()->where('id= ?' , \n (int)$this->_getParam('id')))->toArray();\n $this->_helper->audit($updateData, $oldData, 'ContentAudit', \n $this->_getParam('id'), $this->_getParam('id'));\n $this->_content->update($updateData, $where);\n $this->_helper->solrUpdater->update('beocontent', \n $this->_getParam('id'), 'content'); \n $this->getFlash()->addMessage('You updated: <em>' \n . $form->getValue('title') \n . '</em> successfully. It is now available for use.');\n $this->getCache()->clean(Zend_Cache::CLEANING_MODE_ALL);\n $this->_redirect('admin/content/');\n } else {\n $form->populate($this->_request->getPost());\n }\n } else {\n // find id is expected in $params['id']\n $id = (int)$this->_request->getParam('id', 0);\n if ($id > 0) {\n $content = $this->_content->fetchRow('id=' . (int)$id)->toArray();\n if($content) {\n $form->populate($content);\n } else {\n throw new Pas_Exception_Param($this->_nothingFound);\n }\n }\n }\n } else {\n throw new Pas_Exception_Param($this->_missingParameter, 500);\n }\n }", "public function editView() {\n $this->template()->addTplFile('edit.phtml');\n $this->setTinyMCE($this->formEdit->text, 'advanced');\n $this->setTinyMCE($this->formEdit->textPanel, 'advanced', array('height' => 300));\n if(isset($this->formEdit->textFooter)){\n $this->setTinyMCE($this->formEdit->textFooter, 'advanced', array('height' => 300));\n }\n Template_Module::setEdit(true);\n }", "public function Edit($id=null) {\n $content = new CMContent($id);\n $form = new CFormContent($content);\n $status = $form->Check();\n if($status === false) {\n $this->AddMessage('notice', 'The form could not be processed.');\n $this->RedirectToController('edit', $id);\n } else if($status === true) {\n $this->RedirectToController('edit', $content['id']);\n }\n \n $title = isset($id) ? 'Edit' : 'Create';\n $this->views->SetTitle(\"$title content: \".htmlEnt($content['title']))\n ->AddInclude(__DIR__ . '/edit.tpl.php', array(\n 'user'=>$this->user, \n 'content'=>$content, \n 'form'=>$form,\n ));\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function edit(Content $content)\n {\n return view('contents.edit', compact('content'));\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n {\n //\n\n $content = Content::find($id);\n\n\n return view('admin.content.edit',compact('content'));\n }", "public function edit($id)\n {\n $model = Content::find($id);\n\n return view('admin.content.edit', [\n 'page' => 'Content',\n 'model' => $model,\n ]);\n }", "public function edit($id, $content)\n {\n }", "public function edit($id)\n {\n $selectedContent = DisplayContent::findOrFail($id);\n if (Auth::user()->can('update', $selectedContent)) {\n return view('pages.edit-content', compact('selectedContent'));\n } else {\n session()->flash('session_message', \"You don't have authentication to edit content\");\n return redirect()->route('userContent');\n }\n }", "public function edit($content_id)\n {\n $content= Content::findOrFail($content_id);\n $category= Category::select()->get();\n\n return view('contents.edit', ['content'=>$content,'category'=>$category]); \n\n }", "public function ShowContentEditForm(Params $params) {\n $template=$params->getOrFail('id_template','is_not0_integer','Invalid template identifier!');\n $templateProps=DataProvider::Get('Plugins\\DForms\\Templates','GetItemProperties',['template_id'=>$template]);\n $templatePages=DataProvider::Get('Plugins\\DForms\\Templates','GetItemPages',['template_id'=>$template],['sort'=>['pindex'=>'asc']]);\n if(!$templateProps instanceof IEntity || !$templatePages instanceof DataSet) {\n throw new AppException('Invalid DynamicForms template properties/pages!');\n }\n $fieldsTypes=DataProvider::Get('Plugins\\DForms\\Controls','GetItems',['for_state'=>1]);\n $target=$params->safeGet('target','','is_string');\n $view=new AppView(get_defined_vars(),$this,NULL);\n $view->AddFileContent($this->GetViewFile('ContentEditForm'));\n $view->Render();\n }", "public function edit($id)\n {\n $data['content'] = Content::findorfail($id);\n $this->authorize('edit', $data['content']);\n $data['page_title'] = 'Update Content';\n $data['categories'] = Category::all()->sortBy('name');\n $data['languages'] = Settings::LANGUAGES;\n $data['genres'] = Settings::GENRES;\n\n return view('client.content.edit', $data);\n }", "public function editForm(): void\n {\n $this->articleId = $_GET['id'];\n $query = $this->articleModel->displayOneArticle($this->articleId);\n $editArticle = $query->fetch();\n\n $this->title = $editArticle['title'];\n $this->content = $editArticle['content'];\n $this->category = $editArticle['category'];\n }", "public function edit($id)\n\t{\n\t\t$godpagecontent = GodPageContent::find($id);\n\t \n\t \n\t\treturn view('admin.godpagecontent.edit', compact('godpagecontent'));\n\t}", "function showContent()\n {\n if ($this->oprofile) {\n $this->showPreviewForm();\n } else {\n $this->showInputForm();\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit()\n {\n $js = [Module::asset(\"metafields:js/post.js\")];\n View::share('js_script', $js);\n $Post = Post::find($id);\n return view('metafields::backend.edit',array(\"title\" => \"Edit Metafields\"))->with('post', $Post);\n }", "public function editAction(): object\n {\n // Sets webpage title\n $title = \"Edit content\";\n\n // Sets extended webpage title\n $titleExtended = \" | Eshop\";\n\n // Framework variables\n $response = $this->app->response;\n $session = $this->app->session;\n\n // Verifies if user is logged in\n if (!$session->get(\"loggedIn\")) {\n $response->redirect(\"eshop/login\");\n };\n\n // Connects to db\n $this->app->db->connect();\n\n // Retrieve content id\n $contentId = getGet(\"id\");\n\n // SQL statement\n $sql = \"SELECT * FROM content WHERE id = ?;\";\n\n // Fetches data from db and stores in $resultset\n $content = $this->app->db->executeFetch($sql, [$contentId]);\n\n // Data array\n $data = [\n \"title\" => $title,\n \"titleExtended\" => $titleExtended,\n \"contentId\" => $contentId,\n \"content\" => $content,\n // \"filters\" => $filters\n ];\n\n // Includes admin header\n $this->app->page->add(\"content/header_admin\");\n\n // Adds route and sends data array to view\n $this->app->page->add(\"content/edit\", $data);\n\n // Renders page\n return $this->app->page->render($data);\n }", "public function editView($content, $conf)\n\t{\n\t\t// TODO: Make Form part of the Template....\n\t\t// get the latest ID to check for newer versions...\n\t\t$latestUID = $this->getUid($this->piVars[\"keyword\"]);\n\t\t\n\t\t// get NameSpacefor variables\n\t\t$getNS = preg_match_all( '/(.*)(:)(.*)/e', $this->piVars[\"keyword\"] , $NSmatches );\n\t\t$this->currentNameSpace = $NSmatches[1][0];\n\n\t\tif ($this->piVars[\"submitEdit\"] && !$this->read_only)\n\t\t{\t\t\n\t\t\t// the user has filled out the form before and submitted it, so we insert the\n\t\t\t// given data in the database and display the given keyword (this displays the freshly\n\t\t\t// created version)\n\t\t\t\t\t\n\t\t\t// check if a newer version is available or not:\n\t\t\t// No newer version:\n\t\t\tif ($latestUID <= $this->piVars[\"latest\"]) {\t\t\t\n\t\t\t\t\n\t\t\t\t//reassemble sections\n\t\t\t\tif ($this->piVars['section']) {\n\t\t\t\t\t//Get Data and Versions...\n\t\t\t\t\t$latestUid = $this->getUid($this->piVars[\"keyword\"]);\n\t\t\t\t\t$latestVersion = $this->pi_getRecord(\"tx_drwiki_pages\", $latestUid, 1);\n\t\t\t\t\t$this->piVars['body'] = $this->replaceSection($this->piVars['section'],$this->piVars['body'],$latestVersion['body']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->piVars[\"body\"] = $this->replaceSignature($this->piVars[\"body\"]);\n\t\t\t\t\n\t\t\t\t// remove summary text if it has not been changed\n\t\t\t\tif ($this->piVars['summary'] == $this->initSummary) { \n\t\t\t\t\t$this->piVars['summary'] = '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//check if previous record is locked (only when admin user is present)\n\t\t\t\t$isLocked = 0;\n\t\t\t\tif ($this->isUserWikiAdmin()) {\n\t\t\t\t\t$isLocked = $this->isRecordLocked($this->piVars['keyword']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// check hiding status --> only set it when email notification is\n\t\t\t\t// active - otherwise set to false\n\t\t\t\tif ($this->mailNotify) {\n\t\t\t\t\t$hidden = $this->mailHideItem;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$hidden = false;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$pageContent = array(\n\t\t\t\t\t\t'pid' => $this->storagePid,\n\t\t\t\t\t\t'crdate' => time(),\n\t\t\t\t\t\t'tstamp' => time(),\n\t\t\t\t\t\t'summary' => $this->piVars['summary'],\n\t\t\t\t\t\t'keyword' => trim($this->piVars['keyword']),\n\t\t\t\t\t\t'body' => $this->piVars['body'],\n\t\t\t\t\t\t'date' => $this->piVars['date'],\n\t\t\t\t\t\t'author' => $this->piVars['author'],\n\t\t\t\t\t\t'locked' => $isLocked,\n\t\t\t\t\t\t'hidden' => $hidden,\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t//TODO: Check if unset aray could be done more efficint\n\t\t\t\t$this->clearEditPiVars();\n\t\t\t\t$this->piVars[\"section\"] = \"\";\n\t\t\t\t$this->piVars[\"submitEdit\"] = \"\";\n\t\t\t\t$this->piVars[\"summary\"] = \"\";\n\t\t\t\t\n\t\t\t\t// HOOK: insert only if hook returns OK or is not set\n\t\t\t\tif($this->hook_submit_beforeInsert($pageContent)){\n\t\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_INSERTquery(\n\t\t\t\t\t'tx_drwiki_pages',\n\t\t\t\t\t$pageContent\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$note = '';\n\t\t\t\t\tif ($this->mailNotify) {\n\t\t\t\t\t\t$this->mailAdmin($GLOBALS['TYPO3_DB']->sql_insert_id(), $pageContent['keyword'], $pageContent['body']);\n\t\t\t\t\t\t\t$note = '<div class=\"wiki-box-yellow\">'.\n\t\t\t\t\t\t\t \t$this->cObj->cObjGetSingle($this->conf[\"sys_Info\"], $this->conf[\"sys_Info.\"]).\n\t\t\t\t\t\t\t \t$this->pi_getLL(\"pi_mail_notify_warning\", \"Your changes were mailed to the editor and will be added later on.\").\n\t\t\t\t\t\t\t\t\t'<br/><br/></div>';\t\t \t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// HOOK: to do something after insert\n\t\t\t\t$this->hook_submit_afterInsert($pageContent);\n\t\n\t\t\t\treturn $note . $this->singleView($content, $conf);\n\t\t\t} else { // changes are detected....\n\t\t\t\t$this->clearEditPiVars();\n\t\t\t\t$this->piVars[\"section\"] = \"\";\n\t\t\t\t$this->piVars[\"submitEdit\"] = \"\";\n\t\t\t\t$this->piVars[\"summary\"] = \"\";\n\t\n\t\t\t\t//get latest version of wiki-page from DB\t\t\t\n\t\t\t\t$this->internal[\"currentRow\"] = $this->pi_getRecord(\"tx_drwiki_pages\", $latestUID, 1);\n\t\t\t\treturn '<div class=\"wiki-box-red\">'.$this->cObj->cObjGetSingle($this->conf[\"sys_Warning\"], $this->conf[\"sys_Warning.\"]).$this->pi_getLL(\"pi_edit_ver_warning\", \"Attention: newer version detected!\").'</div>' . $this->singleView($this->internal[\"currentRow\"][\"content\"], $conf);\n\t\t\t}\t\t\n\t\t}\n\t\telseif ($this->piVars[\"previewEdit\"] && !$this->read_only)\n\t\t{\n\t\t\t$tmp_summary = $this->piVars[\"summary\"];\n\t\t\t$this->piVars[\"summary\"] = \"\";\n\t\t\t$tmp_body = $this->piVars[\"body\"];\n\t\t\t\n\t\t\t//get Preview\n\t\t\t$previewContent = $this->parse($tmp_body,1);\n\t\t\t$tmp_author = $this->piVars[\"author\"];\n\t\t\t$this->clearEditPiVars();\n\t\t\t\n\t\t\t$markerArray = $this->getEditMarkerArray($tmp_body, $tmp_author, $tmp_summary);\n\t\t\t\n\t\t\t$previewMarker = array(\n\t\t\t\t'###LABEL_PREVIEW###' => $this->pi_getLL(\"pi_edit_preview\", \"Preview\"),\n\t\t\t\t'###PREVIEW_CONTENT###' => $previewContent,\n\t\t\t);\n\t\t\t$content = $this->cObj->getSubpart($this->templateCode, \"###EDIT_FROM###\");\n\t\t\t\n\t\t\t$preview = $this->cObj->getSubpart($content, \"###EDIT_FROM_PREVIEW###\");\n\t\t\t$preview = $this->cObj->substituteMarkerArrayCached($preview, $previewMarker);\n\t\t\t\n\t\t\t$content = $this->cObj->substituteMarkerArray($content, $markerArray);\n\t\t\t$content = $this->cObj->substituteSubpart($content, '###EDIT_FROM_PREVIEW###', $preview);\n\t\t\treturn $content;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( ($this->activateAccessControl) )\t\t\t // Access control active?\n\t\t\t{ \n\t\t\t\tif ( !$GLOBALS[\"TSFE\"]->fe_user->user[\"uid\"] > 0 )\t// User is NOT logged in?\n\t\t\t\t{\n\t\t\t\t\t$parameters = array(\"redirect_url\" => $this->pi_linkTP_keepPIvars_url(array(\"cmd\" => \"edit\", \"submit\" => \"\"), 1, 0));\n\t\t\t\t\t$link = ($this->pageRedirect) ? $this->pi_linkToPage('Log-In',$this->pageRedirect,'',$parameters) : '';\n\t\t\t\t\t\n\t\t\t\t\t$content = '<div class=\"wiki-box-red\">'.\n\t\t\t\t\t \t\t\t$this->cObj->cObjGetSingle($this->conf[\"sys_Warning\"], $this->conf[\"sys_Warning.\"]).\n\t\t\t\t\t \t\t\t$this->pi_getLL(\"pi_edit_login_warning\", \"Attention: You need to be logged-in \").\n\t\t\t\t\t\t\t\t\t\t$link.'<br/><br/></div>';\n\t\t\t\t\treturn $content;\n\t\t\t\t} \n\t\t\t\tif ( ($this->allowedGroups == true) && (!$this->inGroup ($this->allowedGroups))\t// User is NOT in \"Allowed Groups\"?\n\t\t\t\t\t OR \n\t\t\t\t\t($this->disallowedGroups == true) && ($this->inGroup ($this->disallowedGroups)) ) // User IS in \"Disallowed Groups\"?\n\t\t\t\t{\n\t\t\t\t\t$parameters = array(\"redirect_url\" => $this->pi_linkTP_keepPIvars_url(array(\"cmd\" => \"edit\", \"submit\" => \"\"), 1, 0));\t\n\t\t\t\t\t$content = '<div class=\"wiki-box-red\">'.\n\t\t\t\t\t \t\t\t$this->cObj->cObjGetSingle($this->conf[\"sys_Warning\"], $this->conf[\"sys_Warning.\"]).\n\t\t\t\t\t \t\t\t$this->pi_getLL(\"pi_edit_disallowed\", \"Sorry, you are not allowed to edit or create this article. Please talk to the administrator if you think this is an error.\").\n\t\t\t\t\t\t\t\t\t\t'<br/><br/></div>';\n\t\t\t\t\treturn $content;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// display the edit form\n\t\t\t// TODO: take layout from template\n\t\n\t\t\t$author = $this->getUser();\n\t\t\t\n\t\t\t// if we don't know the uid, we search it by the keyword\n\t\t\tif (!$this->piVars[\"showUid\"])\n\t\t\t{\n\t\t\t$this->piVars[\"showUid\"] = $this->getUid($this->piVars[\"keyword\"]);\n\t\t\t}\n\t\n\t\t\t// get the record\n\t\t\t$this->internal[\"currentTable\"] = \"tx_drwiki_pages\";\n\t\t\t$this->internal[\"currentRow\"] = $this->pi_getRecord(\"tx_drwiki_pages\", $this->piVars[\"showUid\"], 1);\n\t\t\t\n\t\t\t\n\t\t\t//get the section to be edited\n\t\t\tif($this->piVars[\"section\"]) {\n\t\t\t\t$this->internal[\"currentRow\"]['body'] = $this->getSection($this->getFieldContent(\"body\"), $this->piVars[\"section\"]);\n\t\t\t}\n\t\n\t\t\t// if we have no keyword we take it from the current data\n\t\t\tif (!$this->piVars[\"keyword\"])\n\t\t\t{\n\t\t\t$this->piVars[\"keyword\"] = trim($this->getFieldContent(\"keyword\"));\n\t\t\t}\n\t\t\t\n\t\t\t$markerArray = $this->getEditMarkerArray($this->getFieldContent(\"body\"), $author);\n\t\t\t$content = $this->cObj->getSubpart($this->templateCode, \"###EDIT_FROM###\");\n\t\t\t$content = $this->cObj->substituteMarkerArray($content, $markerArray);\n\t\t\t$content = $this->cObj->substituteSubpart($content, '###EDIT_FROM_PREVIEW###', '');\n\n\t\t\treturn $content;\n\t\t}\n\t}", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n { \n $page_content = PageContents::where('id', $id)\n ->first(); \n\t\t\n //dd($page_content); \n\t\t\n return view('admin.page_contents.edit',compact('page_content'));\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "public function edit() {\n\t\t$data['pagetitle'] = 'Dashboard - Edit Posts';\n\n\t\t$data['postid'] = $viewmodel->getPostById($postid['id'] );\n\t\tView::renderAdminTemplate($data, \"App/Views/admin/edit/index.php\") ;\n\t}", "public function edit()\n {\n return view('website::edit');\n }", "public function edit(Page $page, PageContent $content)\n {\n return $this->view('titan::pages.components.content')\n ->with('page', $page)\n ->with('item', $content);\n }", "public function edit($container_id, $content_id='')\n {\n $container = $this->repository->getContainer($container_id);\n $selected_folder_id = $container['folder_id'];\n if($content_id != ''){\n $content = $this->repository->getContentById($content_id);\n if($content['container_id'] != $container_id){\n // todo, throw exception\n echo \"an error has occured\";\n die;\n }\n // make sure container_id's match from container and content\n $content = $content['content'];\n } else {\n $content = $this->repository->getLatestContentByContainerId($container_id);\n }\n $this->prepareLeftMenu($selected_folder_id);\n return view('editor::scaffold.editor', compact('container', 'content', 'content_id'));\n }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit(content_management $content_management) {\n //\n return view('admin.content_management.edit', compact('content_management'));\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit()\n {\n return view('escrow::edit');\n }", "public function getEditForm();", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n //\n return view('dashboard.content.edit')\n ->with('content',Content::find($id))\n ->with('images',$this->LoadImages());\n\n }", "public function edit($id)\n {\n return Admin::content(function (Content $content) use ($id) {\n\n $content->header(__('cms.entries.edit_header'));\n $content->description(__('cms.entries.edit_description'));\n\n $content->body($this->form()->edit($id));\n });\n }", "public function edit()\n {\n $id = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $post = $this->post->getPost($id); // je récupère le post\n\n // j'arrive en post car des données sont saisies dans le formulaire\n if($this->request->parameterExist('title') && $this->request->parameterExist('content')) {\n\n $this->post->updatePost(\n $this->request->getParameter('title'),\n $this->request->getParameter('content'),\n $id\n );\n\n $this->redirect(\"admin\", \"post/\" . $post['id']); // une fois le post créé, je redirige vers la vue Admin/post/iddupost\n }\n\n // j'arrive sur la vue en Get\n $this->buildView(array('post'=>$post));\n }", "public function contentedit($id)\n\t{\n\n\t\t$inputCategory = CategoryParent::find($id);\n\t\t$inputSeo = AdminSeo::where('model_id', $id)->where('model_name', 'CategoryParent')->first();\n\t\t$inputgame_category_parent = GameRelation::where('category_parent_id', $id)->first();\n\t\treturn View::make('admin.category_parent.edit')->with(compact('inputCategory', 'inputSeo','inputgame_category_parent'));\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n $setting = FirstContent::all()->first();\n return view('admin.settings.first-content',compact('setting'));\n }", "public function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'player' );\n\t\tJRequest::setVar( 'layout', 'form' );\n\t\tJRequest::setVar('hidemainmenu', 1);\n\t \t \n\t\tparent::display();\n\t}", "public function edit($id){\n $row = WhSequencer::find($id);\n return view('system.sequencer_form',[\n 'mode' => 'edit',\n 'doctype' => WhDocType::all(),\n 'row' => $row,\n ]);\n }", "public function edit_action() {\n Utils\\verifyPermission($this->edit_permission);\n $this->actionHeader();\n $this->addScript('jquery.autosize-min.js');\n $this->addScript('vendor/jquery.ui.widget.js');\n $this->addScript('jquery.iframe-transport.js');\n $this->addScript('jquery.fileupload.js');\n $this->addScript('ckeditor/ckeditor.js');\n $this->renderBodyTemplate('edit');\n }", "protected function editShowForm($id) \n {\n $data = Article::findOrFail($id); \n if (Gate::denies('content-access', $data))\n return response('unauthorized access', 403);\n\n return view('dashboard.article.add')->with('data', $data);\n }", "function content() {\n echo \"\n <form action='' method='post'>\n <input name='token' type='hidden' value='{$this->params['editToken']}'>\n <input name='editId' type='hidden' value='{$this->params['editId']}'>\n <label for='username'>Username</label>\n <input name='username' placeholder='Username' id='username' type='text' value='{$this->params['username']}'>\n <label for='password'>Password</label>\n <input name='password' placeholder='Replace password (Optional)' id='password' type='password'>\n <label for='role'>Role</label>\n <select name='role' id='role' {$this->params['rolePower']}>\n <option value='1' {$this->params['isAdmin']}>Admin</option>\n <option value='2' {$this->params['isAgent']}>Agent</option>\n </select>\n <input type='submit' value='Edit Account'>\n </form>\n \";\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function edit($model, $form);", "public function edit($id)\n {\n $content = Content::find($id);\n\n return view('contens.edit', ['content' => $content]);\n }", "public function edit($content)\n {\n $mapData = $this->_defaultData($content);\n return parent::edit($mapData);\n }", "abstract protected function renderEdit();", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function edit($id)\n {\n $data['post'] = Content::where('_id', $id)->first();\n if(!$data['post']) {\n return redirect()->route('admin.content.index');\n }\n return view('admin.content.edit', $data);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function edit($id)\n {\n $content = $this->contentRepository->findOrFail($id);\n\n return view($this->_config['view'], compact('content'));\n }", "public function showEdit()\n {\n\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function actionEdit(){\n\t\t$form = $_POST;\n\t\t$id = $form['id'];\n\t\tunset($form['id']);\n\t\tunset($form['submit_']);\n\t\tif($form['active'] == 'on'){\n\t\t\t$form['active'] = 1;\n\t\t}\n\t\t$db = $this->context->getService('database');\n\t\t$db->exec('UPDATE core_pages SET ? WHERE id = ?', $form, $id);\n\t\t$this->redirect('pages:');\n\t}", "public function display_edit_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=update' method='post'>\";\n echo \"<input type='hidden' name='id' value=\".$this->id.\" />\";\n echo \"Name: <input type='text' name='name' value=\".$this->name.\" /><br />\";\n echo \"Description: <textarea name='description'>\".$this->description.\"</textarea><br />\";\n echo \"<input type='submit' value='Update' />\";\n echo \"</form>\";\n }", "function lb_show_edit_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'edit',\n\t\t\t'this_cafe' => lb_get_this_cafe_from_cafe( $_GET['edit-id'] ),\n\t\t)\n\t);\n}", "protected function edit() {\n\t\t// Make sure a user exists.\n\t\tif (empty($this->user)) {\n\t\t\t$_SESSION['title'] = 'Error';\n\t\t\t$_SESSION['data'] = array(\n\t\t\t\t'error' => 'The selected user was invalid.',\n\t\t\t\t'link' => 'management/users'\n\t\t\t);\n\t\t\tredirect(ABSURL . 'error');\n\t\t}\n\n\t\t// Prepare data for contents.\n\t\tnonce_generate();\n\t\t$data = array(\n\t\t\t'user' =>& $this->user\n\t\t);\n\t\t$this->title = 'Edit User: ' . $this->user['username'];\n\t\t$this->content = $this->View->getHtml('content-users-edit', $data, $this->title);\n\t}", "function edit($id, $advanced = FALSE){\r\n $result = $this->reg->db->GetRow('SELECT title, head, content, advanced, show_title, show_date\r\n FROM system__content\r\n WHERE id = ?', array($id[0], $_SESSION['SYSTEM']['USER_ID']));\r\n\r\n // escape data for post\r\n $html['title'] = $this->reg->validation->escape_html($result['title']);\r\n $html['head'] = $result['head'];\r\n $html['content'] = $this->reg->validation->escape_rich_text($result['content']);\r\n $html['advanced'] = $this->reg->validation->escape_html($result['advanced']);\r\n $html['show_title'] = $this->reg->validation->escape_html($result['show_title']);\r\n $html['show_date'] = $this->reg->validation->escape_html($result['show_date']);\r\n\r\n // create the form\r\n $edit_post = new form('edit_post');\r\n $edit_post->add(new form_text('title', 'Content Title'));\r\n $edit_post->title->set_validators('is_safe_text', 'is_required');\r\n $edit_post->title->set_attributes(array('length' => 255, 'size' => 80, 'value' => $html['title']));\r\n\r\n // run query to get all the navigation items that can have posts\r\n $result = $this->reg->db->GetAll('SELECT id, name\r\n FROM system__navigation\r\n WHERE navigation_type != ?', array('direct'));\r\n\r\n // populate pages array for form object\r\n $pages_array = array('' => 'Choose a Page');\r\n foreach($result as $pages){\r\n $pages_array[$pages['id']] = ucwords($pages['name']);\r\n }\r\n\r\n // query all the pages content is already to link to\r\n $linked = $this->reg->db->GetCol('SELECT navigation_id\r\n FROM system__intersect__navigation_content\r\n WHERE content_id = ?', array($id[0]));\r\n\r\n // check that the page is linked\r\n if(count($linked)){\r\n $edit_post->add(new form_select('pages', 'Choose a Page', $pages_array));\r\n $edit_post->pages->set_multiplier(1, 'Add Another');\r\n $edit_post->pages->set_default($linked);\r\n }else{\r\n $edit_post->add(new form_select('pages', 'Choose a Page', $pages_array));\r\n $edit_post->pages->set_multiplier(1, 'Add Another');\r\n }\r\n\r\n\r\n // show advanced options if enabled\r\n if($html['advanced'] || $advanced){\r\n $edit_post->add(new form_hidden('advanced', TRUE));\r\n\r\n // get default option values\r\n $default_options = array();\r\n if($html['show_title'])\r\n $default_options[] = 'show_title';\r\n if($html['show_date'])\r\n $default_options[] = 'show_date';\r\n\r\n // create options check boxes\r\n $edit_post->add(new form_checkbox('options', 'Options', array('show_title' => 'Show Title', 'show_date' => 'Show Date')));\r\n $edit_post->options->set_default($default_options);\r\n\r\n // create rich text editor\r\n $edit_post->add(new form_editor_ace('head', 'Hook Into HTML Head', 'html'));\r\n $edit_post->head->set_default($html['head']);\r\n $edit_post->head->set_attributes(array('style' => 'height:10em;'));\r\n $edit_post->head->set_li_attributes(array('class' => 'form-richtextarea'));\r\n\r\n // create rich text editor\r\n $edit_post->add(new form_editor_ace('content', 'Content', 'html'));\r\n $edit_post->content->set_default($html['content']);\r\n $edit_post->content->set_validators('is_required');\r\n $edit_post->content->set_attributes(array('style' => 'height:30em;'));\r\n $edit_post->content->set_li_attributes(array('class' => 'form-richtextarea'));\r\n }else{\r\n // create rich text editor\r\n $edit_post->add(new form_editor_ckeditor('content', 'Content'));\r\n $edit_post->content->set_default($html['content']);\r\n $edit_post->content->set_validators('is_required');\r\n $edit_post->content->set_attributes(array('style' => 'height:30em;'));\r\n $edit_post->content->set_li_attributes(array('class' => 'form-richtextarea'));\r\n }\r\n\r\n $edit_post->add(new form_hidden('post_id', $id));\r\n $edit_post->add(new form_submit('save','Save'));\r\n $edit_post->add(new form_submit('published', 'Publish'));\r\n $edit_post->published->set_attributes(array('value' => 1));\r\n\r\n // return the form html\r\n return $edit_post->run();\r\n }", "public function edit(form $form)\n {\n //\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit( $id ) {\n // return \"Mostrar aqui formulario para formapago con id $id\";\n $formaPagos = FormaPago::find( $id );\n return view('admin.formapago.edit')->with(compact('formaPagos')); //formulario de registro\n }", "public function edit()\n {\n return view('panel.order-management.payment.form-edit');\n }", "public function editForm() {\n return tpl::load(__DIR__ . DS . 'form.php', array('field' => $this));\n }", "function edit()\n\t{\n\t\t$user\t= & JFactory::getUser();\n\n\t\t// Make sure you are logged in\n\t\tif (!$user->authorise('com_weblink.weblink.edit')) {\n\t\t\tJError::raiseError(403, JText::_('ALERTNOTAUTH'));\n\t\t\treturn;\n\t\t}\n\n\t\tJRequest::setVar('view', 'weblink');\n\t\tJRequest::setVar('layout', 'form');\n\n\t\t$model = &$this->getModel('weblink');\n\t\t$model->checkout();\n\n\t\tparent::display();\n\t}", "public function edit($id)\n {\n $SEO = SEO::find($id);\n if (!$SEO->status) {\n abort(404);\n }\n\n return view('backend.seos.form', [\n 'item' => $SEO,\n\n 'nameAction' => $SEO->original_url,\n 'idEntity' => $SEO->id,\n 'controllerPathList' => self::$path,\n 'controllerAction' => 'edit',\n 'controllerEntity' => new SEO(),\n ]);\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit($id)\n {\n $data['item'] = Article::findOrFail($id);\n $data['page'] = 'edit';\n $data['url'] = route('article.update', $id);\n \n return view('backend.article.form.index', $data);\n }", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function modifyView() {\n $this->object = $this->object->readObject($this->id);\n $uiObjectName = $this->type.'_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n return $uiObject->renderForm(array_merge(\n array('values'=>$values,\n 'action'=>url($this->type.'/modify', true),\n 'class'=>'formAdmin formAdminModify'),\n array('submit'=>array('save'=>__('save'),\n 'saveCheck'=>__('saveCheck')))));\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function editAction()\n {\n $tiles = [];\n // Reuse the parameters from $_REQUEST\n // If we are going to render a full page for edit form, we shall also render the _form_controls\n $tiles[] = Region::create($this->getEditRegionPath(), array_merge($_REQUEST, [\n '_form_controls' => true,\n ]));\n return $this->render($this->findTemplatePath('page.html') , array( 'tiles' => $tiles ));\n }", "public function edit($id)\n {\n // get the nerd\n $page = Page::find($id);\n\n // show the edit form and pass the nerd\n return View::make('backend.pages.edit')\n ->with('page', $page);\n }", "public function editAction()\n {\n return $this->editor($isEditAction=true);\n }", "function pa_edit() {\n\t\t\t\t$edit_pid = (int)UTIL::get_post('edit_pid');\n\t\t\t\t\n\t\t\t\t//-- haben wir keine edit-id, gibts eine seiten-tabelle zur auswahl\n\t\t\t\tif (!$edit_pid) {\n\t\t\t\t\techo 'error: no pid';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$form = MC::create('form');\n\t\t\t\t$form->init('page', 'mod_page');\n\t\t\t\t$form->add_hidden('edit_pid', $edit_pid);\n\t\t\t\t\n\t\t\t\t// hatten wir fehler\n\t\t\t\tif ($this->get_var('error')) {\n\t\t\t\t\t$form->set_values($this->get_var('data'));\n\t\t\t\t\t$form->set_error_fields($this->get_var('error'));\n\t\t\t\t}\t\n\t\t\t\telse {\n\t\t\t\t\t// frisch aus db lesen\n\t\t\t\t\t$sql = 'SELECT * FROM '.$this->mod_tbl.' WHERE id='.$edit_pid;\n\t\t\t\t\t$res = $this->DB->query($sql);\n\t\t\t\t\t$data = $res->r();\n\t\t\t\t\t$form->set_values($data);\n\t\t\t\t}\n\n\t\t\t\t$this->set_var('path', $this->_get_path_print($edit_pid));\n\t\t\t\t$this->set_var('form', $form);\n\t\t\t\t\n\t\t\t\t$this->OPC->generate_view($this->tpl_dir.'pa_edit.php');\n\n\t\t\t}", "public function edit($id)\n {\n $miembro = Miembro::find($id);\n\n return View::make('miembros.edit')->with(array('miembro' => $miembro));\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function getEditForm($id = 0, $content = '', $ctx = 'web') {\n $user = $this->modx->user;\n $name = $user->get('username');\n $email = $user->Profile->get('email');\n $fullname = $user->Profile->get('fullname');\n $tmp = array(\n 'user' => !empty($fullname) ? $fullname : $name,\n 'avator' => $this->getAvatar($email),\n 'controlsbb' => $this->getEditControls('comment-' . $id),\n 'previewCheckbox' => $this->modx->lexicon('modxtalks.preview_checkbox'),\n 'content' => $content,\n 'id' => $id,\n 'write_comment' => $this->modx->lexicon('modxtalks.write_comment'),\n 'save_changes' => $this->modx->lexicon('modxtalks.save_changes'),\n 'cancel' => $this->modx->lexicon('modxtalks.cancel'),\n );\n $tpl = $this->getTpl($this->config['commentEditFormTpl']);\n $form = $this->parseTpl($tpl, $tmp);\n\n return $form;\n }", "public function edit()\n {\n if (Entry::canCreateOrEdit() === false) {\n return Redirect::route('entry.index')\n ->withMessage(\"Sorry, the competition has now started and entries cannot be changed.\");\n }\n\n $entry = $this->getEntry();\n\n if ($entry) {\n return View::make('entry.edit')\n ->with('entry', $entry);\n }\n\n return Redirect::route('entry.index');\n }", "public function edit($id)\n {\n $categories = Category::all();\n $data = Content::find($id);\n return view('content/edit', ['title' => 'Edit Content', 'action' => 'content/' . $id, 'method' => 'PUT', 'categories' => $categories, 'data' => $data, 'selected' => $data->categories]);\n }", "public function edit($id)\n {\n $magazine = Magazine::find($id);\n $all_authors = Author::orderBy('surname')->get();\n return view('updateMagazineForm', [\n 'magazine' => $magazine,\n 'all_authors' => $all_authors \n ]);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function _editAction() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\tif (array_key_exists ( 'cid', $args )) {\n\t\t\t$action_id = $args ['cid'] [0];\n\t\t} else {\n\t\t\t$action_id = @$args [3] ? @$args [3] : $args [1];\n\t\t}\n\t\t\n\t\t$field = $this->getModel ( 'field' );\n\t\t$field->getAllWhere ( 'form_id = \"' . ( int ) $this->_getFormId () . '\"' );\n\t\t\n\t\t$action = $this->getModel ( 'action' );\n\t\t$action->get ( ( int ) $action_id );\n\t\t\n\t\t$this->loadPluginModel ( 'actions' );\n\t\t\n\t\t$this->setView ( 'edit_action' );\n\t\n\t}", "public function editForm($id)\n {\n $record = HistoryDb::findOrFail($id);\n $this->edit_id = $id;\n $this->title = $record->title;\n $this->description = $record->description;\n $this->event_date = $record->event_date;\n $this->mode = 'edit';\n $this->submit_text = \"Update\";\n\n // Util::showAlert($this,'Test content...!');\n\n }", "public function edit($id)\n\t{\n\t\t//\n\t\t// get the article\n\t\t$article = Article::find($id);\n\t\t$article->startdate = (is_null($article->startdate)? null : DateTime::createFromFormat('Y-m-d', $article->startdate)->format('d-m-Y'));\n\t\t$article->enddate = (is_null($article->enddate)? null : DateTime::createFromFormat('Y-m-d', $article->enddate)->format('d-m-Y'));\n\t\n\t\t$objlanguages = $this->getInformation($id);\n\t\t$objselected_pages = $this->getSelectedPages($id);\n\t\t\n\t\t// show the edit form and pass the nerd\n\t\treturn View::make('dcms::articles/articles/form')\n\t\t\t->with('article', $article)\n\t\t\t->with('languages', $objlanguages)\n\t\t\t->with('categoryOptionValues',CategoryID::OptionValueArray(false))\n\t\t\t->with('pageOptionValues',Pagetree::OptionValueArray(false))\n\t\t\t->with('pageOptionValuesSelected',$this->setPageOptionValues($objselected_pages))\n\t\t\t->with('sortOptionValues',$this->getSortOptions($objlanguages))\n\t\t\t->with('enableArticleToPage',$this->enableArticleToPage);\n\t}", "public function edit()\n {\n //return view('movie::edit');\n }", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}" ]
[ "0.75955343", "0.73685956", "0.73685956", "0.734441", "0.73215187", "0.7308661", "0.72540677", "0.72201234", "0.7191774", "0.7159587", "0.7147548", "0.7137885", "0.7092438", "0.70601207", "0.70163417", "0.7004242", "0.6971628", "0.69682795", "0.6959278", "0.6929235", "0.69136244", "0.6894665", "0.6893116", "0.6844652", "0.6795902", "0.6794092", "0.6788104", "0.6787744", "0.6765061", "0.67614317", "0.6742578", "0.67208683", "0.6719106", "0.67165965", "0.67115736", "0.6700013", "0.6695691", "0.6693257", "0.6684845", "0.66783243", "0.66783243", "0.6671944", "0.6664985", "0.66635627", "0.6662825", "0.6634827", "0.6634573", "0.66344523", "0.6632116", "0.6631577", "0.66275495", "0.6624207", "0.66212225", "0.66209066", "0.66205823", "0.6616721", "0.6610243", "0.6601089", "0.6601086", "0.6592072", "0.6577875", "0.65764683", "0.65646017", "0.65579", "0.65346074", "0.6534478", "0.6534478", "0.65107423", "0.6491627", "0.6488367", "0.6484851", "0.6483293", "0.64778984", "0.6477667", "0.64755404", "0.64648145", "0.6462234", "0.646006", "0.6459655", "0.6440375", "0.6430951", "0.6419099", "0.64076024", "0.6406769", "0.6405783", "0.6405731", "0.6399664", "0.6385051", "0.63753814", "0.6373058", "0.63680625", "0.63679874", "0.6366636", "0.63592124", "0.63588655", "0.63570285", "0.6356928", "0.6356856", "0.6354906", "0.6354867", "0.6353218" ]
0.0
-1
Update the specified content in storage.
public function update($resourceable, $id, Section $section, Content $content) { $resource = Str::plural($resourceable); if (is_null(request()->file('media'))) { $attributes = request()->validate(Arr::except(Content::$rules, 'media'), Content::$messages); } else { $attributes = request()->validate(Content::$rules, Content::$messages); $media = $this->moveAndCreatePhoto($attributes['media'], $size = ['l' => Content::$LARGE_SIZE, 's' => Content::$THUMB_SIZE]); if ($media) { $attributes['media'] = $media; } } $item = $this->updateEntry($content, $attributes); $item->sections()->syncWithoutDetaching([$section->id]); return redirect('admin/'.$resource.'/' . $id . '/sections/'.$section->id.'/content/' . $content->id . '/edit'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($content);", "public function update(): void\n {\n $content = $this->getOriginalContent();\n\n $parsed = $this->parseContent($content);\n\n $this->storeList($parsed);\n }", "public function put($content);", "public function update(Request $request, Content $content)\n {\n //\n }", "public function updateDataAction()\n {\n $contentService = Dm_Session::GetServiceFactory()->getContentService();\n /* @var $contentService Service_Api_Handler_Content_Baseo */\n $filter = new Service_Api_Filter_Content();\n $filter->id = $this->_getParam('id');\n\n $data = array();\n foreach (array('name', 'description', 'tags', 'shareWithNetwork', 'datePublication', 'dateExpiration')\n as $attrName) {\n if (($val = $this->_getParam($attrName)) !== null) {\n $data[$attrName] = $val;\n }\n }\n if (sizeof($data) > 0) {\n try {\n $count = $contentService->contentsUpdate($filter, $data);\n $this->view->assign(\n array_merge(\n get_object_vars($count) ?: array(),\n array('message' => ucfirst($this->view->translate('content updated successfully'))))\n );\n } catch (Mk_ApiException $e) {\n $this->view->error = $this->view->getHelper('errors')->translateFullException($e);\n }\n }\n }", "public function update($contenido);", "public function update($key, &$content) {\n\t\tif (_DEBUG && $this->has($key)) {\n\t\t\tDebug::getInstance()->addError('The content [dir:' . $this->_dir . ', key:' . $key . '] don\\'t exist');\n\t\t}\n\t\t$type = $this->get($key);\n\t\t$this->delete($key);\n\t\t$this->add($key, $content, $type);\n\t}", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function put($path, $content);", "public function update($input = array()) {\n\n $data = a::update($this->content()->toArray(), $input);\n\n if(!data::write($this->textfile(), $data, 'kd')) {\n throw new Exception('The page could not be updated');\n }\n\n $this->kirby->cache()->flush();\n $this->reset();\n $this->touch();\n return true;\n\n }", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "function drush_acapi_update_file($path, $content) {\n $current = @file_get_contents($path);\n if ($current != $content) {\n file_put_contents($path, $content);\n drush_log(dt('Updated %path.', array('%path' => $path)), 'ok');\n return TRUE;\n }\n return FALSE;\n}", "public function update(StoreArticleRequest $request)\n {\n //\n $input = $request->except('id');\n $input['intro']=mb_substr($request->get('content'),0,46);\n \n $request->input('intro',mb_substr($request->get('content'),0,46));\n \n $article = Article::find($request->get('id'));\n $article->update($input);\n $article->tags()->sync($request->get('tag_list'));\n //dd($request->all());\n return redirect('/');\n }", "public function update(Request $request)\n {\n foreach(EditContent::get() as $content) {\n if (!$request->has($content->key)) {\n if ($content->type != 'image') {\n // Remove content if no content is submitted\n $content->content = '';\n $content->save();\n }\n\n continue;\n }\n\n switch($content->type) {\n case 'text':\n case 'textarea':\n $content->content = $request->post($content->key);\n $content->save();\n break;\n\n case 'image':\n if (!empty($content->content)) {\n $picture = Picture::find($content->content);\n\n if (!empty($picture)) {\n Storage::delete('images/' . $picture->path);\n $picture->delete();\n }\n }\n\n $image = $request->file($content->key);\n $name = $image->getClientOriginalName();\n $filename = $image->hashName();\n $image->storeAs('images', $filename);\n\n $picture = new Picture();\n $picture->name = $name;\n $picture->path = $filename;\n $picture->date = \\DateTime::createFromFormat('U', $image->getCTime());\n $picture->save();\n\n $content->content = $picture->id;\n $content->save();\n break;\n\n case 'checkbox':\n $content->content = (bool) $request->post($content->key);\n $content->save();\n break;\n }\n }\n\n if (!empty($request->get('redirect_url'))) {\n return redirect($request->get('redirect_url'));\n }\n\n return redirect(action('Backend\\EditContentController@index'));\n }", "public function put($path,$content) ;", "public function update($path, $contents, Config $config)\n {\n }", "public function update($path, $contents, Config $config)\n {\n }", "public function update(Request $request, $id)\n {\n $validatedData = $request->validate([\n 'content_title' => 'required|max:255',\n 'content_description' => 'required',\n 'image_upload' => 'image|nullable| max:1999'\n ]);\n\n $selectedContent = DisplayContent::findOrFail($id);\n\n if (Auth::user()->can('update', $selectedContent)) {\n $selectedContent->content_title = $validatedData['content_title'];\n $selectedContent->content_description = $validatedData['content_description'];\n\n if ($request->hasFile('image_upload')) {\n $fullFileName = $request->file('image_upload')->getClientOriginalName();\n $filename = pathinfo($fullFileName, PATHINFO_FILENAME);\n $fileExtension = $request->file('image_upload')->getClientOriginalExtension();\n $fileNameToStore = $filename . '_' . time() . '.' . $fileExtension;\n\n unlink('storage/images/' . $selectedContent->image->filename);\n Image::where('imageable_type', 'App\\Models\\DisplayContent')->where('imageable_id', $selectedContent->id)->delete();\n\n\n $image = new Image(['filename' => $fileNameToStore]);\n $selectedContent->image()->save($image);\n $request->file('image_upload')->storeAs('public/images', $fileNameToStore);\n }\n\n $selectedContent->save();\n session()->flash('session_message', \"Content Updated\");\n return redirect()->route('userContent');\n } else {\n session()->flash('session_message', \"You don't have authentication to update selected content\");\n return redirect()->route('userContent');\n }\n\n }", "public function putContent($data) {\n\t\t$this->storage->file_put_contents($this->path, $data);\n\t}", "function ccontent_update()\n\t{\n\t\tlusers_require('content/update');\n\n\t\t$post_data = linput_post();\n\t\t$post_data['time'] = date('Y-m-d', strtotime($post_data['date'])) . ' ' . date('H:i:s', strtotime($post_data['time']));\n\n\t\tif (hform_validate(array('name', 'link', 'body')))\n\t\t{\n\t\t\t$cat = mcontent_get_cat($post_data['id']);\n\n\t\t\tlimage_upload_many(lconf_get('content', 'images'), $post_data['link']);\n\n\t\t\tmcontent_update($post_data['id'], $post_data);\n\t\t\t// Check if link is default uri and change default uri too if needed\n\t\t\tif ($cat['link'] == lconf_dbget('default_uri')) lcrud_update(llang_table('settings'), array('name' => 'default_uri'), array('value' => $post_data['link']));\n\t\t\t// Do not update name for category from here\n\t\t\tunset($post_data['name']);\n\t\t\tmcategories_update($cat['id'], $post_data);\n\t\t\t// Update comments too\n\t\t\tlcrud_update(llang_table('comments'), array('module' => CONT, 'module_item' => $cat['link']), array('module_item' => $post_data['link']));\n\n\t\t\tlcache_delete_all();\n\n\t\t\tluri_redirect('main/user/admin/content', l('Content successfully updated.'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$content = mcontent_read($post_data['id']);\n\t\t\tluri_sredirect(lroute_get_uri('main/user_item/admin/content_update') . '/' . $content['link'], l('All fields marked with * are required.'));\n\t\t}\n\t}", "public function updateAction()\n {\n $req = $this->get('request');\n $htmlId = $req->get('editorID');\n $newContent = $req->get('editabledata');\n $em = $this->getDoctrine()->getEntityManager();\n $content = $em->getRepository('AppBundle:StaticContent')\n ->findOneByHtmlId($htmlId);\n $content->setHtml($newContent);\n $em->persist($content);\n $em->flush();\n\n return new JsonResponse(array('status' => 'Database updated static element '.$htmlId.' New content: '.$newContent));\n }", "public function update($data) {}", "public function update($data) {}", "public function update(Request $request, Content $content)\n {\n if($request->is_image){\n $validated = $request->validate([\n 'value' => 'required|mimes:jpg,png,jpeg'\n ]);\n \n $this->delete($content->value);\n \n $image_name = $this->create_name($content->id, $request->file('value')->extension());\n \n if(!$request->file('value')->move(public_path('images/'), $image_name)) return back()->with('fail', 'فشل في تحميل الصورة حاول مجددا');\n\n $content->value = $image_name;\n\n }else{\n $validated = $request->validate([\n 'value' => 'required'\n ]);\n $content->value = $request->value;\n }\n\n $content->save();\n return back()->with('success', 'تم تعديل البيانات بنجاح');\n }", "public function updateContent(Request $request, $idcontent){\n\n $utility = new UtilityController();\n $modifieddate = $utility->setDatetime();\n\n //find content info\n $Contents = Content::where('idcontent', $idcontent)\n ->where('delete', 0)\n ->get();\n\n if($Contents->count() > 0 ) { \n //check if image have content\n if($request->file('image')==null){\n $updateContents = Content::where('idcontent', $idcontent);\n if($updateContents->update([\n 'title' => $request->title,\n 'content' => $request->content,\n 'description' => $request->description,\n 'modifieddate' => $modifieddate\n ])) { \n \n /**\n * instantiate TagController and save on tag table\n * then get id everytime its save on $taglist\n */\n $tagCont = new TagController();\n $taglist = $tagCont->createContentTag($request->tag);\n\n $redis = new RedisController();\n $delTag = $redis->deleteContentTag($idcontent);\n\n /**\n * loop thru $taglist\n * then instantiate RedisController\n * hset everything on $taglist\n */\n for ($i = 0; $i < count($taglist); $i++) {\n $redis->contentTag($taglist[$i][0], $idcontent);\n }\n return response()->json([\n 'message' => '',\n 'result' => true\n ]);\n } else {\n return response()->json([\n 'message' => 'content save failed.',\n 'result' => false\n ]);\n }\n \n }else{\n //update content\n $photo = $request->file('image');\n $utility = new UtilityController();\n $newImage = $utility->contentResize($photo);\n\n //set new name for image to save on database\n $image = 'assets/content/'.time().'.'.$photo->getClientOriginalExtension(); \n\n //set directory to save the file\n $destinationPath = $utility->public_path('/'); \n $updateContents = Content::where('idcontent', $idcontent);\n if($updateContents->update([\n 'title' => $request->title,\n 'content' => $request->content,\n 'description' => $request->description,\n 'content_img' => $image,\n 'modifieddate' => $modifieddate\n ])) {\n //save to image to public/assets/banner folder\n $newImage->save($destinationPath.'/'.$image,80);\n \n /**\n * instantiate TagController and save on tag table\n * then get id everytime its save on $taglist\n */\n $tagCont = new TagController();\n $taglist = $tagCont->createContentTag($request->tag);\n\n $redis = new RedisController();\n $delTag = $redis->deleteContentTag($idcontent);\n\n /**\n * loop thru $taglist\n * then instantiate RedisController\n * hset everything on $taglist\n */\n for ($i = 0; $i < count($taglist); $i++) {\n $redis->contentTag($taglist[$i][0], $idcontent);\n }\n return response()->json([\n 'message' => '',\n 'result' => true\n ]);\n } else {\n return response()->json([\n 'message' => 'content save failed.',\n 'result' => false\n ]);\n }\n }\n } else {\n return response()->json([\n 'message' => 'Content not found.',\n 'result' => false\n ]); \n } \n }", "public function update($path);", "public function update(Request $request, Content $content)\n {\n $input = $this->validateRequest();\n\n abort_unless((\\Gate::allows('content_edit') OR\n \\Gate::allows($input['referenceable_type'].'_content_edit')), 403);\n //todo: check if user is owner or has creator/admin role\n\n $content->update([\n 'title' => $input['title'],\n 'content' => $input['content'],\n 'owner_id' => auth()->user()->id,\n ]);\n // subscribe embedded media to content\n $this->checkForEmbeddedMedia($content);\n\n // not used -> see github issue: Remove category from ContentCreateModal (not used) #210\n // $content->categories()->attach($input['categorie_ids']);\n\n if (request()->wantsJson()){\n return ['message' => $content];\n }\n\n }", "public function update(Request $request, $id)\n {\n $content = Content::find($id);\n\n $content->title = $request->title;\n $content->content = $request->content;\n\n if($content->featured_image && file_exists(storage_path('app/public/' . $content->featured_image))){\n \\Storage::delete('public/' . $content->featured_image);\n }\n\n $image_name = $request->file('image')->store('images', 'public');\n $content->featured_image = $image_name;\n\n $content->save();\n return 'Artikel berhasil diubah';\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public /* void */ function updateResourceContent($uri, Content $content) {\n $client = new Client();\n $request = $client->put($this->getServiceUrl($uri),array(\n \"User-Agent\" => \"Marmotta Client Library (PHP)\",\n \"Content-Type\" => $content->getMimetype() . \"; rel=content\"\n ), $content->getData());\n // set authentication if given in configuration\n if(!_isset($this->config->getUsername())) {\n $request->setAuth($this->config->getUsername(),$this->config->getPassword());\n }\n $response = $request->send();\n\n if($response->getStatusCode() >= 400) {\n throw new Exception(\"could not update resource $uri; \".$response->getReasonPhrase());\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'page_title' => 'required'\n ]);\n\n //dd($request->all());\n\n PageContents::find($id)->update(\n array(\n 'content_title'=>$request->input('page_title'),\n 'short_desc'=>$request->input('short_desc'),\n 'long_desc'=>$request->input('long_desc'),\n 'updated_at'=>date(\"Y-m-d h:i:s\")\n )\n ); \n\n return redirect()->route('admin.page_contents.index')\n ->with('success','Content Updated successfully');\n }", "protected function updateContentObject($contentObject) {\n\t\t$this->persistenceManager->update($contentObject);\n\t}", "public function update(Request $request,$id)\n {\n //\n $this->validate($request, [\n 'title' => 'required',\n 'type' => 'required',\n 'content' => 'required',\n 'lang' => 'required'\n ]);\n\n\n $content = Content::find($id);\n $content->title = $request->input('title');\n $content->type = $request->input('type');\n $content->content = $request->input('content');\n $content->lang = $request->input('lang');\n $content->save();\n\n\n return redirect()->route('content.index')\n ->with('success','Content updated successfully');\n }", "public function update($id)\n\t{\n\t\tContent::where('id',$id)->update(Request::except(['_token','_method']));\n\t\t\n\t\t\n\t\treturn redirect()->back()->with('success','Privacy policy content updated');\n\t}", "public function update(Request $request, $id)\n {\n //\n $this->validate($request, [\n 'title' => 'required',\n 'content' => 'required',\n 'category_id' => 'required',\n 'public'=> 'required',\n 'featured'=>'required',\n 'thumbnail'=>'required'\n ]);\n if (empty($request['alias'])) {\n $content = Content::findOrFail($id);\n $content['title'] = trim($request['title']);\n $content['alias'] = str_replace(' ','-',$this->vn2latin(trim($request['title']), true));\n $content['quote'] = trim($request['quote']);\n $content['content'] = $request['content'];\n $content['category_id'] = $request['category_id'];\n $content['featured'] = $request['featured'];\n $content['thumbnail'] = $request['thumbnail'];\n $content['public'] = $request['public'];\n $content['image'] = $request['image'];\n $content->save();\n return redirect()->intended('/content');\n }else{\n $content = Content::findOrFail($id);\n $content->title = trim($request['title']);\n $content->alias = trim($request['alias']);\n $content->quote = trim($request['quote']);\n $content->content = $request['content'];\n $content->category_id = $request['category_id'];\n $content->featured = $request['featured'];\n $content->thumbnail = $request['thumbnail'];\n $content->image = $request['image'];\n $content->public = $request['public'];\n $content->save();\n return redirect()->intended('/content');\n }\n }", "public function massUpdate()\n {\n $contentIds = explode(',', request()->input('indexes'));\n \n $updateOption = request()->input('update-options');\n\n foreach ($contentIds as $contentId) {\n $content = $this->contentRepository->find($contentId);\n\n $content->update(['status' => $updateOption]);\n }\n\n session()->flash('success', trans('velocity::app.admin.contents.mass-update-success'));\n\n return redirect()->back();\n }", "protected function update() {}", "public function updateCache (\n\t)\t\t\t\t\t\t// RETURNS <bool> TRUE on success, FALSE on failure.\n\t\n\t// $contentForm->updateCache();\n\t{\n\t\t// Prepare the text for being cached\n\t\t$body = \"\";\n\t\t\n\t\t// Get the list of content segments\n\t\t$results = Database::selectMultiple(\"SELECT block_id, type FROM content_block_segment WHERE content_id=? ORDER BY sort_order ASC\", array($this->contentID));\n\t\t\n\t\t// Pull the text from the appropriate block type\n\t\tforeach($results as $result)\n\t\t{\n\t\t\tif(method_exists(\"Module\" . $result['type'], \"get\"))\n\t\t\t{\n\t\t\t\t$body .= call_user_func(array(\"Module\" . $result['type'], \"get\"), (int) $result['block_id']);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Cache the text\n\t\treturn Database::query(\"REPLACE INTO content_cache (content_id, body) VALUES (?, ?)\", array($this->contentID, $body));\n\t}", "public function update(Request $request, $id)\n {\n $this->validation($request, $id);\n $content = Content::find($id);\n $content = $this->DataSave($request, $content);\n if ($content->save()) {\n $content->categories()->sync($request->categories);\n return redirect('admin/content/' . $id . '/edit')->with('success', 'Content Updated Successfully');\n } else {\n return redirect('admin/content/' . $id . '/edit')->with('error', 'Update Content Failed');\n }\n //\n }", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update()\n {\n $this->storage->set(self::STORAGE_KEY, md5(time()));\n }", "public function update()\n {\n update($this->id, $article);\n }", "public function update(Request $request, $id)\n {\n $rule =[\n 'head'=>'required|string|max:40',\n 'sort' => 'required|integer',\n 'status' => 'required|integer',\n 'content' => 'string',\n ];\n $this->validate($request,$rule);\n \\DB::beginTransaction();\n $article = Article::findOrFail($id);\n $article->head = $request->head;\n $article->sort = $request->sort;\n $article->status = $request->status;\n $bool = $article->save();\n\n $descrit = ArticleDescript::where('article_id' , $id);\n $booldes = $descrit->update(['content'=>$request->get('content')]);\n if($bool && $booldes){\n \\DB::commit();\n $message = \"修改成功!\";\n return redirect()->to('admin/article')->with('message',$message);\n }else{\n \\DB::rollBack();\n $message = '修改失败!';\n return redirect()->back()->withInput()->with(\"message\",$message);\n }\n }", "public function update(Request $request, $container_id, $content_id='')\n {\n $postedContent = $request->input('content');\n if($postedContent){\n $this->repository->addContent($postedContent, $container_id, $content_id);\n }\n return $this->show($container_id, $content_id);\n }", "public function update(Request $request)\n {\n $dataArr = $request->all();\n \n $content_id = $dataArr['id']; \n \n\n foreach($dataArr['content'] as $lang_id => $content ){ \n\n $modelLang = ContentLang::where(['id' => $content_id, 'lang_id' => $lang_id])->update(['content' => $content]);\n }\n \n Session::flash('message', 'Update success'); \n\n return redirect()->route('content.edit', $dataArr['id']);\n }", "function updateContent($content_id, $content_text) {\r\n $return = xtc_db_query(\"UPDATE content_manager SET content_text='\".$content_text.\"' WHERE content_id=\".$content_id.\" LIMIT 1\");\r\n return $return;\r\n }", "public function update(Request $request, $content_id)\n {\n\n $request->validate([\n 'title' => 'required',\n 'data' => 'required',\n 'title_ar' => 'required',\n 'data_ar' => 'required',\n ]);\n\n if($request->hasfile('pdf'))\n {\n \n $name = time() . \".\" . $request->pdf->getClientOriginalExtension();\n $path= $request->pdf->move(public_path('pdf'), $name);\n echo $name;\n $content= Content::whereId($content_id)->update([\n 'pdf'=> $name,\n 'title'=>$request->input('title'),\n 'data'=>$request->input('data'),\n 'title_ar'=>$request->input('title_ar'),\n 'data_ar'=>$request->input('data_ar'),\n // 'status'=>$request->input('status'),\n 'category_id'=>$request->input('category_id'),\n ]);\n \n }\n $content= Content::whereId($content_id)->update([\n 'title'=>$request->input('title'),\n 'data'=>$request->input('data'),\n 'title_ar'=>$request->input('title_ar'),\n 'data_ar'=>$request->input('data_ar'),\n // 'status'=>$request->input('status'),\n 'category_id'=>$request->input('category_id'),\n ]);\n return redirect('/admin/contents/index')->with('completed', 'content has been updated'); \n }", "public function put($data)\n {\n global $_PM_;\n $api = 'handler_'.$this->handler.'_api';\n $this->api = new $api($_PM_, PHM_API_UID, $this->principalId);\n $this->api->update_item_content($this->item['id'], $data);\n }", "public function updateCmsBlockContent($identifier, $content)\n {\n $this->resource->getConnection()->update('cms_block', ['content' => $content], ['identifier = ?' => $identifier]);\n }", "public function update_storage_site() {\n\t\t$local_data = array(\n\t\t\t'timestamp' => time(),\n\t\t\t'data' => $this->data,\n\t\t);\n\t\treturn update_option( self::STORAGE_KEY, $local_data );\n\t}", "public function update_content($id) {\n $cond = 'id=' . $id;\n $app_content = $this->model_city->getData(\"app_content\", \"*\", $cond);\n if (isset($app_content[0]) && !empty($app_content[0])) {\n $data['content'] = $app_content[0];\n $data['title'] = translate('update') . \" \" . translate('content_management');\n $this->load->view('admin/master/add_update_content', $data);\n } else {\n show_404();\n }\n }", "public function update(Request $request, $id)\n {\n $item = Page::find($id);\n $item->content = $request->content;\n $item->updated_by = session('userID');\n\n return $item->save() ? 'success': 'error';\n }", "public function update(Request $request, $id)\n {\n return parent::contentUpdate($request, $id);\n }", "public function update()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->getGbaseItemEntry( $this->getItem()->getGbaseItemId() );\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $entry = $service->updateGbaseItem($this->getEntry());\n\n }", "public function update(Request $request, $id)\n\t{\n\t\t$this->validate($request, [\n\t\t\t'mdContent' => 'required',\n\t\t]);\n\n\t\t$question = Question::findOrFail($id);\n\n\t\t$question->content = $request->input('mdContent');\n\n\t\t$question->tags()->sync($request->input('tags'));\n\n\t\t$question->save();\n\n\t\tsession()->flash('status', 'Question has been updated successfully!');\n\n\t\treturn redirect('/questions/' . $id);\n\t}", "public function setContent($content){\n //asign the content\n $this->contentObject = $content;\n\n //save to disk as serialized\n $json = json_encode($this->contentObject);\n if($this->exists()){\n file_put_contents($this->getPath(), $json);\n }\n\t}", "public function updateWysiwyg($cid, $content)\n {\n $cid = trim($cid);\n\n if (Str::startsWith($cid, \"data.\")) {\n $cid = str_replace(\"data.\", '', $cid);\n }\n\n //do some extra work on the lwinput\n $this->data[$cid] = $content;\n\n //output an event so that our editor component can pick it up\n $this->emitTo('lw-wizzy', 'dbUpdate', ['name' => $cid, 'data' => $content]);\n }", "public function update(CmsRequest $request, $id) {\n $input = $request->except('content_body');\n $id = base64_decode($id);\n $model = Cms::findOrFail($id);\n if ($model->type === '2') {\n if ($request->file('content_body')) {\n $img_name = $this->rand_string(20) . '.' . $request->file('content_body')->getClientOriginalExtension();\n $file = $request->file('content_body');\n Image::make($file)->resize(1140, 270)->save(public_path('uploads/frontend/cms/pictures/') . $img_name);\n $input['content_body'] = $img_name;\n }\n } else if ($model->type === '3') {\n if ($request->file('content_body')) {\n $vdo_name = $this->rand_string(20) . '.' . $request->file('content_body')->getClientOriginalExtension();\n $file = $request->file('content_body');\n $file->move(public_path('uploads/frontend/cms/videos/'), $vdo_name);\n $input['content_body'] = $vdo_name;\n }\n } else {\n $input['content_body'] = $request->input('content_body');\n }\n $model->update($input);\n $request->session()->flash('success', 'Content updated successfully.');\n return redirect()->route('cms.edit', ['id' => base64_encode($id)])->withInput();\n }", "public function set($id, $content)\n {\n if (!is_dir($this->cachePath)) {\n if (file_exists($this->cachePath)) {\n throw new RuntimeException(\n Piwik_TranslateException('APUA_Exception_Cache_notexists'));\n }\n Piwik_Common::mkdir($this->cachePath);\n }\n if (!is_writable($this->cachePath)) {\n throw new RuntimeException(Piwik_TranslateException('APUA_Exception_Cache_notwriteable'));\n }\n \n $filename = $this->cachePath . urlencode($id);\n if (!file_put_contents($filename, \n serialize(array('ttl' => time() + $this->cache_ttl, 'payload' => $content)))) {\n throw new RuntimeException(Piwik_TranslateException('APUA_Exception_Cache_unwriteable'));\n }\n }", "public function testUpdateStorage() {\n // Setting values in both key stores, then installing the module and\n // testing if these key values are cleared.\n $keyvalue_update = $this->container->get('keyvalue.expirable')->get('update');\n $keyvalue_update->set('key', 'some value');\n $keyvalue_update_available_release = $this->container->get('keyvalue.expirable')->get('update_available_release');\n $keyvalue_update_available_release->set('key', 'some value');\n $this->container->get('module_installer')->install(['help']);\n $this->assertNull($keyvalue_update->get('key'));\n $this->assertNull($keyvalue_update_available_release->get('key'));\n\n // Setting new values in both key stores, then uninstalling the module and\n // testing if these new key values are cleared.\n $keyvalue_update->set('another_key', 'some value');\n $keyvalue_update_available_release->set('another_key', 'some value');\n $this->container->get('module_installer')->uninstall(['help']);\n $this->assertNull($keyvalue_update->get('another_key'));\n $this->assertNull($keyvalue_update_available_release->get('another_key'));\n }", "public function put(string $path, string $contents): Promise;", "public function update($text, $title, $content)\n {\n $text->setTitle($title);\n $text->setContent($content);\n $this->getEntityManager()->flush();\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Requests\\StoreQuestionRequest $request, $id)\n\t{\n\t\t$question = Question::with('tags')->findOrFail($id);\n $tags = $this->normalizeTag($request->get('tags'));\n\n\t\t$question->update([\n 'title' => $request->get('title'),\n 'content' => $request->get('mdContent')\n ]);\n\n\t\t$question->tags()->sync($tags);\n\n flash('问题更新成功!', 'success');\n\n return redirect()->route('questions.show', [$question->id]);\n\t}", "public function update(Request $request, $id)\n {\n $content = Content::find($id);\n $validator = Validator::make($request->all(), $content->rules);\n if ($validator->fails())\n {\n return $this->message('error', 'Please fill all required fields.');\n }\n \n $content->start_time = $request->start_time;\n $content->end_time = $request->end_time;\n $content->sentence = $request->sentence;\n $content->translation = $request->translation;\n $content->save();\n \n return $this->message('success', 'Content has been updated.');\n\n }", "public function update(Request $request, PageContent $pageContent)\n {\n\n $validatedData = $request->validate([\n 'content' => 'required',\n ]);\n\n $pageCntent = PageContent::where('id', $pageContent->id)->update(['title' => $request->title, 'content' => $request->content]);\n\n if($pageCntent) \n {\n return redirect(route('page_contents.index'))->with('success', trans('messages.page_content.update.success'));\n }\n \n return redirect(route('page_contents.index'))->with('error', trans('messages.page_content.update.error'));\n }", "public function update(Request $request, blog_content $blog_content)\n {\n //\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, array(\n 'content' => 'required',\n 'ArContent' => 'required',\n ));\n\n $history = App\\Models\\history::find($id);\n $history\n ->setTranslation('content', 'en', $request->content );\n $history\n ->setTranslation('content', 'ar', $request->ArContent );\n if($request->file('image')){\n\n $image = $request->file('image');\n $imgname = time() . '.' . $image->getClientOriginalExtension();\n $location = $image->move(public_path('uploads/history'), $imgname);\n $history->image = $imgname;\n $history->save();\n }\n else{\n $history\n ->setTranslation('content', 'en', $request->content );\n $history\n ->setTranslation('content', 'ar', $request->ArContent );\n $history->save();\n }\n\n Session::flash('success','Section updated Successfully !!');\n return redirect()->route('history.index');\n }", "public function update(Request $request, $id)\n {\n \n $rules = [\n 'name' => 'required',\n 'age' => 'required',\n 'image' => 'required',\n 'gender_id' => 'required'\n ];\n\n $message = [\n 'name.required' => 'Name is required',\n 'age.required' => 'Age is required',\n 'image.required' => 'Image is required',\n 'gender_id.required' => 'Gender is required'\n ];\n $this->validate($request,$rules,$message);\n $content= Content::findOrFail($id);\n $content->update($request->except('image'));\n\n if ( $request->hasFile('image') ) {\n $image = $request->image;\n $image_new_name = time() . $image->getClientOriginalName();\n $image->move('uploads/content', $image_new_name);\n $content->image = 'uploads/content/'.$image_new_name;\n $content->save();\n }\n flash()->success('Success');\n return redirect(route('content.index'));\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function update($data)\n {\n }", "public function updateStream($path, $contents, Config $config)\n {\n // TO BE IMPLEMENT\n }", "public static function update(\\Models\\File $file, \\Models\\User $user, string $content)\n {\n Logger::log(\"user {$user->username} tired to update file with id={$file->id} but stoped by ACS\");\n // $file->update($content);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request,$id, Article $article)\n {\n $article = Article::find($id);\n\n $article->content = $request->content;\n $article->user_name = $request->user_name;\n $article->save();\n return redirect()->route('article.show', ['id' => $article->id]);\n }", "public function saveContent( string $content );", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "function updateDocumentsContent() {\n try {\n if(DB::executeFirstCell(\"SELECT COUNT(*) AS count FROM \" . TABLE_PREFIX . \"modules WHERE name='documents'\")) {\n try {\n $documents_table = TABLE_PREFIX . 'documents';\n $content_backup_table = TABLE_PREFIX . 'content_backup';\n\n DB::beginWork('Updating documents content @ ' . __CLASS__);\n\n $rows = DB::execute(\"SELECT id, body FROM $documents_table WHERE type = 'text'\");\n if($rows) {\n foreach($rows as $row) {\n if($row['body']) {\n DB::execute(\"INSERT INTO $content_backup_table (parent_type, parent_id, body) VALUES ('Document', ?, ?)\", $row['id'], $row['body']);\n DB::execute(\"UPDATE $documents_table SET body = ? WHERE id = '$row[id]'\", $this->updateHtmlContent($row['body']));\n } // if\n } // foreach\n } // if\n\n DB::commit('Documents content updated @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to update documents content @ ' . __CLASS__);\n return $e->getMessage();\n } // try\n } // if\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function update($entity);", "public function update($entity);", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update($id, UpdateGodPageContentRequest $request)\n\t{\n\t\t$godpagecontent = GodPageContent::findOrFail($id);\n\n $request = $this->saveFiles($request);\n\n\t\t$godpagecontent->update($request->all());\n\n\t\treturn redirect()->route(config('quickadmin.route').'.godpagecontent.index');\n\t}", "public static function putContent( $path, $content )\n {\n $variable =& self::getVariable( $path, TRUE );\n $variable = $content;\n }", "public function update(StoreUpdateContatoRequest $request, $id)\n {\n $contato = $this->repository->find($id);\n if(!$contato){\n return redirect()->back();\n }\n\n $data = $request->only('nome', 'link');\n\n if($request->hasFile('foto') && $request->file('foto')->isValid()){\n\n if($contato->imagem && Storage::exists($contato->imagem)){\n Storage::delete($contato->imagem);\n }\n\n $image_path = ($request->file('foto')->store('contatos'));\n $data['imagem'] = $image_path;\n }\n\n $contato->update($data);\n return redirect()->route('contatos.index');\n }", "public function update($identifier, array $values, $flush = true);", "abstract public function updateData();", "public function updateCache();", "public function update($id)\n {\n $params = request()->all();\n\n if (isset($params[$params['locale']]['products'])) {\n $params[$params['locale']]['products'] = json_encode($params[$params['locale']]['products']);\n }\n\n $content = $this->contentRepository->update($params, $id);\n\n session()->flash('success', trans('admin::app.response.update-success', ['name' => trans('velocity::app.admin.layouts.header-content')]));\n\n return redirect()->route($this->_config['redirect']);\n }", "public function update(Request $request, $id)\n {\n \n $this->validate(request(), [\n 'topic_id' => 'required', \n 'subject_id' => 'required',\n 'content_link'=> 'required|url',\n 'content_duration' => 'required|Numeric',\n 'license' => 'required',\n 'content_img' => 'image',\n 'type_id' => 'required'\n \n ]);\n $content = Content::findOrFail($id);\n $content->subject_id = request('subject_id');\n $content->topic_id = request('topic_id');\n $content->portal_id = request('portal_id');\n $content->content_link = request('content_link');\n $content->tool_id = request('tool_id');\n $content->license = request('license');\n $content->didactics_type = request('didactics_type');\n $content->content_duration = request('content_duration');\n $content->how_to_analogue = request('how_to');\n $content->technical_limitations = request('technical_limitations');\n $content->type_id = request('type_id');\n \n \n //Save Image\n\t\tif ($request->hasFile('content_img')){\n\t\t\t$image = $request->file('content_img');\n\t\t\t$filename = time() . '.' . $image->getClientOriginalExtension();\n\t\t\t$filename_thumb = 'thumb'. $filename;\n\t\t\t//save big image\n\t\t\t$location = public_path('images/contents/'.$filename);\n\t\t\tImage::make($image)->resize(null, 400, function ($constraint) {\n\t\t\t\t$constraint->aspectRatio();})->save($location);\n\t\t\t$content->content_img = $filename;\n\t\t\t//save thumb image\n\t\t\t$location_big = public_path('images/contents/'.$filename_thumb);\n\t\t\tImage::make($image)->resize(null, 200, function ($constraint) {\n\t\t\t\t$constraint->aspectRatio();})->save($location_big);\n\t\t\t$content->content_img_thumb = $filename_thumb;\n\t\t}\n\t\t\n\t\t//Save all data from create_topics form\n \t$content->save(); \n \tif (isset($request->content_title)) {\n \t\t$content->content_title = request('content_title');\n }\n elseif (\n \t$content->content_title =$content->portal->portal_title . \"-\" . $content->topic->topic_title\n \t)\n \t$content->save();\n \tif ($request->filled('tags')){\n \t $tags = Tag::syncTags($request);\n \t $content->tags()->sync($tags);\n } elseif (\n \t$content->tags()->sync($request->tags)\n );\n $content->devices()->sync($request->devices);\n \t\n \t//get toolspecific id\n \tswitch ($request->tool_id) {\n \tcase 1:\n \t\t$content->toolspecific_id = Content::parse_yturl($request->content_link); //get Youtube ID\n \t\tbreak;\n \tcase 7:\n \t\t$vimeodata = Content::parse_vimeo($request->content_link);\n \t\t$content->toolspecific_id = $vimeodata->video_id; //get Vimeo ID\n \t\tbreak;\n \tcase 6:\n \t\t$content->toolspecific_id = Content::parse_h5p($request->content_link);\n \t\tbreak;\n \t} \t\n \t$content->save();\n \t//get all Video-Data from youtube and save them in new Video object\n \tif(($content->tool_id == 1) And isset($content->toolspecific_id)) {\n \t\t\t$video_attributes = Youtube::getVideoInfo($content->toolspecific_id);\n \t\t\t$video = Video::where('content_id' ,$content->id)->first();\n \t\t\tif (empty($video)) \n \t\t\t{\n \t\t\t$video = new Video;\n \t\t\t$video->content_id = $content->id;\n \t\t\t};\n \t\t\t\n \t\t\t$video->video_title = $video_attributes->snippet->title;\n \t\t\t$video->video_description = $video_attributes->snippet->description;\n \t\t\t$video->video_tags = serialize($video_attributes->snippet->tags);\n \t\t\tif (isset($video_attributes->snippet->defaultAudioLanguage)) (\n \t\t\t\t$video->video_audio_language = $video_attributes->snippet->defaultAudioLanguage\n \t\t\t);\n \t\t\t$video->video_duration = Video::convertDuration($video_attributes->contentDetails->duration);\n \t\t\t$video->video_dimension = $video_attributes->contentDetails->dimension;\n \t\t\t$video->video_definition = $video_attributes->contentDetails->definition;\n \t\t\t$video->video_caption = $video_attributes->contentDetails->caption;\n \t\t\t$video->video_YoutubePP = $video_attributes->contentDetails->licensedContent;\n \t\t\t\n \t\t\t$video->video_youtubeLicense = $video_attributes->status->license;\n \t\t\tif(isset($video_attributes->player->embedHeight)){\n \t\t\t$video->video_maxHeight = $video_attributes->player->embedHeight;\n \t\t\t$video->video_maxWidth = $video_attributes->player->embedWidth;\n \t\t\t} else {\n \t\t\t$video->video_maxHeight = Video::getHeight($video_attributes->player->embedHtml);\n \t\t\t$video->video_maxWidth = Video::getWidth($video_attributes->player->embedHtml);\n \t\t\t};\n\n \t\t\t$video->save();\n \t\t\t\n \t\t\t$content->content_duration = ceil($video->video_duration/60);\n \t\t\t$content->save();\n \t};\n \t//return to overview of topics\n return redirect('backend/contents');\n\n\t}" ]
[ "0.7732767", "0.6907403", "0.6770053", "0.6711993", "0.66259223", "0.6527835", "0.6507451", "0.6338725", "0.62581027", "0.624893", "0.6189312", "0.61762154", "0.6146509", "0.6144914", "0.61064386", "0.60945475", "0.60945475", "0.6018294", "0.59967667", "0.5966972", "0.5928919", "0.5896113", "0.5896113", "0.58659333", "0.5858016", "0.58523405", "0.5850889", "0.5841907", "0.5775573", "0.57578593", "0.57294285", "0.57269293", "0.57168823", "0.5703025", "0.5634057", "0.5620191", "0.56173015", "0.5609981", "0.56088394", "0.5605852", "0.5604671", "0.5589784", "0.55875766", "0.55873495", "0.5573999", "0.5569291", "0.5568499", "0.5548598", "0.55222565", "0.55164015", "0.5515237", "0.5507288", "0.549452", "0.54799503", "0.5477694", "0.5453154", "0.54400706", "0.5423321", "0.5422017", "0.5421871", "0.54102", "0.5410018", "0.53973097", "0.5393596", "0.5393398", "0.53910184", "0.53885955", "0.53861654", "0.53843457", "0.5373928", "0.5373928", "0.5373928", "0.5373928", "0.537277", "0.5372067", "0.53665024", "0.53586483", "0.5353367", "0.53470093", "0.53470093", "0.53470093", "0.53470093", "0.53470093", "0.53470093", "0.53470093", "0.53470093", "0.53470093", "0.53470093", "0.5345347", "0.5340789", "0.5340789", "0.53355986", "0.5335514", "0.53335553", "0.5331441", "0.5328019", "0.53274745", "0.53236705", "0.5319743", "0.53141135" ]
0.5435272
57
Remove the specified content from storage.
public function destroy($resourceable, $id, Section $section, Content $content) { if($content->sections->count() > 1 ){ foreach($content->sections as $section){ $section->components()->detach([$content->id]); } }else { $section->components()->detach([$content->id]); } // delete Section_content $this->deleteEntry($content, request()); log_activity(' Component Deleted', 'A Section Content was successfully removed from the Sections', $content); return redirect_to_resource(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "public function destroy(Content $content)\n {\n //\n }", "public function destroy(Content $content)\n {\n //\n }", "public function destroy($content)\n {\n $content= Content::find($content);\n\n\n $content->delete();\n return redirect('/admin/contents/index')->with('success','content deleted successfully'); \n }", "public function clearStorage(): void\n {\n// foreach ($this->remoteFilesystems as $filesystem) {\n// $contents = $filesystem->listContents('/', true);\n// foreach ($contents as $contentItem) {\n// if ('file' !== $contentItem['type']) {\n// continue;\n// }\n// $filesystem->delete($contentItem['path']);\n// }\n// }\n }", "public function deleted(Storage $storage)\n {\n //\n }", "public function testDeleteRemovesStorages()\n {\n file_put_contents(self::$temp.DS.'file1.txt', 'Hello World');\n\n Storage::delete(self::$temp.DS.'file1.txt');\n $this->assertTrue(! is_file(self::$temp.DS.'file1.txt'));\n }", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function destroy($id)\n {\n $selectedContent = DisplayContent::findOrFail($id);\n\n if (Auth::user()->can('delete', $selectedContent)) {\n unlink('storage/images/' . $selectedContent->image->filename);\n foreach ($selectedContent->nodes as $node) {\n $node->user->notify(new EmailNotification(EmailSubjectTypes::RemovalOfContent,\n $selectedContent->content_title . EmailMessages::RemovalOfContentMessage, $node->id, Auth::user()));\n }\n\n $selectedContent->delete();\n session()->flash('session_message', \"Content Deleted\");\n return redirect()->route('userContent');\n } else {\n session()->flash('session_message', \"You don't have authentication to delete this content\");\n return redirect()->route('userContent');\n }\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function destroy($id)\n {\n \t$content = Content::find($id);\n \t$content->tags()->detach();\n \t$content->devices()->detach();\n \t$content->delete();\n \t\n \treturn redirect()->back();\n }", "public function destroyContent(Content $content)\n {\n if($content->sections->count() > 1 ){\n foreach($content->sections as $section){\n $section->components()->detach([$content->id]);\n }\n }\n\n // delete Section_content\n $this->deleteEntry($content, request());\n\n log_activity(' Component Deleted',\n 'A Content was successfully removed', $content);\n\n return redirect_to_resource();\n }", "public function destroy($id)\n {\n $content = Content::find($id);\n $content->categories()->detach();\n if ($content->delete()) {\n Storage::delete('public/images/content/' . $content->image);\n return redirect('admin/content/')->with('success', 'Deleting Content Success');\n } else {\n return redirect('admin/content/')->with('error', 'Deleting Content Failed');\n }\n }", "public static function DeleteContent($content) {\n //Get the database name\n\n\n //initiate the redbean dal contoller\n $rb = RedBeanController::RedBean();\n\n //set up the array to hold the ids\n $ids = array();\n \n //start to build the sql\n $query = \"delete from content where textId in (\";\n \n //for each content item, add to the query and the ids array\n for($i=0; $i<count($content); $i++) {\n $query .= \":id$i,\";\n $ids[\":id$i\"] = $content[$i]->id;\n }\n \n //tidy up the query\n $query = rtrim($query, \",\").\")\";\n \n //Get the RB database adapter\n $db = RedBeanController::DataBaseAdapter();\n \n //execute the sql\n $db->exec($query, $ids);\n \n /*\n //loop throught each item of content\n foreach($content as $item) {\n $potentials = RedBeanController::Finder()->where(\"content\", \"textid = :id limit 1\", array(\":id\" => $item->id));\n if(!isset($potentials) || !is_array($potentials) || count($potentials) == 0) {\n continue;\n }\n\n //get the content\n $i = reset($potentials);\n\n //First remove all existing text\n $textToRemove = $rb->batch(\"content_text\", RedBeanController::GetRelatedBeans($i, \"content_text\"));\n if(isset($textToRemove) && is_array($textToRemove) && count($textToRemove) > 0) {\n foreach($textToRemove as $ttr) {\n $rb->trash($ttr);\n }\n }\n\n //first remove the existing tags\n $tagsToRemove = $rb->batch(\"content_tags\", RedBeanController::GetRelatedBeans($i, \"content_tags\"));\n if(isset($tagsToRemove) && is_array($tagsToRemove) && count($tagsToRemove) > 0) {\n foreach($tagsToRemove as $ttr) {\n $rb->trash($ttr);\n }\n }\n\n //remove all existing difcollection and their difs\n $difCollectionsToRemove = $rb->batch(\"dif_collections\", RedBeanController::GetRelatedBeans($i, \"dif_collections\"));\n if(isset($difCollectionsToRemove) && is_array($difCollectionsToRemove) && count($difCollectionsToRemove) > 0) {\n foreach($difCollectionsToRemove as $dctr) {\n $difstoremove = $rb->batch(\"difs\", RedBeanController::GetRelatedBeans($dctr, \"difs\"));\n if(isset($difstoremove) && is_array($difstoremove) && count($difstoremove) > 0) {\n foreach($difstoremove as $diftoremove) {\n $rb->trash($diftoremove);\n }\n }\n $rb->trash($dctr);\n }\n }\n\n //Remove the content\n $rb->trash($i);\n \n }\n */\n }", "public function remove($path);", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function deleteContent(array $query = null);", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function delete()\n {\n $content = $this->get();\n\n foreach ($content as $key=>$value)\n {\n $this->set($key, null);\n }\n\n return $this->save();\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove() {}", "public function remove() {}", "function ccontent_delete($content)\n\t{\n\t\tlusers_require('content/delete');\n\n\t\t$cat = mcontent_get_cat($content);\n\t\tmcontent_delete($content);\n\t\tmcategories_delete($cat['id']);\n\n\t\tlcache_delete_all();\n\n\t\tluri_redirect('main/user/admin/content', l('Content successfully deleted.'));\n\t}", "public function delete($name)\n {\n foreach ($this->content as $key => $val) {\n if ($val['name'] == $name) {\n unset($this->content[$key]);\n $this->content = array_merge($this->content);\n }\n }\n }", "public function delete($position)\n {\n $this->deleteArray('content', $position);\n }", "public function delete($position)\n {\n $this->deleteArray('content', $position);\n }", "public function destroy($id)\n {\n //\n DB::table(\"contents\")->where('id',$id)->delete();\n return redirect()->route('content.index')\n ->with('success','Content deleted successfully');\n }", "abstract public function remove();", "abstract public function remove();", "abstract public function remove();", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function delete($path);", "public function delete($path);", "public function removeAll($content)\r\n\t{\r\n\t\treturn $this->removeAttribute('.*', $content);\r\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function deleteObject($path)\n\t{\n\t\t// Re-authenticate if necessary\n\t\t$token = $this->getToken();\n\n\t\t// Get the URL to list containers\n\t\t$url = $this->getStorageEndpoint();\n\t\t$url = rtrim($url, '\\\\/');\n\t\t$path = ltrim($path, '\\\\/');\n\t\t$url .= '/' . $path;\n\n\t\t// Get the request object\n\t\t$request = new Request('DELETE', $url);\n\t\t$request->setHeader('X-Auth-Token', $token);\n\n\t\t$request->getResponse();\n\t}", "public function destroy($id)\n {\n\n\n $data = SoftwareMedia::find($id);\n $isDeleted =$data->delete();\n $value = $data->screenshots;\n if(strpos($value, \"+\") !== false){\n $data->screenshots = (explode(\"+\",$value));\n foreach($data->screenshots as $one){\n //$one= substr($one,42);\n $one = str_replace('http://localhost:8000/storage/screenshots/','',$one);\n unlink(storage_path('app/public/screenshots/'.$one));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/screenshots/','',$value);\n unlink(storage_path('app/public/screenshots/'.$value));\n }\n\n if($data->ebooks != null){\n $value = $data->ebooks;\n if(strpos($value, \"+\") !== false){\n $data->ebooks = (explode(\"+\",$value));\n foreach($data->ebooks as $ebook){\n $ebook = str_replace('http://localhost:8000/storage/ebooks/','',$ebook);\n unlink(storage_path('app/public/ebooks/'.$ebook));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/ebooks/','',$value);\n unlink(storage_path('app/public/ebooks/'.$value));\n }\n }\n if($data->whitepapers != null){\n $value = $data->whitepapers;\n if(strpos($value, \"+\") !== false){\n $data->whitepapers = (explode(\"+\",$value));\n foreach($data->whitepapers as $whitepaper){\n $whitepaper = str_replace('http://localhost:8000/storage/whitepapers/','',$whitepaper);\n unlink(storage_path('app/public/whitepapers/'.$whitepaper));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/whitepapers/','',$value);\n unlink(storage_path('app/public/whitepapers/'.$value));\n }\n }\n if($data->pdf != null){\n $value = $data->pdf;\n if(strpos($value, \"+\") !== false){\n $data->pdf = (explode(\"+\",$value));\n foreach($data->pdf as $one){\n $one = str_replace('http://localhost:8000/storage/pdf/','',$one);\n unlink(storage_path('app/public/pdf/'.$one));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/pdf/','',$value);\n unlink(storage_path('app/public/pdf/'.$value));\n }\n }\n if($data->guides != null){\n $value = $data->guides;\n if(strpos($value, \"+\") !== false){\n $data->guides = (explode(\"+\",$value));\n foreach($data->guides as $guide){\n $guide = str_replace('http://localhost:8000/storage/guides/','',$guide);\n unlink(storage_path('app/public/guides/'.$guide));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/guides/','',$value);\n unlink(storage_path('app/public/guides/'.$value));\n }\n }\n if($isDeleted == true){\n return response()->json(['message'=>'Deleted successfully','isdeleted'=>$isDeleted],200 );\n }else{\n return response()->json(['message'=>'Cannot delete something went wrong']);\n }\n }", "public function delete($path)\n {\n if (!Storage::delete($path))\n {\n abort(500, 'Não foi possível deletar o arquivo.');\n }\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy($id_content)\n {\n\n $opds = DB::delete('DELETE FROM content_opds WHERE id_content = ?' , [$id_content]);\n return redirect('/opd')->with('delete', 'Data Opd telah berhasil dihapus');\n }", "public function delete($path, $data = null);", "public function deleteContent($idContent){\r\n\t \tif( static::$db == null ) static::__init();\r\n\t\r\n\t\t$valueParams = static::$file->ValueTable[\"attributes\"];\r\n\t\t$children = static::$file->ValueTable[\"children\"];\r\n\t\tforeach($children as $child){\r\n\t\t\tstatic::$sqlDeleteContentValue = str_replace( array( '%table%','%idContentValue%', '%id_content_value%'),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray( (String) $child[\"attributes\"][\"name\"],(String) $child[\"attributes\"][\"idContent\"],$idContent),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstatic::$sqlDeleteContentValue );\r\n\t\t\tstatic::$db->execute( static::$sqlDeleteContentValue );\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$contentParams = static::$file->ContentTable[\"attributes\"];\r\n\t\tstatic::$sqlDeleteContent = str_replace( array( '%table%','%idContent%', '%id_content%'),\r\n\t\t\t\t\t\t\t\t\t\t\t\tarray( (String) $contentParams[\"name\"],(String) $contentParams[\"id\"],$idContent),\r\n\t\t\t\t\t\t\t\t\t\t\t\tstatic::$sqlDeleteContent );\r\n\t\tstatic::$db->execute( static::$sqlDeleteContent );\r\n\t }", "public function deleteContentAndCopyLivePage() {}", "static function remove(string $content): string\n {\n return self::parse($content, function () { return ''; });\n }", "public function deleted(Media $media)\n {\n if ( $media->local ) {\n $type = $media->mediatype->slug;\n switch ('image') {\n case 'value':\n Storage::delete( 'public/'.$media->source );\n $arr = explode( '/', $media->source );\n $thmb = array_pop( $arr );\n Storage::delete( MediaController::$thmbdir.$thmb );\n break;\n\n default:\n // code...\n break;\n }\n }\n }", "function delete()\n\t{\n\tglobal $db, $config_vars;\n\n// \t\t$result = new phreak_error();\n// \t$result->set_object_id($this->id);\n// \t$result->set_operation('delete');\n\n\n\t\t//check if the object is in the database\n\t\tif (isset($this->id))\n\t\t{\n\n\t\t\tif ($this->check_perm('delete')) //Authorisation is okay\n\t\t\t{\n\n\t\t\t\t//remove views for this picture\n\t\t\t\t$sql = 'DELETE FROM ' . $config_vars['table_prefix'] . \"views WHERE content_id = \" . $this->id;\n\t\t\t\tif (!$result = $db->sql_query($sql))\n\t\t\t\t{\n\t\t\t\t\t$error = new phreak_error(E_WARNING,SQL_ERROR,__LINE__,__FILE__,'delete',$this->id,0,0,$sql);\n\t\t\t\t\t$error->commit();\n//\t\t\t\t\terror_report(SQL_ERROR, 'delete' , __LINE__, __FILE__,$sql);\n\t\t\t\t}\n\n\n\n\n\t\t\t\t// remove from content table\n\t\t\t\t$sql = \"DELETE FROM \" . $config_vars['table_prefix'] . \"content WHERE id = \" . $this->id;\n\t\t\t\tif (!$result = $db->sql_query($sql))\n\t\t\t\t{\n\t\t\t\t\t$error = new phreak_error(E_WARNING,SQL_ERROR,__LINE__,__FILE__,'delete',$this->id,0,0,$sql);\n\t\t\t\t\t$error->commit();\n//\t\t\t\t\terror_report(SQL_ERROR, 'delete' , __LINE__, __FILE__,$sql);\n\t\t\t\t}\n\n\t\t\t\t$this->clear_content_in_cat();\n\n\t\t\t\tif (is_file($this->file))\n\t\t\t\t{\n\t\t\t\t\tif (!unlink($this->file))\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = new phreak_error(E_WARNING,FILE_ERROR,__LINE__,__FILE__,'delete');\n\t\t\t\t\t\t$error->commit();\n//\t\t\t\t\t\terror_report(FILE_ERROR, 'delete' , __LINE__, __FILE__);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif (is_file($this->get_thumbfile()))\n\t\t\t\t{\n\t\t\t\t\tif (!unlink($this->get_thumbfile()))\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = new phreak_error(E_WARNING,FILE_ERROR,__LINE__,__FILE__,'delete');\n\t\t\t\t\t\t$error->commit();\n//\t\t\t\t\t\terror_report(FILE_ERROR, 'delete' , __LINE__, __FILE__);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tunset($this->id);\n\n\t\t\t\t// decrase content amount\n\t\t\t\tforeach ($this->cat_ids as $id)\n\t\t\t\t{\n\t\t\t\t\t$this->remove_from_cat = new categorie;\n\t\t\t\t\t$this->remove_from_cat->generate_from_id($id);\n\t\t\t\t\t$this->remove_from_cat->set_content_amount($this->remove_from_cat->get_content_amount()-1);\n\t\t\t\t\t$this->remove_from_cat->commit();\n\t\t\t\t}\n\n\n\t\t\t\t// remove from content_in_cat table\n\n\n\t\t\t\tunset($this->file);\n\t\t\t\tunset($this->cat_ids);\n\t\t\t\tunset($this->place_in_cat);\n\n\n\n\n\t\t\t\treturn OP_SUCCESSFUL;\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn OP_NP_MISSING_DELETE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn OP_NOT_IN_DB;\n\t\t}\n\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function deleteDataAction()\n {\n $contentService = Dm_Session::GetServiceFactory()->getContentService();\n $filter = new Service_Api_Filter_Content();\n $filter->id = $this->_getParam('id');\n $contents = $contentService->contentsDelete($filter);\n $this->view->data = $contents;\n }", "private function deleteLangFileContent() \n {\n $this->read();\n unset($this->arrayLang[$this->key]);\n $this->save();\n }", "public function destroy($id)\n {\n PageContents::find($id)->delete();\n return redirect()->route('admin.page_contents.index')\n ->with('success','Content deleted successfully');\n\n }", "public function delete_storage_unit($path)\n {\n $storage_unit_name = self::parse_xml_file($path);\n \n $this->add_message(\n self::TYPE_NORMAL, \n Translation::getInstance()->getTranslation('StorageUnitRemoval', null, 'Chamilo\\Core\\Install') . ': <em>' .\n $storage_unit_name . '</em>');\n \n $data_manager = static::context() . '\\DataManager';\n \n if (! $data_manager::drop_storage_unit($storage_unit_name))\n {\n return $this->failed(\n Translation::getInstance()->getTranslation('StorageUnitRemovalFailed', null, 'Chamilo\\Core\\Install') .\n ': <em>' . $storage_unit_name . '</em>');\n }\n else\n {\n return true;\n }\n }", "function delete() {\n global $DB;\n if($this->mayI(DELETE)) {\n $DB->metadata->delete($this->ID);\n $DB->content->delete($this->ID, false);\n $DB->spine->delete($this->ID);\n return parent::delete();\n } else return false;\n }", "private function removeEntrada($filePath){\n \\Storage::delete($filePath);\n }", "public function remove(Article $article);", "public function remove($data, array $context = [])\n {\n $data->setArchivage(true);\n $this->em->remove($data);\n $this->em->persist($data);\n //$this->em->remove($data);\n $this->em->flush();\n }", "public function delete(): void\n {\n unlink($this->path);\n }", "public function forceDeleted(Storage $storage)\n {\n //\n }", "public function delete(string $name)\n {\n\t\t$fileHandler = $this->getFileHandler('r');\n\t\t$tmpHandler = fopen('storage.tmp', 'w');\n\t\t$deleted = false;\n\t\twhile(!feof($fileHandler)){\n\t\t\t$line = fgets($fileHandler);\n\t\t\t$arry = explode('|', $line);\n\t\t\tif(strtolower($arry[0])==strtolower($name)){\n\t\t\t\t$deleted = true;\t\n\t\t\t\tcontinue; //For DELETE operation\n\t\t\t}\n\t\t\tfwrite($tmpHandler, $line);\n\t\t}\n\t\tfclose($tmpHandler);\n\t\t$this->closeFile($fileHandler);\n\n\t\tif($deleted==true){\n\t\t\trename('storage.tmp', 'storage.txt');\n\t\t}else{\n\t\t\tunlink('storage.tmp');\n\t\t}\n\t\treturn null;\n\t}", "public function testIsRemoveContentRelationed()\n {\n // 1. Create Page 1\n $page1 = $this->createPage();\n\n $pageId = $page1->id;\n\n // 2. Create Page 2 with content relation\n $attributes = $this->attributes['page'];\n $attributes['fields'][] = [\n 'identifier' => 'content',\n 'type' => 'contents',\n 'value' => [\n ['id' => $pageId]\n ]\n ];\n $page2 = $this->createPage($attributes);\n\n // 3. Remove page 1\n (new DeleteContent($page1))->handle();\n\n // 4. Test page 2 fields\n $page2 = Content::find(2);\n\n $contentId = $page2->field('content') ? $page2->field('content')->value : null;\n\n $this->assertNotEquals($pageId, $contentId);\n }", "function pico_delete_content($mydirname, $content_id, $skip_sync = false)\n{\n\t$db = XoopsDatabaseFactory::getDatabaseConnection();\n\n\t// update the content by blank data\n\t$_POST = [];\n\tpico_updatecontent($mydirname, $content_id, true, true);\n\n\t// backup the content, first\n\tpico_transact_backupcontent($mydirname, $content_id, true);\n\n\t// delete content\n\tif (!$db->queryF('DELETE FROM ' . $db->prefix($mydirname . '_contents') . ' WHERE content_id=' . (int)$content_id)) die(_MD_PICO_ERR_SQL . __LINE__);\n\n\t// rebuild category tree\n\tif (empty($skip_sync)) {\n\t\tpico_sync_cattree($mydirname);\n\t}\n\n\treturn true;\n}", "public function remove(HtmlContent $content)\n {\n $content->delete();\n\n return $this;\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove($resourceable, $id, Section $section, Content $content)\n {\n\n $section->components()->detach([$content->id]);\n\n log_activity(' Component Removed',\n 'A Section Content was successfully removed from the Sections', $content);\n\n return redirect()->back();\n }", "public function delete(){\n $record = actualite::find($this->selectedId);\n $record->delete();\n\n /* update image file */\n Storage::delete('public/_actualite/'.$this->selectedId.'.png');\n /* $this->photo->storePubliclyAs('public/_actualite/'.$this->selectedId.'.png'); */\n\n session()->flash('message', 'actualite modifié avec succès');\n $this->emit('Deleted');\n $this->dispatchBrowserEvent('Deleted');\n $this->resetFields();\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "function delete_content($recordid=0) {\n data_field_admin::delete_content_files($this);\n return parent::delete_content($recordid);\n }", "function cache_classes_DestroyContentFile($content_file_path=NULL)\n{\n $filepath = POPS_SYSTEM_PATH.'tmp/'.session_id().'.tmp.php';\n if ( $content_file_path!==NULL ) {\n $filepath = $content_file_path;\n }\n // try to delete file\n if (file_exists($filepath) ) {\n unlink($filepath);\n }\n}", "public function deleteContent ($id_content, $type_content) \n {\n $id_content = (int) $id_content; \n $db = $this->getModel('db');\n $sql = \"DELETE FROM $type_content WHERE id = '$id_content' LIMIT 1 \";\n $stmt = $db->query($sql);\n $sql = \"DELETE FROM \" . $this->table_cms_parametres_contenu . \" WHERE contenu_id_contenu = '$id_content' AND contenu_table_contenu = '\" . $type_content . \"' \";\n $stmt = $db->query($sql);\n $sql = \"DELETE FROM \" . $this->table_cms_instance_zone_has_contenu . \" WHERE id_contenu = '$id_content' AND table_contenu = '$type_content' \";\n $stmt = $db->query($sql);\n $sql = \"DELETE FROM \" . $this->table_cms_contenu . \" WHERE id_contenu = '$id_content' AND table_contenu = '$type_content' LIMIT 1 \";\n $stmt = $db->query($sql);\n }", "public function delete_page(string $area, string $uri)\n{\n\n // Delete from database\n db::query(\"DELETE FROM cms_layouts WHERE area = %s AND filename = %s\", $area, $uri);\n\n // Delete from redis\n $key = $area . '/' . $uri;\n redis::hdel('cms:titles', $key);\n redis::hdel('cms:layouts', $key);\n\n}", "public function destroy(Content $content, $subscribable_type = null, $subscribable_id = null )\n {\n $input = $this->validateRequest();\n if (isset($input['referenceable_id']) AND isset($input['referenceable_type'])){\n $subscribable_type = $input['referenceable_type'];\n $subscribable_id = $input['referenceable_id'];\n }\n\n abort_unless((\\Gate::allows('content_delete') OR\n \\Gate::allows($subscribable_type.'_content_delete')), 403);\n\n //todo: check if user is owner or has creator/admin role\n /**\n * check if content is subscribed only by deleting reference\n * - if yes -> delete content_subscription and content\n * - if not -> delete only content_subscription\n */\n\n //delete unused embedded media\n $media = $content->media;\n\n $content->mediaSubscriptions()\n ->where('subscribable_type', '=', 'App\\Content')\n ->where('subscribable_id', '=', $content->id)\n ->delete();\n\n if ($content->subscriptions()->count() <= 1){\n\n ContentSubscription::where('subscribable_type',\n (isset(request('subscribable')['content_subscriptions'][0]['subscribable_type'])) ? request('subscribable')['content_subscriptions'][0]['subscribable_type'] : $subscribable_type)\n ->where('subscribable_id', (isset(request('subscribable')['id'])) ? request('subscribable')['id'] : $subscribable_id)\n ->where('content_id', $content->id)\n ->delete();\n\n // delete contents\n foreach ($content->quotes AS $quote)\n {\n (new QuoteController)->destroy($quote); // delete and unsubscribe related objects\n }\n\n //todo? delete unused categorie_categoie\n $content->delete();\n\n } else {\n $subscription = ContentSubscription::where('subscribable_type', $subscribable_type)\n ->where('subscribable_id', $subscribable_id)\n ->where('content_id', $content->id)->get()->first(); //load subscription to get order_id for reordering\n ContentSubscription::where('subscribable_type',\n (isset(request('subscribable')['content_subscriptions'][0]['subscribable_type'])) ? request('subscribable')['content_subscriptions'][0]['subscribable_type'] : $subscribable_type)\n ->where('subscribable_id',(isset(request('subscribable')['id'])) ? request('subscribable')['id'] : $subscribable_id)\n ->where('content_id', $content->id)\n ->delete();\n //reset order_ids\n return (new ContentSubscription)\n ->where('subscribable_type', $subscribable_type)\n ->where('subscribable_id', $subscribable_id)\n ->where('order_id', '>', $subscription->order_id)\n ->update([\n 'order_id'=> DB::raw('order_id -1')\n ]);\n }\n\n //delete unused media\n foreach ($media AS $medium)\n {\n Medium::where('id', $medium->id)->delete();\n }\n // axios call?\n if (request()->wantsJson()){\n return ['message' => true];\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function delete($picture)\n\t{\n\t\t$picture = $this->findByName($picture);\n\t\t// exclui as fotos (pequena, media e grande)\n\t\tImageService::destroy($picture->name);\n\t\t// exclui no banco de dados\n\t\t$picture->delete();\n\n\t\treturn $picture->item;\n\t}", "public function delete($path)\n {\n $source = $this->dispatch($path);\n $value = &$this->storage;\n $last = count($source) - 1;\n foreach ($source as $key => $part) {\n if (isset($value[$part])) {\n if ($last == $key) {\n unset($value[$part]);\n return true;\n }\n $value = &$value[$part];\n continue;\n }\n break;\n }\n\n return false;\n }", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function postRemove(MediaInterface $media);", "public function removeFromCache()\n {\n Cache::tags('file')->forget(strtolower($this->alias));\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function deleteMetadata($path)\n {\n $fileKey = sha1($path);\n $this->getMetadataCache()->set(self::METADATA . $fileKey, []);\n $this->getMetadataCache()->delete(self::VISIBILITY . $fileKey);\n $this->getContentCache()->delete($fileKey);\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($value);", "public function delete(string $path){\n return Storage::disk(self::DISK)->delete($path);\n }", "public function deleteContent($idcontent){\n $check = Content::where('idcontent', $idcontent)->get();\n\n if($check->count() > 0){\n\n $delete = Content::where('idcontent', $idcontent);\n if($delete->update([\n 'delete' => 1\n ])){\n return response()->json([\n 'message' => '',\n 'result' => true\n ]);\n }else{\n return response()->json([\n 'message' => 'Failed to delete content',\n 'result' => false\n ]);\n } \n }else{\n return response()->json([\n 'message' => 'content not found!',\n 'result' => false\n ]);\n }\n }", "public function delete($path)\n {\n }", "function tiny_cache_delete_the_content( $post_id ) {\n\n wp_cache_delete( $post_id, 'the_content' );\n}", "public function clear() {\n @rmpath($this->storage);\n }", "public function destroy($id)\n {\n //\n $content = Content::findOrFail($id);\n $content->delete();\n return redirect()->intended('/content');\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();" ]
[ "0.67548907", "0.64925677", "0.64925677", "0.62877476", "0.61022276", "0.6038654", "0.60094595", "0.6001756", "0.59441453", "0.59193224", "0.59193224", "0.59193224", "0.59193224", "0.5905215", "0.5888412", "0.585021", "0.5826368", "0.5823953", "0.5811891", "0.5782859", "0.577896", "0.5775859", "0.57649535", "0.5744246", "0.56899935", "0.5680209", "0.5679561", "0.56790495", "0.5677991", "0.5676354", "0.5663108", "0.5641078", "0.5641078", "0.56406283", "0.56383383", "0.56383383", "0.56383383", "0.5636157", "0.56031084", "0.5582674", "0.5582674", "0.5573019", "0.55717385", "0.55604076", "0.55071723", "0.55043656", "0.54897267", "0.54822433", "0.5480265", "0.54742193", "0.5466457", "0.5456368", "0.54526013", "0.54523945", "0.5444295", "0.5442513", "0.54364055", "0.54285383", "0.54230654", "0.5417716", "0.5416851", "0.5416661", "0.54097366", "0.54064924", "0.53942263", "0.53897583", "0.5383201", "0.538273", "0.53730875", "0.53723276", "0.53701377", "0.5367951", "0.5365348", "0.53635794", "0.5357412", "0.535593", "0.5339274", "0.53377646", "0.5337679", "0.53374535", "0.53357106", "0.5334696", "0.5332295", "0.5328878", "0.53197783", "0.53174955", "0.53152597", "0.5313599", "0.5312225", "0.53120893", "0.53045344", "0.53029466", "0.53009456", "0.5298332", "0.5298244", "0.5297028", "0.5297028", "0.5297028", "0.5297028", "0.5297028", "0.5297028" ]
0.0
-1
Remove the specified content from storage.
public function destroyContent(Content $content) { if($content->sections->count() > 1 ){ foreach($content->sections as $section){ $section->components()->detach([$content->id]); } } // delete Section_content $this->deleteEntry($content, request()); log_activity(' Component Deleted', 'A Content was successfully removed', $content); return redirect_to_resource(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "public function destroy(Content $content)\n {\n //\n }", "public function destroy(Content $content)\n {\n //\n }", "public function destroy($content)\n {\n $content= Content::find($content);\n\n\n $content->delete();\n return redirect('/admin/contents/index')->with('success','content deleted successfully'); \n }", "public function clearStorage(): void\n {\n// foreach ($this->remoteFilesystems as $filesystem) {\n// $contents = $filesystem->listContents('/', true);\n// foreach ($contents as $contentItem) {\n// if ('file' !== $contentItem['type']) {\n// continue;\n// }\n// $filesystem->delete($contentItem['path']);\n// }\n// }\n }", "public function deleted(Storage $storage)\n {\n //\n }", "public function testDeleteRemovesStorages()\n {\n file_put_contents(self::$temp.DS.'file1.txt', 'Hello World');\n\n Storage::delete(self::$temp.DS.'file1.txt');\n $this->assertTrue(! is_file(self::$temp.DS.'file1.txt'));\n }", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function destroy($id)\n {\n $selectedContent = DisplayContent::findOrFail($id);\n\n if (Auth::user()->can('delete', $selectedContent)) {\n unlink('storage/images/' . $selectedContent->image->filename);\n foreach ($selectedContent->nodes as $node) {\n $node->user->notify(new EmailNotification(EmailSubjectTypes::RemovalOfContent,\n $selectedContent->content_title . EmailMessages::RemovalOfContentMessage, $node->id, Auth::user()));\n }\n\n $selectedContent->delete();\n session()->flash('session_message', \"Content Deleted\");\n return redirect()->route('userContent');\n } else {\n session()->flash('session_message', \"You don't have authentication to delete this content\");\n return redirect()->route('userContent');\n }\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function destroy($id)\n {\n \t$content = Content::find($id);\n \t$content->tags()->detach();\n \t$content->devices()->detach();\n \t$content->delete();\n \t\n \treturn redirect()->back();\n }", "public function destroy($id)\n {\n $content = Content::find($id);\n $content->categories()->detach();\n if ($content->delete()) {\n Storage::delete('public/images/content/' . $content->image);\n return redirect('admin/content/')->with('success', 'Deleting Content Success');\n } else {\n return redirect('admin/content/')->with('error', 'Deleting Content Failed');\n }\n }", "public static function DeleteContent($content) {\n //Get the database name\n\n\n //initiate the redbean dal contoller\n $rb = RedBeanController::RedBean();\n\n //set up the array to hold the ids\n $ids = array();\n \n //start to build the sql\n $query = \"delete from content where textId in (\";\n \n //for each content item, add to the query and the ids array\n for($i=0; $i<count($content); $i++) {\n $query .= \":id$i,\";\n $ids[\":id$i\"] = $content[$i]->id;\n }\n \n //tidy up the query\n $query = rtrim($query, \",\").\")\";\n \n //Get the RB database adapter\n $db = RedBeanController::DataBaseAdapter();\n \n //execute the sql\n $db->exec($query, $ids);\n \n /*\n //loop throught each item of content\n foreach($content as $item) {\n $potentials = RedBeanController::Finder()->where(\"content\", \"textid = :id limit 1\", array(\":id\" => $item->id));\n if(!isset($potentials) || !is_array($potentials) || count($potentials) == 0) {\n continue;\n }\n\n //get the content\n $i = reset($potentials);\n\n //First remove all existing text\n $textToRemove = $rb->batch(\"content_text\", RedBeanController::GetRelatedBeans($i, \"content_text\"));\n if(isset($textToRemove) && is_array($textToRemove) && count($textToRemove) > 0) {\n foreach($textToRemove as $ttr) {\n $rb->trash($ttr);\n }\n }\n\n //first remove the existing tags\n $tagsToRemove = $rb->batch(\"content_tags\", RedBeanController::GetRelatedBeans($i, \"content_tags\"));\n if(isset($tagsToRemove) && is_array($tagsToRemove) && count($tagsToRemove) > 0) {\n foreach($tagsToRemove as $ttr) {\n $rb->trash($ttr);\n }\n }\n\n //remove all existing difcollection and their difs\n $difCollectionsToRemove = $rb->batch(\"dif_collections\", RedBeanController::GetRelatedBeans($i, \"dif_collections\"));\n if(isset($difCollectionsToRemove) && is_array($difCollectionsToRemove) && count($difCollectionsToRemove) > 0) {\n foreach($difCollectionsToRemove as $dctr) {\n $difstoremove = $rb->batch(\"difs\", RedBeanController::GetRelatedBeans($dctr, \"difs\"));\n if(isset($difstoremove) && is_array($difstoremove) && count($difstoremove) > 0) {\n foreach($difstoremove as $diftoremove) {\n $rb->trash($diftoremove);\n }\n }\n $rb->trash($dctr);\n }\n }\n\n //Remove the content\n $rb->trash($i);\n \n }\n */\n }", "public function remove($path);", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function deleteContent(array $query = null);", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function delete()\n {\n $content = $this->get();\n\n foreach ($content as $key=>$value)\n {\n $this->set($key, null);\n }\n\n return $this->save();\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove() {}", "public function remove() {}", "function ccontent_delete($content)\n\t{\n\t\tlusers_require('content/delete');\n\n\t\t$cat = mcontent_get_cat($content);\n\t\tmcontent_delete($content);\n\t\tmcategories_delete($cat['id']);\n\n\t\tlcache_delete_all();\n\n\t\tluri_redirect('main/user/admin/content', l('Content successfully deleted.'));\n\t}", "public function delete($name)\n {\n foreach ($this->content as $key => $val) {\n if ($val['name'] == $name) {\n unset($this->content[$key]);\n $this->content = array_merge($this->content);\n }\n }\n }", "public function delete($position)\n {\n $this->deleteArray('content', $position);\n }", "public function delete($position)\n {\n $this->deleteArray('content', $position);\n }", "public function destroy($id)\n {\n //\n DB::table(\"contents\")->where('id',$id)->delete();\n return redirect()->route('content.index')\n ->with('success','Content deleted successfully');\n }", "abstract public function remove();", "abstract public function remove();", "abstract public function remove();", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function delete($path);", "public function delete($path);", "public function removeAll($content)\r\n\t{\r\n\t\treturn $this->removeAttribute('.*', $content);\r\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function deleteObject($path)\n\t{\n\t\t// Re-authenticate if necessary\n\t\t$token = $this->getToken();\n\n\t\t// Get the URL to list containers\n\t\t$url = $this->getStorageEndpoint();\n\t\t$url = rtrim($url, '\\\\/');\n\t\t$path = ltrim($path, '\\\\/');\n\t\t$url .= '/' . $path;\n\n\t\t// Get the request object\n\t\t$request = new Request('DELETE', $url);\n\t\t$request->setHeader('X-Auth-Token', $token);\n\n\t\t$request->getResponse();\n\t}", "public function destroy($id)\n {\n\n\n $data = SoftwareMedia::find($id);\n $isDeleted =$data->delete();\n $value = $data->screenshots;\n if(strpos($value, \"+\") !== false){\n $data->screenshots = (explode(\"+\",$value));\n foreach($data->screenshots as $one){\n //$one= substr($one,42);\n $one = str_replace('http://localhost:8000/storage/screenshots/','',$one);\n unlink(storage_path('app/public/screenshots/'.$one));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/screenshots/','',$value);\n unlink(storage_path('app/public/screenshots/'.$value));\n }\n\n if($data->ebooks != null){\n $value = $data->ebooks;\n if(strpos($value, \"+\") !== false){\n $data->ebooks = (explode(\"+\",$value));\n foreach($data->ebooks as $ebook){\n $ebook = str_replace('http://localhost:8000/storage/ebooks/','',$ebook);\n unlink(storage_path('app/public/ebooks/'.$ebook));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/ebooks/','',$value);\n unlink(storage_path('app/public/ebooks/'.$value));\n }\n }\n if($data->whitepapers != null){\n $value = $data->whitepapers;\n if(strpos($value, \"+\") !== false){\n $data->whitepapers = (explode(\"+\",$value));\n foreach($data->whitepapers as $whitepaper){\n $whitepaper = str_replace('http://localhost:8000/storage/whitepapers/','',$whitepaper);\n unlink(storage_path('app/public/whitepapers/'.$whitepaper));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/whitepapers/','',$value);\n unlink(storage_path('app/public/whitepapers/'.$value));\n }\n }\n if($data->pdf != null){\n $value = $data->pdf;\n if(strpos($value, \"+\") !== false){\n $data->pdf = (explode(\"+\",$value));\n foreach($data->pdf as $one){\n $one = str_replace('http://localhost:8000/storage/pdf/','',$one);\n unlink(storage_path('app/public/pdf/'.$one));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/pdf/','',$value);\n unlink(storage_path('app/public/pdf/'.$value));\n }\n }\n if($data->guides != null){\n $value = $data->guides;\n if(strpos($value, \"+\") !== false){\n $data->guides = (explode(\"+\",$value));\n foreach($data->guides as $guide){\n $guide = str_replace('http://localhost:8000/storage/guides/','',$guide);\n unlink(storage_path('app/public/guides/'.$guide));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/guides/','',$value);\n unlink(storage_path('app/public/guides/'.$value));\n }\n }\n if($isDeleted == true){\n return response()->json(['message'=>'Deleted successfully','isdeleted'=>$isDeleted],200 );\n }else{\n return response()->json(['message'=>'Cannot delete something went wrong']);\n }\n }", "public function delete($path)\n {\n if (!Storage::delete($path))\n {\n abort(500, 'Não foi possível deletar o arquivo.');\n }\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy($id_content)\n {\n\n $opds = DB::delete('DELETE FROM content_opds WHERE id_content = ?' , [$id_content]);\n return redirect('/opd')->with('delete', 'Data Opd telah berhasil dihapus');\n }", "public function delete($path, $data = null);", "public function deleteContent($idContent){\r\n\t \tif( static::$db == null ) static::__init();\r\n\t\r\n\t\t$valueParams = static::$file->ValueTable[\"attributes\"];\r\n\t\t$children = static::$file->ValueTable[\"children\"];\r\n\t\tforeach($children as $child){\r\n\t\t\tstatic::$sqlDeleteContentValue = str_replace( array( '%table%','%idContentValue%', '%id_content_value%'),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray( (String) $child[\"attributes\"][\"name\"],(String) $child[\"attributes\"][\"idContent\"],$idContent),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstatic::$sqlDeleteContentValue );\r\n\t\t\tstatic::$db->execute( static::$sqlDeleteContentValue );\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$contentParams = static::$file->ContentTable[\"attributes\"];\r\n\t\tstatic::$sqlDeleteContent = str_replace( array( '%table%','%idContent%', '%id_content%'),\r\n\t\t\t\t\t\t\t\t\t\t\t\tarray( (String) $contentParams[\"name\"],(String) $contentParams[\"id\"],$idContent),\r\n\t\t\t\t\t\t\t\t\t\t\t\tstatic::$sqlDeleteContent );\r\n\t\tstatic::$db->execute( static::$sqlDeleteContent );\r\n\t }", "public function deleteContentAndCopyLivePage() {}", "static function remove(string $content): string\n {\n return self::parse($content, function () { return ''; });\n }", "public function deleted(Media $media)\n {\n if ( $media->local ) {\n $type = $media->mediatype->slug;\n switch ('image') {\n case 'value':\n Storage::delete( 'public/'.$media->source );\n $arr = explode( '/', $media->source );\n $thmb = array_pop( $arr );\n Storage::delete( MediaController::$thmbdir.$thmb );\n break;\n\n default:\n // code...\n break;\n }\n }\n }", "function delete()\n\t{\n\tglobal $db, $config_vars;\n\n// \t\t$result = new phreak_error();\n// \t$result->set_object_id($this->id);\n// \t$result->set_operation('delete');\n\n\n\t\t//check if the object is in the database\n\t\tif (isset($this->id))\n\t\t{\n\n\t\t\tif ($this->check_perm('delete')) //Authorisation is okay\n\t\t\t{\n\n\t\t\t\t//remove views for this picture\n\t\t\t\t$sql = 'DELETE FROM ' . $config_vars['table_prefix'] . \"views WHERE content_id = \" . $this->id;\n\t\t\t\tif (!$result = $db->sql_query($sql))\n\t\t\t\t{\n\t\t\t\t\t$error = new phreak_error(E_WARNING,SQL_ERROR,__LINE__,__FILE__,'delete',$this->id,0,0,$sql);\n\t\t\t\t\t$error->commit();\n//\t\t\t\t\terror_report(SQL_ERROR, 'delete' , __LINE__, __FILE__,$sql);\n\t\t\t\t}\n\n\n\n\n\t\t\t\t// remove from content table\n\t\t\t\t$sql = \"DELETE FROM \" . $config_vars['table_prefix'] . \"content WHERE id = \" . $this->id;\n\t\t\t\tif (!$result = $db->sql_query($sql))\n\t\t\t\t{\n\t\t\t\t\t$error = new phreak_error(E_WARNING,SQL_ERROR,__LINE__,__FILE__,'delete',$this->id,0,0,$sql);\n\t\t\t\t\t$error->commit();\n//\t\t\t\t\terror_report(SQL_ERROR, 'delete' , __LINE__, __FILE__,$sql);\n\t\t\t\t}\n\n\t\t\t\t$this->clear_content_in_cat();\n\n\t\t\t\tif (is_file($this->file))\n\t\t\t\t{\n\t\t\t\t\tif (!unlink($this->file))\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = new phreak_error(E_WARNING,FILE_ERROR,__LINE__,__FILE__,'delete');\n\t\t\t\t\t\t$error->commit();\n//\t\t\t\t\t\terror_report(FILE_ERROR, 'delete' , __LINE__, __FILE__);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif (is_file($this->get_thumbfile()))\n\t\t\t\t{\n\t\t\t\t\tif (!unlink($this->get_thumbfile()))\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = new phreak_error(E_WARNING,FILE_ERROR,__LINE__,__FILE__,'delete');\n\t\t\t\t\t\t$error->commit();\n//\t\t\t\t\t\terror_report(FILE_ERROR, 'delete' , __LINE__, __FILE__);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tunset($this->id);\n\n\t\t\t\t// decrase content amount\n\t\t\t\tforeach ($this->cat_ids as $id)\n\t\t\t\t{\n\t\t\t\t\t$this->remove_from_cat = new categorie;\n\t\t\t\t\t$this->remove_from_cat->generate_from_id($id);\n\t\t\t\t\t$this->remove_from_cat->set_content_amount($this->remove_from_cat->get_content_amount()-1);\n\t\t\t\t\t$this->remove_from_cat->commit();\n\t\t\t\t}\n\n\n\t\t\t\t// remove from content_in_cat table\n\n\n\t\t\t\tunset($this->file);\n\t\t\t\tunset($this->cat_ids);\n\t\t\t\tunset($this->place_in_cat);\n\n\n\n\n\t\t\t\treturn OP_SUCCESSFUL;\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn OP_NP_MISSING_DELETE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn OP_NOT_IN_DB;\n\t\t}\n\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function deleteDataAction()\n {\n $contentService = Dm_Session::GetServiceFactory()->getContentService();\n $filter = new Service_Api_Filter_Content();\n $filter->id = $this->_getParam('id');\n $contents = $contentService->contentsDelete($filter);\n $this->view->data = $contents;\n }", "private function deleteLangFileContent() \n {\n $this->read();\n unset($this->arrayLang[$this->key]);\n $this->save();\n }", "public function destroy($id)\n {\n PageContents::find($id)->delete();\n return redirect()->route('admin.page_contents.index')\n ->with('success','Content deleted successfully');\n\n }", "public function delete_storage_unit($path)\n {\n $storage_unit_name = self::parse_xml_file($path);\n \n $this->add_message(\n self::TYPE_NORMAL, \n Translation::getInstance()->getTranslation('StorageUnitRemoval', null, 'Chamilo\\Core\\Install') . ': <em>' .\n $storage_unit_name . '</em>');\n \n $data_manager = static::context() . '\\DataManager';\n \n if (! $data_manager::drop_storage_unit($storage_unit_name))\n {\n return $this->failed(\n Translation::getInstance()->getTranslation('StorageUnitRemovalFailed', null, 'Chamilo\\Core\\Install') .\n ': <em>' . $storage_unit_name . '</em>');\n }\n else\n {\n return true;\n }\n }", "function delete() {\n global $DB;\n if($this->mayI(DELETE)) {\n $DB->metadata->delete($this->ID);\n $DB->content->delete($this->ID, false);\n $DB->spine->delete($this->ID);\n return parent::delete();\n } else return false;\n }", "private function removeEntrada($filePath){\n \\Storage::delete($filePath);\n }", "public function remove(Article $article);", "public function remove($data, array $context = [])\n {\n $data->setArchivage(true);\n $this->em->remove($data);\n $this->em->persist($data);\n //$this->em->remove($data);\n $this->em->flush();\n }", "public function delete(): void\n {\n unlink($this->path);\n }", "public function forceDeleted(Storage $storage)\n {\n //\n }", "public function delete(string $name)\n {\n\t\t$fileHandler = $this->getFileHandler('r');\n\t\t$tmpHandler = fopen('storage.tmp', 'w');\n\t\t$deleted = false;\n\t\twhile(!feof($fileHandler)){\n\t\t\t$line = fgets($fileHandler);\n\t\t\t$arry = explode('|', $line);\n\t\t\tif(strtolower($arry[0])==strtolower($name)){\n\t\t\t\t$deleted = true;\t\n\t\t\t\tcontinue; //For DELETE operation\n\t\t\t}\n\t\t\tfwrite($tmpHandler, $line);\n\t\t}\n\t\tfclose($tmpHandler);\n\t\t$this->closeFile($fileHandler);\n\n\t\tif($deleted==true){\n\t\t\trename('storage.tmp', 'storage.txt');\n\t\t}else{\n\t\t\tunlink('storage.tmp');\n\t\t}\n\t\treturn null;\n\t}", "public function testIsRemoveContentRelationed()\n {\n // 1. Create Page 1\n $page1 = $this->createPage();\n\n $pageId = $page1->id;\n\n // 2. Create Page 2 with content relation\n $attributes = $this->attributes['page'];\n $attributes['fields'][] = [\n 'identifier' => 'content',\n 'type' => 'contents',\n 'value' => [\n ['id' => $pageId]\n ]\n ];\n $page2 = $this->createPage($attributes);\n\n // 3. Remove page 1\n (new DeleteContent($page1))->handle();\n\n // 4. Test page 2 fields\n $page2 = Content::find(2);\n\n $contentId = $page2->field('content') ? $page2->field('content')->value : null;\n\n $this->assertNotEquals($pageId, $contentId);\n }", "function pico_delete_content($mydirname, $content_id, $skip_sync = false)\n{\n\t$db = XoopsDatabaseFactory::getDatabaseConnection();\n\n\t// update the content by blank data\n\t$_POST = [];\n\tpico_updatecontent($mydirname, $content_id, true, true);\n\n\t// backup the content, first\n\tpico_transact_backupcontent($mydirname, $content_id, true);\n\n\t// delete content\n\tif (!$db->queryF('DELETE FROM ' . $db->prefix($mydirname . '_contents') . ' WHERE content_id=' . (int)$content_id)) die(_MD_PICO_ERR_SQL . __LINE__);\n\n\t// rebuild category tree\n\tif (empty($skip_sync)) {\n\t\tpico_sync_cattree($mydirname);\n\t}\n\n\treturn true;\n}", "public function remove(HtmlContent $content)\n {\n $content->delete();\n\n return $this;\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove($resourceable, $id, Section $section, Content $content)\n {\n\n $section->components()->detach([$content->id]);\n\n log_activity(' Component Removed',\n 'A Section Content was successfully removed from the Sections', $content);\n\n return redirect()->back();\n }", "public function delete(){\n $record = actualite::find($this->selectedId);\n $record->delete();\n\n /* update image file */\n Storage::delete('public/_actualite/'.$this->selectedId.'.png');\n /* $this->photo->storePubliclyAs('public/_actualite/'.$this->selectedId.'.png'); */\n\n session()->flash('message', 'actualite modifié avec succès');\n $this->emit('Deleted');\n $this->dispatchBrowserEvent('Deleted');\n $this->resetFields();\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "function delete_content($recordid=0) {\n data_field_admin::delete_content_files($this);\n return parent::delete_content($recordid);\n }", "function cache_classes_DestroyContentFile($content_file_path=NULL)\n{\n $filepath = POPS_SYSTEM_PATH.'tmp/'.session_id().'.tmp.php';\n if ( $content_file_path!==NULL ) {\n $filepath = $content_file_path;\n }\n // try to delete file\n if (file_exists($filepath) ) {\n unlink($filepath);\n }\n}", "public function deleteContent ($id_content, $type_content) \n {\n $id_content = (int) $id_content; \n $db = $this->getModel('db');\n $sql = \"DELETE FROM $type_content WHERE id = '$id_content' LIMIT 1 \";\n $stmt = $db->query($sql);\n $sql = \"DELETE FROM \" . $this->table_cms_parametres_contenu . \" WHERE contenu_id_contenu = '$id_content' AND contenu_table_contenu = '\" . $type_content . \"' \";\n $stmt = $db->query($sql);\n $sql = \"DELETE FROM \" . $this->table_cms_instance_zone_has_contenu . \" WHERE id_contenu = '$id_content' AND table_contenu = '$type_content' \";\n $stmt = $db->query($sql);\n $sql = \"DELETE FROM \" . $this->table_cms_contenu . \" WHERE id_contenu = '$id_content' AND table_contenu = '$type_content' LIMIT 1 \";\n $stmt = $db->query($sql);\n }", "public function delete_page(string $area, string $uri)\n{\n\n // Delete from database\n db::query(\"DELETE FROM cms_layouts WHERE area = %s AND filename = %s\", $area, $uri);\n\n // Delete from redis\n $key = $area . '/' . $uri;\n redis::hdel('cms:titles', $key);\n redis::hdel('cms:layouts', $key);\n\n}", "public function destroy(Content $content, $subscribable_type = null, $subscribable_id = null )\n {\n $input = $this->validateRequest();\n if (isset($input['referenceable_id']) AND isset($input['referenceable_type'])){\n $subscribable_type = $input['referenceable_type'];\n $subscribable_id = $input['referenceable_id'];\n }\n\n abort_unless((\\Gate::allows('content_delete') OR\n \\Gate::allows($subscribable_type.'_content_delete')), 403);\n\n //todo: check if user is owner or has creator/admin role\n /**\n * check if content is subscribed only by deleting reference\n * - if yes -> delete content_subscription and content\n * - if not -> delete only content_subscription\n */\n\n //delete unused embedded media\n $media = $content->media;\n\n $content->mediaSubscriptions()\n ->where('subscribable_type', '=', 'App\\Content')\n ->where('subscribable_id', '=', $content->id)\n ->delete();\n\n if ($content->subscriptions()->count() <= 1){\n\n ContentSubscription::where('subscribable_type',\n (isset(request('subscribable')['content_subscriptions'][0]['subscribable_type'])) ? request('subscribable')['content_subscriptions'][0]['subscribable_type'] : $subscribable_type)\n ->where('subscribable_id', (isset(request('subscribable')['id'])) ? request('subscribable')['id'] : $subscribable_id)\n ->where('content_id', $content->id)\n ->delete();\n\n // delete contents\n foreach ($content->quotes AS $quote)\n {\n (new QuoteController)->destroy($quote); // delete and unsubscribe related objects\n }\n\n //todo? delete unused categorie_categoie\n $content->delete();\n\n } else {\n $subscription = ContentSubscription::where('subscribable_type', $subscribable_type)\n ->where('subscribable_id', $subscribable_id)\n ->where('content_id', $content->id)->get()->first(); //load subscription to get order_id for reordering\n ContentSubscription::where('subscribable_type',\n (isset(request('subscribable')['content_subscriptions'][0]['subscribable_type'])) ? request('subscribable')['content_subscriptions'][0]['subscribable_type'] : $subscribable_type)\n ->where('subscribable_id',(isset(request('subscribable')['id'])) ? request('subscribable')['id'] : $subscribable_id)\n ->where('content_id', $content->id)\n ->delete();\n //reset order_ids\n return (new ContentSubscription)\n ->where('subscribable_type', $subscribable_type)\n ->where('subscribable_id', $subscribable_id)\n ->where('order_id', '>', $subscription->order_id)\n ->update([\n 'order_id'=> DB::raw('order_id -1')\n ]);\n }\n\n //delete unused media\n foreach ($media AS $medium)\n {\n Medium::where('id', $medium->id)->delete();\n }\n // axios call?\n if (request()->wantsJson()){\n return ['message' => true];\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function delete($picture)\n\t{\n\t\t$picture = $this->findByName($picture);\n\t\t// exclui as fotos (pequena, media e grande)\n\t\tImageService::destroy($picture->name);\n\t\t// exclui no banco de dados\n\t\t$picture->delete();\n\n\t\treturn $picture->item;\n\t}", "public function delete($path)\n {\n $source = $this->dispatch($path);\n $value = &$this->storage;\n $last = count($source) - 1;\n foreach ($source as $key => $part) {\n if (isset($value[$part])) {\n if ($last == $key) {\n unset($value[$part]);\n return true;\n }\n $value = &$value[$part];\n continue;\n }\n break;\n }\n\n return false;\n }", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function postRemove(MediaInterface $media);", "public function removeFromCache()\n {\n Cache::tags('file')->forget(strtolower($this->alias));\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function deleteMetadata($path)\n {\n $fileKey = sha1($path);\n $this->getMetadataCache()->set(self::METADATA . $fileKey, []);\n $this->getMetadataCache()->delete(self::VISIBILITY . $fileKey);\n $this->getContentCache()->delete($fileKey);\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($value);", "public function delete(string $path){\n return Storage::disk(self::DISK)->delete($path);\n }", "public function deleteContent($idcontent){\n $check = Content::where('idcontent', $idcontent)->get();\n\n if($check->count() > 0){\n\n $delete = Content::where('idcontent', $idcontent);\n if($delete->update([\n 'delete' => 1\n ])){\n return response()->json([\n 'message' => '',\n 'result' => true\n ]);\n }else{\n return response()->json([\n 'message' => 'Failed to delete content',\n 'result' => false\n ]);\n } \n }else{\n return response()->json([\n 'message' => 'content not found!',\n 'result' => false\n ]);\n }\n }", "public function delete($path)\n {\n }", "function tiny_cache_delete_the_content( $post_id ) {\n\n wp_cache_delete( $post_id, 'the_content' );\n}", "public function clear() {\n @rmpath($this->storage);\n }", "public function destroy($id)\n {\n //\n $content = Content::findOrFail($id);\n $content->delete();\n return redirect()->intended('/content');\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();" ]
[ "0.67548907", "0.64925677", "0.64925677", "0.62877476", "0.61022276", "0.6038654", "0.60094595", "0.6001756", "0.59441453", "0.59193224", "0.59193224", "0.59193224", "0.59193224", "0.5905215", "0.585021", "0.5826368", "0.5823953", "0.5811891", "0.5782859", "0.577896", "0.5775859", "0.57649535", "0.5744246", "0.56899935", "0.5680209", "0.5679561", "0.56790495", "0.5677991", "0.5676354", "0.5663108", "0.5641078", "0.5641078", "0.56406283", "0.56383383", "0.56383383", "0.56383383", "0.5636157", "0.56031084", "0.5582674", "0.5582674", "0.5573019", "0.55717385", "0.55604076", "0.55071723", "0.55043656", "0.54897267", "0.54822433", "0.5480265", "0.54742193", "0.5466457", "0.5456368", "0.54526013", "0.54523945", "0.5444295", "0.5442513", "0.54364055", "0.54285383", "0.54230654", "0.5417716", "0.5416851", "0.5416661", "0.54097366", "0.54064924", "0.53942263", "0.53897583", "0.5383201", "0.538273", "0.53730875", "0.53723276", "0.53701377", "0.5367951", "0.5365348", "0.53635794", "0.5357412", "0.535593", "0.5339274", "0.53377646", "0.5337679", "0.53374535", "0.53357106", "0.5334696", "0.5332295", "0.5328878", "0.53197783", "0.53174955", "0.53152597", "0.5313599", "0.5312225", "0.53120893", "0.53045344", "0.53029466", "0.53009456", "0.5298332", "0.5298244", "0.5297028", "0.5297028", "0.5297028", "0.5297028", "0.5297028", "0.5297028" ]
0.5888412
14
Remove the specified content from storage.
public function remove($resourceable, $id, Section $section, Content $content) { $section->components()->detach([$content->id]); log_activity(' Component Removed', 'A Section Content was successfully removed from the Sections', $content); return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "public function destroy(Content $content)\n {\n //\n }", "public function destroy(Content $content)\n {\n //\n }", "public function destroy($content)\n {\n $content= Content::find($content);\n\n\n $content->delete();\n return redirect('/admin/contents/index')->with('success','content deleted successfully'); \n }", "public function clearStorage(): void\n {\n// foreach ($this->remoteFilesystems as $filesystem) {\n// $contents = $filesystem->listContents('/', true);\n// foreach ($contents as $contentItem) {\n// if ('file' !== $contentItem['type']) {\n// continue;\n// }\n// $filesystem->delete($contentItem['path']);\n// }\n// }\n }", "public function deleted(Storage $storage)\n {\n //\n }", "public function testDeleteRemovesStorages()\n {\n file_put_contents(self::$temp.DS.'file1.txt', 'Hello World');\n\n Storage::delete(self::$temp.DS.'file1.txt');\n $this->assertTrue(! is_file(self::$temp.DS.'file1.txt'));\n }", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function destroy($id)\n {\n $selectedContent = DisplayContent::findOrFail($id);\n\n if (Auth::user()->can('delete', $selectedContent)) {\n unlink('storage/images/' . $selectedContent->image->filename);\n foreach ($selectedContent->nodes as $node) {\n $node->user->notify(new EmailNotification(EmailSubjectTypes::RemovalOfContent,\n $selectedContent->content_title . EmailMessages::RemovalOfContentMessage, $node->id, Auth::user()));\n }\n\n $selectedContent->delete();\n session()->flash('session_message', \"Content Deleted\");\n return redirect()->route('userContent');\n } else {\n session()->flash('session_message', \"You don't have authentication to delete this content\");\n return redirect()->route('userContent');\n }\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function destroy($id)\n {\n \t$content = Content::find($id);\n \t$content->tags()->detach();\n \t$content->devices()->detach();\n \t$content->delete();\n \t\n \treturn redirect()->back();\n }", "public function destroyContent(Content $content)\n {\n if($content->sections->count() > 1 ){\n foreach($content->sections as $section){\n $section->components()->detach([$content->id]);\n }\n }\n\n // delete Section_content\n $this->deleteEntry($content, request());\n\n log_activity(' Component Deleted',\n 'A Content was successfully removed', $content);\n\n return redirect_to_resource();\n }", "public function destroy($id)\n {\n $content = Content::find($id);\n $content->categories()->detach();\n if ($content->delete()) {\n Storage::delete('public/images/content/' . $content->image);\n return redirect('admin/content/')->with('success', 'Deleting Content Success');\n } else {\n return redirect('admin/content/')->with('error', 'Deleting Content Failed');\n }\n }", "public static function DeleteContent($content) {\n //Get the database name\n\n\n //initiate the redbean dal contoller\n $rb = RedBeanController::RedBean();\n\n //set up the array to hold the ids\n $ids = array();\n \n //start to build the sql\n $query = \"delete from content where textId in (\";\n \n //for each content item, add to the query and the ids array\n for($i=0; $i<count($content); $i++) {\n $query .= \":id$i,\";\n $ids[\":id$i\"] = $content[$i]->id;\n }\n \n //tidy up the query\n $query = rtrim($query, \",\").\")\";\n \n //Get the RB database adapter\n $db = RedBeanController::DataBaseAdapter();\n \n //execute the sql\n $db->exec($query, $ids);\n \n /*\n //loop throught each item of content\n foreach($content as $item) {\n $potentials = RedBeanController::Finder()->where(\"content\", \"textid = :id limit 1\", array(\":id\" => $item->id));\n if(!isset($potentials) || !is_array($potentials) || count($potentials) == 0) {\n continue;\n }\n\n //get the content\n $i = reset($potentials);\n\n //First remove all existing text\n $textToRemove = $rb->batch(\"content_text\", RedBeanController::GetRelatedBeans($i, \"content_text\"));\n if(isset($textToRemove) && is_array($textToRemove) && count($textToRemove) > 0) {\n foreach($textToRemove as $ttr) {\n $rb->trash($ttr);\n }\n }\n\n //first remove the existing tags\n $tagsToRemove = $rb->batch(\"content_tags\", RedBeanController::GetRelatedBeans($i, \"content_tags\"));\n if(isset($tagsToRemove) && is_array($tagsToRemove) && count($tagsToRemove) > 0) {\n foreach($tagsToRemove as $ttr) {\n $rb->trash($ttr);\n }\n }\n\n //remove all existing difcollection and their difs\n $difCollectionsToRemove = $rb->batch(\"dif_collections\", RedBeanController::GetRelatedBeans($i, \"dif_collections\"));\n if(isset($difCollectionsToRemove) && is_array($difCollectionsToRemove) && count($difCollectionsToRemove) > 0) {\n foreach($difCollectionsToRemove as $dctr) {\n $difstoremove = $rb->batch(\"difs\", RedBeanController::GetRelatedBeans($dctr, \"difs\"));\n if(isset($difstoremove) && is_array($difstoremove) && count($difstoremove) > 0) {\n foreach($difstoremove as $diftoremove) {\n $rb->trash($diftoremove);\n }\n }\n $rb->trash($dctr);\n }\n }\n\n //Remove the content\n $rb->trash($i);\n \n }\n */\n }", "public function remove($path);", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function deleteContent(array $query = null);", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function delete()\n {\n $content = $this->get();\n\n foreach ($content as $key=>$value)\n {\n $this->set($key, null);\n }\n\n return $this->save();\n }", "function ccontent_delete($content)\n\t{\n\t\tlusers_require('content/delete');\n\n\t\t$cat = mcontent_get_cat($content);\n\t\tmcontent_delete($content);\n\t\tmcategories_delete($cat['id']);\n\n\t\tlcache_delete_all();\n\n\t\tluri_redirect('main/user/admin/content', l('Content successfully deleted.'));\n\t}", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function remove() {}", "public function remove() {}", "public function delete($name)\n {\n foreach ($this->content as $key => $val) {\n if ($val['name'] == $name) {\n unset($this->content[$key]);\n $this->content = array_merge($this->content);\n }\n }\n }", "public function delete($position)\n {\n $this->deleteArray('content', $position);\n }", "public function delete($position)\n {\n $this->deleteArray('content', $position);\n }", "public function destroy($id)\n {\n //\n DB::table(\"contents\")->where('id',$id)->delete();\n return redirect()->route('content.index')\n ->with('success','Content deleted successfully');\n }", "abstract public function remove();", "abstract public function remove();", "abstract public function remove();", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function delete($path);", "public function delete($path);", "public function removeAll($content)\r\n\t{\r\n\t\treturn $this->removeAttribute('.*', $content);\r\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function deleteObject($path)\n\t{\n\t\t// Re-authenticate if necessary\n\t\t$token = $this->getToken();\n\n\t\t// Get the URL to list containers\n\t\t$url = $this->getStorageEndpoint();\n\t\t$url = rtrim($url, '\\\\/');\n\t\t$path = ltrim($path, '\\\\/');\n\t\t$url .= '/' . $path;\n\n\t\t// Get the request object\n\t\t$request = new Request('DELETE', $url);\n\t\t$request->setHeader('X-Auth-Token', $token);\n\n\t\t$request->getResponse();\n\t}", "public function destroy($id)\n {\n\n\n $data = SoftwareMedia::find($id);\n $isDeleted =$data->delete();\n $value = $data->screenshots;\n if(strpos($value, \"+\") !== false){\n $data->screenshots = (explode(\"+\",$value));\n foreach($data->screenshots as $one){\n //$one= substr($one,42);\n $one = str_replace('http://localhost:8000/storage/screenshots/','',$one);\n unlink(storage_path('app/public/screenshots/'.$one));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/screenshots/','',$value);\n unlink(storage_path('app/public/screenshots/'.$value));\n }\n\n if($data->ebooks != null){\n $value = $data->ebooks;\n if(strpos($value, \"+\") !== false){\n $data->ebooks = (explode(\"+\",$value));\n foreach($data->ebooks as $ebook){\n $ebook = str_replace('http://localhost:8000/storage/ebooks/','',$ebook);\n unlink(storage_path('app/public/ebooks/'.$ebook));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/ebooks/','',$value);\n unlink(storage_path('app/public/ebooks/'.$value));\n }\n }\n if($data->whitepapers != null){\n $value = $data->whitepapers;\n if(strpos($value, \"+\") !== false){\n $data->whitepapers = (explode(\"+\",$value));\n foreach($data->whitepapers as $whitepaper){\n $whitepaper = str_replace('http://localhost:8000/storage/whitepapers/','',$whitepaper);\n unlink(storage_path('app/public/whitepapers/'.$whitepaper));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/whitepapers/','',$value);\n unlink(storage_path('app/public/whitepapers/'.$value));\n }\n }\n if($data->pdf != null){\n $value = $data->pdf;\n if(strpos($value, \"+\") !== false){\n $data->pdf = (explode(\"+\",$value));\n foreach($data->pdf as $one){\n $one = str_replace('http://localhost:8000/storage/pdf/','',$one);\n unlink(storage_path('app/public/pdf/'.$one));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/pdf/','',$value);\n unlink(storage_path('app/public/pdf/'.$value));\n }\n }\n if($data->guides != null){\n $value = $data->guides;\n if(strpos($value, \"+\") !== false){\n $data->guides = (explode(\"+\",$value));\n foreach($data->guides as $guide){\n $guide = str_replace('http://localhost:8000/storage/guides/','',$guide);\n unlink(storage_path('app/public/guides/'.$guide));\n }\n }else{\n $value = str_replace('http://localhost:8000/storage/guides/','',$value);\n unlink(storage_path('app/public/guides/'.$value));\n }\n }\n if($isDeleted == true){\n return response()->json(['message'=>'Deleted successfully','isdeleted'=>$isDeleted],200 );\n }else{\n return response()->json(['message'=>'Cannot delete something went wrong']);\n }\n }", "public function delete($path)\n {\n if (!Storage::delete($path))\n {\n abort(500, 'Não foi possível deletar o arquivo.');\n }\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy($id_content)\n {\n\n $opds = DB::delete('DELETE FROM content_opds WHERE id_content = ?' , [$id_content]);\n return redirect('/opd')->with('delete', 'Data Opd telah berhasil dihapus');\n }", "public function delete($path, $data = null);", "public function deleteContent($idContent){\r\n\t \tif( static::$db == null ) static::__init();\r\n\t\r\n\t\t$valueParams = static::$file->ValueTable[\"attributes\"];\r\n\t\t$children = static::$file->ValueTable[\"children\"];\r\n\t\tforeach($children as $child){\r\n\t\t\tstatic::$sqlDeleteContentValue = str_replace( array( '%table%','%idContentValue%', '%id_content_value%'),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray( (String) $child[\"attributes\"][\"name\"],(String) $child[\"attributes\"][\"idContent\"],$idContent),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstatic::$sqlDeleteContentValue );\r\n\t\t\tstatic::$db->execute( static::$sqlDeleteContentValue );\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$contentParams = static::$file->ContentTable[\"attributes\"];\r\n\t\tstatic::$sqlDeleteContent = str_replace( array( '%table%','%idContent%', '%id_content%'),\r\n\t\t\t\t\t\t\t\t\t\t\t\tarray( (String) $contentParams[\"name\"],(String) $contentParams[\"id\"],$idContent),\r\n\t\t\t\t\t\t\t\t\t\t\t\tstatic::$sqlDeleteContent );\r\n\t\tstatic::$db->execute( static::$sqlDeleteContent );\r\n\t }", "public function deleteContentAndCopyLivePage() {}", "static function remove(string $content): string\n {\n return self::parse($content, function () { return ''; });\n }", "public function deleted(Media $media)\n {\n if ( $media->local ) {\n $type = $media->mediatype->slug;\n switch ('image') {\n case 'value':\n Storage::delete( 'public/'.$media->source );\n $arr = explode( '/', $media->source );\n $thmb = array_pop( $arr );\n Storage::delete( MediaController::$thmbdir.$thmb );\n break;\n\n default:\n // code...\n break;\n }\n }\n }", "function delete()\n\t{\n\tglobal $db, $config_vars;\n\n// \t\t$result = new phreak_error();\n// \t$result->set_object_id($this->id);\n// \t$result->set_operation('delete');\n\n\n\t\t//check if the object is in the database\n\t\tif (isset($this->id))\n\t\t{\n\n\t\t\tif ($this->check_perm('delete')) //Authorisation is okay\n\t\t\t{\n\n\t\t\t\t//remove views for this picture\n\t\t\t\t$sql = 'DELETE FROM ' . $config_vars['table_prefix'] . \"views WHERE content_id = \" . $this->id;\n\t\t\t\tif (!$result = $db->sql_query($sql))\n\t\t\t\t{\n\t\t\t\t\t$error = new phreak_error(E_WARNING,SQL_ERROR,__LINE__,__FILE__,'delete',$this->id,0,0,$sql);\n\t\t\t\t\t$error->commit();\n//\t\t\t\t\terror_report(SQL_ERROR, 'delete' , __LINE__, __FILE__,$sql);\n\t\t\t\t}\n\n\n\n\n\t\t\t\t// remove from content table\n\t\t\t\t$sql = \"DELETE FROM \" . $config_vars['table_prefix'] . \"content WHERE id = \" . $this->id;\n\t\t\t\tif (!$result = $db->sql_query($sql))\n\t\t\t\t{\n\t\t\t\t\t$error = new phreak_error(E_WARNING,SQL_ERROR,__LINE__,__FILE__,'delete',$this->id,0,0,$sql);\n\t\t\t\t\t$error->commit();\n//\t\t\t\t\terror_report(SQL_ERROR, 'delete' , __LINE__, __FILE__,$sql);\n\t\t\t\t}\n\n\t\t\t\t$this->clear_content_in_cat();\n\n\t\t\t\tif (is_file($this->file))\n\t\t\t\t{\n\t\t\t\t\tif (!unlink($this->file))\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = new phreak_error(E_WARNING,FILE_ERROR,__LINE__,__FILE__,'delete');\n\t\t\t\t\t\t$error->commit();\n//\t\t\t\t\t\terror_report(FILE_ERROR, 'delete' , __LINE__, __FILE__);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif (is_file($this->get_thumbfile()))\n\t\t\t\t{\n\t\t\t\t\tif (!unlink($this->get_thumbfile()))\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = new phreak_error(E_WARNING,FILE_ERROR,__LINE__,__FILE__,'delete');\n\t\t\t\t\t\t$error->commit();\n//\t\t\t\t\t\terror_report(FILE_ERROR, 'delete' , __LINE__, __FILE__);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tunset($this->id);\n\n\t\t\t\t// decrase content amount\n\t\t\t\tforeach ($this->cat_ids as $id)\n\t\t\t\t{\n\t\t\t\t\t$this->remove_from_cat = new categorie;\n\t\t\t\t\t$this->remove_from_cat->generate_from_id($id);\n\t\t\t\t\t$this->remove_from_cat->set_content_amount($this->remove_from_cat->get_content_amount()-1);\n\t\t\t\t\t$this->remove_from_cat->commit();\n\t\t\t\t}\n\n\n\t\t\t\t// remove from content_in_cat table\n\n\n\t\t\t\tunset($this->file);\n\t\t\t\tunset($this->cat_ids);\n\t\t\t\tunset($this->place_in_cat);\n\n\n\n\n\t\t\t\treturn OP_SUCCESSFUL;\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn OP_NP_MISSING_DELETE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn OP_NOT_IN_DB;\n\t\t}\n\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function deleteDataAction()\n {\n $contentService = Dm_Session::GetServiceFactory()->getContentService();\n $filter = new Service_Api_Filter_Content();\n $filter->id = $this->_getParam('id');\n $contents = $contentService->contentsDelete($filter);\n $this->view->data = $contents;\n }", "private function deleteLangFileContent() \n {\n $this->read();\n unset($this->arrayLang[$this->key]);\n $this->save();\n }", "public function destroy($id)\n {\n PageContents::find($id)->delete();\n return redirect()->route('admin.page_contents.index')\n ->with('success','Content deleted successfully');\n\n }", "public function delete_storage_unit($path)\n {\n $storage_unit_name = self::parse_xml_file($path);\n \n $this->add_message(\n self::TYPE_NORMAL, \n Translation::getInstance()->getTranslation('StorageUnitRemoval', null, 'Chamilo\\Core\\Install') . ': <em>' .\n $storage_unit_name . '</em>');\n \n $data_manager = static::context() . '\\DataManager';\n \n if (! $data_manager::drop_storage_unit($storage_unit_name))\n {\n return $this->failed(\n Translation::getInstance()->getTranslation('StorageUnitRemovalFailed', null, 'Chamilo\\Core\\Install') .\n ': <em>' . $storage_unit_name . '</em>');\n }\n else\n {\n return true;\n }\n }", "private function removeEntrada($filePath){\n \\Storage::delete($filePath);\n }", "function delete() {\n global $DB;\n if($this->mayI(DELETE)) {\n $DB->metadata->delete($this->ID);\n $DB->content->delete($this->ID, false);\n $DB->spine->delete($this->ID);\n return parent::delete();\n } else return false;\n }", "public function remove(Article $article);", "public function remove($data, array $context = [])\n {\n $data->setArchivage(true);\n $this->em->remove($data);\n $this->em->persist($data);\n //$this->em->remove($data);\n $this->em->flush();\n }", "public function delete(): void\n {\n unlink($this->path);\n }", "public function forceDeleted(Storage $storage)\n {\n //\n }", "public function delete(string $name)\n {\n\t\t$fileHandler = $this->getFileHandler('r');\n\t\t$tmpHandler = fopen('storage.tmp', 'w');\n\t\t$deleted = false;\n\t\twhile(!feof($fileHandler)){\n\t\t\t$line = fgets($fileHandler);\n\t\t\t$arry = explode('|', $line);\n\t\t\tif(strtolower($arry[0])==strtolower($name)){\n\t\t\t\t$deleted = true;\t\n\t\t\t\tcontinue; //For DELETE operation\n\t\t\t}\n\t\t\tfwrite($tmpHandler, $line);\n\t\t}\n\t\tfclose($tmpHandler);\n\t\t$this->closeFile($fileHandler);\n\n\t\tif($deleted==true){\n\t\t\trename('storage.tmp', 'storage.txt');\n\t\t}else{\n\t\t\tunlink('storage.tmp');\n\t\t}\n\t\treturn null;\n\t}", "public function testIsRemoveContentRelationed()\n {\n // 1. Create Page 1\n $page1 = $this->createPage();\n\n $pageId = $page1->id;\n\n // 2. Create Page 2 with content relation\n $attributes = $this->attributes['page'];\n $attributes['fields'][] = [\n 'identifier' => 'content',\n 'type' => 'contents',\n 'value' => [\n ['id' => $pageId]\n ]\n ];\n $page2 = $this->createPage($attributes);\n\n // 3. Remove page 1\n (new DeleteContent($page1))->handle();\n\n // 4. Test page 2 fields\n $page2 = Content::find(2);\n\n $contentId = $page2->field('content') ? $page2->field('content')->value : null;\n\n $this->assertNotEquals($pageId, $contentId);\n }", "function pico_delete_content($mydirname, $content_id, $skip_sync = false)\n{\n\t$db = XoopsDatabaseFactory::getDatabaseConnection();\n\n\t// update the content by blank data\n\t$_POST = [];\n\tpico_updatecontent($mydirname, $content_id, true, true);\n\n\t// backup the content, first\n\tpico_transact_backupcontent($mydirname, $content_id, true);\n\n\t// delete content\n\tif (!$db->queryF('DELETE FROM ' . $db->prefix($mydirname . '_contents') . ' WHERE content_id=' . (int)$content_id)) die(_MD_PICO_ERR_SQL . __LINE__);\n\n\t// rebuild category tree\n\tif (empty($skip_sync)) {\n\t\tpico_sync_cattree($mydirname);\n\t}\n\n\treturn true;\n}", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove(HtmlContent $content)\n {\n $content->delete();\n\n return $this;\n }", "public function delete(){\n $record = actualite::find($this->selectedId);\n $record->delete();\n\n /* update image file */\n Storage::delete('public/_actualite/'.$this->selectedId.'.png');\n /* $this->photo->storePubliclyAs('public/_actualite/'.$this->selectedId.'.png'); */\n\n session()->flash('message', 'actualite modifié avec succès');\n $this->emit('Deleted');\n $this->dispatchBrowserEvent('Deleted');\n $this->resetFields();\n }", "function delete_content($recordid=0) {\n data_field_admin::delete_content_files($this);\n return parent::delete_content($recordid);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "function cache_classes_DestroyContentFile($content_file_path=NULL)\n{\n $filepath = POPS_SYSTEM_PATH.'tmp/'.session_id().'.tmp.php';\n if ( $content_file_path!==NULL ) {\n $filepath = $content_file_path;\n }\n // try to delete file\n if (file_exists($filepath) ) {\n unlink($filepath);\n }\n}", "public function deleteContent ($id_content, $type_content) \n {\n $id_content = (int) $id_content; \n $db = $this->getModel('db');\n $sql = \"DELETE FROM $type_content WHERE id = '$id_content' LIMIT 1 \";\n $stmt = $db->query($sql);\n $sql = \"DELETE FROM \" . $this->table_cms_parametres_contenu . \" WHERE contenu_id_contenu = '$id_content' AND contenu_table_contenu = '\" . $type_content . \"' \";\n $stmt = $db->query($sql);\n $sql = \"DELETE FROM \" . $this->table_cms_instance_zone_has_contenu . \" WHERE id_contenu = '$id_content' AND table_contenu = '$type_content' \";\n $stmt = $db->query($sql);\n $sql = \"DELETE FROM \" . $this->table_cms_contenu . \" WHERE id_contenu = '$id_content' AND table_contenu = '$type_content' LIMIT 1 \";\n $stmt = $db->query($sql);\n }", "public function destroy(Content $content, $subscribable_type = null, $subscribable_id = null )\n {\n $input = $this->validateRequest();\n if (isset($input['referenceable_id']) AND isset($input['referenceable_type'])){\n $subscribable_type = $input['referenceable_type'];\n $subscribable_id = $input['referenceable_id'];\n }\n\n abort_unless((\\Gate::allows('content_delete') OR\n \\Gate::allows($subscribable_type.'_content_delete')), 403);\n\n //todo: check if user is owner or has creator/admin role\n /**\n * check if content is subscribed only by deleting reference\n * - if yes -> delete content_subscription and content\n * - if not -> delete only content_subscription\n */\n\n //delete unused embedded media\n $media = $content->media;\n\n $content->mediaSubscriptions()\n ->where('subscribable_type', '=', 'App\\Content')\n ->where('subscribable_id', '=', $content->id)\n ->delete();\n\n if ($content->subscriptions()->count() <= 1){\n\n ContentSubscription::where('subscribable_type',\n (isset(request('subscribable')['content_subscriptions'][0]['subscribable_type'])) ? request('subscribable')['content_subscriptions'][0]['subscribable_type'] : $subscribable_type)\n ->where('subscribable_id', (isset(request('subscribable')['id'])) ? request('subscribable')['id'] : $subscribable_id)\n ->where('content_id', $content->id)\n ->delete();\n\n // delete contents\n foreach ($content->quotes AS $quote)\n {\n (new QuoteController)->destroy($quote); // delete and unsubscribe related objects\n }\n\n //todo? delete unused categorie_categoie\n $content->delete();\n\n } else {\n $subscription = ContentSubscription::where('subscribable_type', $subscribable_type)\n ->where('subscribable_id', $subscribable_id)\n ->where('content_id', $content->id)->get()->first(); //load subscription to get order_id for reordering\n ContentSubscription::where('subscribable_type',\n (isset(request('subscribable')['content_subscriptions'][0]['subscribable_type'])) ? request('subscribable')['content_subscriptions'][0]['subscribable_type'] : $subscribable_type)\n ->where('subscribable_id',(isset(request('subscribable')['id'])) ? request('subscribable')['id'] : $subscribable_id)\n ->where('content_id', $content->id)\n ->delete();\n //reset order_ids\n return (new ContentSubscription)\n ->where('subscribable_type', $subscribable_type)\n ->where('subscribable_id', $subscribable_id)\n ->where('order_id', '>', $subscription->order_id)\n ->update([\n 'order_id'=> DB::raw('order_id -1')\n ]);\n }\n\n //delete unused media\n foreach ($media AS $medium)\n {\n Medium::where('id', $medium->id)->delete();\n }\n // axios call?\n if (request()->wantsJson()){\n return ['message' => true];\n }\n }", "public function delete_page(string $area, string $uri)\n{\n\n // Delete from database\n db::query(\"DELETE FROM cms_layouts WHERE area = %s AND filename = %s\", $area, $uri);\n\n // Delete from redis\n $key = $area . '/' . $uri;\n redis::hdel('cms:titles', $key);\n redis::hdel('cms:layouts', $key);\n\n}", "public function delete($picture)\n\t{\n\t\t$picture = $this->findByName($picture);\n\t\t// exclui as fotos (pequena, media e grande)\n\t\tImageService::destroy($picture->name);\n\t\t// exclui no banco de dados\n\t\t$picture->delete();\n\n\t\treturn $picture->item;\n\t}", "public function delete($path)\n {\n $source = $this->dispatch($path);\n $value = &$this->storage;\n $last = count($source) - 1;\n foreach ($source as $key => $part) {\n if (isset($value[$part])) {\n if ($last == $key) {\n unset($value[$part]);\n return true;\n }\n $value = &$value[$part];\n continue;\n }\n break;\n }\n\n return false;\n }", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function postRemove(MediaInterface $media);", "public function removeFromCache()\n {\n Cache::tags('file')->forget(strtolower($this->alias));\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function deleteMetadata($path)\n {\n $fileKey = sha1($path);\n $this->getMetadataCache()->set(self::METADATA . $fileKey, []);\n $this->getMetadataCache()->delete(self::VISIBILITY . $fileKey);\n $this->getContentCache()->delete($fileKey);\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete(string $path){\n return Storage::disk(self::DISK)->delete($path);\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($value);", "public function deleteContent($idcontent){\n $check = Content::where('idcontent', $idcontent)->get();\n\n if($check->count() > 0){\n\n $delete = Content::where('idcontent', $idcontent);\n if($delete->update([\n 'delete' => 1\n ])){\n return response()->json([\n 'message' => '',\n 'result' => true\n ]);\n }else{\n return response()->json([\n 'message' => 'Failed to delete content',\n 'result' => false\n ]);\n } \n }else{\n return response()->json([\n 'message' => 'content not found!',\n 'result' => false\n ]);\n }\n }", "public function delete($path)\n {\n }", "function tiny_cache_delete_the_content( $post_id ) {\n\n wp_cache_delete( $post_id, 'the_content' );\n}", "public function destroy($id)\n {\n //\n $content = Content::findOrFail($id);\n $content->delete();\n return redirect()->intended('/content');\n }", "public function clear() {\n @rmpath($this->storage);\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();" ]
[ "0.67548406", "0.6495158", "0.6495158", "0.6289601", "0.6104012", "0.6043019", "0.60130143", "0.6004255", "0.5945178", "0.5915372", "0.5915372", "0.5915372", "0.5915372", "0.5906119", "0.589017", "0.5851354", "0.58281577", "0.58217406", "0.58114344", "0.5783705", "0.5778882", "0.5778406", "0.5763956", "0.5739615", "0.5688663", "0.56808466", "0.5678983", "0.5677412", "0.5675258", "0.56741935", "0.5662004", "0.5642204", "0.5642204", "0.5641753", "0.56344813", "0.56344813", "0.56344813", "0.5634087", "0.5603484", "0.5582843", "0.5582843", "0.55737513", "0.5570342", "0.55593693", "0.55064857", "0.5506017", "0.5487764", "0.54833037", "0.5479086", "0.5476507", "0.5467637", "0.5457491", "0.54530275", "0.54510045", "0.5442555", "0.5442005", "0.5436679", "0.5429611", "0.5423456", "0.5417465", "0.54169357", "0.54146105", "0.5406033", "0.54052925", "0.5399903", "0.53895265", "0.53848773", "0.5384404", "0.537613", "0.53730476", "0.5366407", "0.5365697", "0.5364382", "0.53587556", "0.5358039", "0.5339441", "0.5338537", "0.533662", "0.5335905", "0.5334459", "0.53343177", "0.5329848", "0.532784", "0.5323387", "0.5317417", "0.53173774", "0.53120023", "0.5310964", "0.5309136", "0.5307682", "0.53030944", "0.53015935", "0.52994436", "0.5298089", "0.5296631", "0.5296631", "0.5296631", "0.5296631", "0.5296631", "0.5296631" ]
0.53683406
70
Save Image in Storage, crop image and save in public/uploads/images
private function moveAndCreatePhoto( UploadedFile $file, $size = ['l' => [1024, 768], 's' => [320, 240]] ) { $extension = '.' . $file->extension(); $name = token(); $filename = $name . $extension; $path = upload_path_images(); $imageTmp = Image::make($file->getRealPath()); if (!$imageTmp) { return false; } $largeSize = $size['l']; $thumbSize = $size['s']; // save original $imageTmp->save($path . $name . ImageThumb::$originalAppend . $extension); // if height is the biggest - resize on max height if ($imageTmp->width() < $imageTmp->height()) { // resize the image to the large height and constrain aspect ratio (auto width) $imageTmp->resize(null, $largeSize[1], function ($constraint) { $constraint->aspectRatio(); })->save($path . $filename); // resize the image to the thumb height and constrain aspect ratio (auto width) $imageTmp->resize(null, $thumbSize[1], function ($constraint) { $constraint->aspectRatio(); })->save($path . $name . ImageThumb::$thumbAppend . $extension); } else { // resize the image to the large width and constrain aspect ratio (auto height) $imageTmp->resize($largeSize[0], null, function ($constraint) { $constraint->aspectRatio(); })->save($path . $filename); // resize the image to the thumb width and constrain aspect ratio (auto width) $imageTmp->resize($thumbSize[0], null, function ($constraint) { $constraint->aspectRatio(); })->save($path . $name . ImageThumb::$thumbAppend . $extension); } return $filename; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function imageCropPost(Request $request)\n {\n $data = $request->image;\n\n\n list($type, $data) = explode(';', $data);\n list(, $data) = explode(',', $data);\n\n\n $data = base64_decode($data);\n $image_name= time().'.png';\n $path = public_path() . \"/upload/\" . $image_name;\n\n\n file_put_contents($path, $data);\n\n\n return response()->json(['success'=>'done']);\n }", "public function cropProfile(Request $request, $id)\n {\n $user = User::find($id);\n $targ_w = $targ_h = 300;\n $jpeg_quality = 90;\n\n $src = $user->profile_photo;\n $img_r = imagecreatefromjpeg($src);\n $dst_r = ImageCreateTrueColor( $targ_w, $targ_h );\n\n imagecopyresampled($dst_r,$img_r,0,0,$request->x,$request->y,\n $targ_w,$targ_h,$request->w,$request->h);\n $filename = $id.'.jpg';\n $path2= 'https://s3.amazonaws.com/'. env('S3_BUCKET') .'/'. $filename;\n \n ob_start();\n imagejpeg($dst_r);\n $jpeg_file_contents = ob_get_contents();\n ob_end_clean();\n Storage::disk('s3')->put( $id.'.jpg', $jpeg_file_contents, 'public');\n \n $path = Storage::cloud()->url($filename);\n\n Session(['val' => 'false']);\n \n $user->profile_photo = $path2; \n Storage::disk('s3')->delete('https://s3.amazonaws.com/'. env('S3_BUCKET') .'/'.$user->id.'temporal.jpg');\n if($user->save())\n return redirect('/user/edit/complete');\n }", "public function saveCroppedAsset()\n {\n if(!empty($this->uploadedFile))\n {\n // If file is exist -> remove him\n if(file_exists($this->getFilePath()))\n {\n unlink($this->getFilePath());\n }\n\n $this->genFilename();\n $imagine = Image::getImagine()->open($this->uploadedFile->tempName);\n }\n else\n {\n if(file_exists($this->getFilePath())) {\n $imagine = Image::getImagine()->open($this->getFilePath());\n } else return false;\n }\n\n $size = $imagine->getSize();\n $width = $size->getWidth();\n $height = $size->getHeight();\n\n $cropData = explode(';', $this->cropData);\n\n if(count($cropData) == 4)\n {\n $point = new Point($cropData[0]*$width, $cropData[1]*$height);\n $box = new Box($cropData[2]*$width, $cropData[3]*$height);\n $imagine->crop($point, $box);\n // $imageBox = $this->getImageBox($size);\n // $imagine->resize($imageBox);\n }\n $imagine->save($this->getFilePath());\n\n return $this->save(false);\n }", "public function save()\n {\n\n $photo = $this->flyer->addPhoto($this->makePhoto());\n\n\n // move the photo to the images folder\n $this->file->move($photo->baseDir(), $photo->name);\n\n\n// Image::make($this->path)\n// ->fit(200)\n// ->save($this->thumbnail_path);\n\n // generate a thumbnail\n $this->thumbnail->make($photo->path, $photo->thumbnail_path);\n }", "public function uploadProfileImage(){\n $imgUrl = $_POST['imgUrl'];\n // original sizes\n $imgInitW = $_POST['imgInitW'];\n $imgInitH = $_POST['imgInitH'];\n // resized sizes\n $imgW = $_POST['imgW'];\n $imgH = $_POST['imgH'];\n // offsets\n $imgY1 = $_POST['imgY1'];\n $imgX1 = $_POST['imgX1'];\n // crop box\n $cropW = $_POST['cropW'];\n $cropH = $_POST['cropH'];\n // rotation angle\n $angle = $_POST['rotation'];\n \n $jpeg_quality = 100;\n $randdd=rand();\n $output_filename = public_path(config('constants.profile.BASE_URL')).\"/croppedImg_\".$randdd;\n \n $output_filename1 = config('constants.profile.BASE_URL').\"/croppedImg_\".$randdd;\n \n // uncomment line below to save the cropped image in the same location as the original image.\n //$output_filename = dirname($imgUrl). \"/croppedImg_\".rand();\n \n $what = getimagesize($imgUrl);\n \n switch(strtolower($what['mime']))\n {\n case 'image/png':\n $img_r = imagecreatefrompng($imgUrl);\n $source_image = imagecreatefrompng($imgUrl);\n $type = '.png';\n break;\n case 'image/jpeg':\n $img_r = imagecreatefromjpeg($imgUrl);\n $source_image = imagecreatefromjpeg($imgUrl);\n error_log(\"jpg\");\n $type = '.jpeg';\n break;\n case 'image/gif':\n $img_r = imagecreatefromgif($imgUrl);\n $source_image = imagecreatefromgif($imgUrl);\n $type = '.gif';\n break;\n default: die('image type not supported');\n }\n \n \n //Check write Access to Directory\n \n if(!is_writable(dirname($output_filename))){\n $response = Array(\n \"status\" => 'error',\n \"message\" => 'Can`t write cropped File'\n );\t\n }else{\n \n // resize the original image to size of editor\n $resizedImage = imagecreatetruecolor($imgW, $imgH);\n imagecopyresampled($resizedImage, $source_image, 0, 0, 0, 0, $imgW, $imgH, $imgInitW, $imgInitH);\n // rotate the rezized image\n $rotated_image = imagerotate($resizedImage, -$angle, 0);\n // find new width & height of rotated image\n $rotated_width = imagesx($rotated_image);\n $rotated_height = imagesy($rotated_image);\n // diff between rotated & original sizes\n $dx = $rotated_width - $imgW;\n $dy = $rotated_height - $imgH;\n // crop rotated image to fit into original rezized rectangle\n $cropped_rotated_image = imagecreatetruecolor($imgW, $imgH);\n imagecolortransparent($cropped_rotated_image, imagecolorallocate($cropped_rotated_image, 0, 0, 0));\n imagecopyresampled($cropped_rotated_image, $rotated_image, 0, 0, $dx / 2, $dy / 2, $imgW, $imgH, $imgW, $imgH);\n // crop image into selected area\n $final_image = imagecreatetruecolor($cropW, $cropH);\n imagecolortransparent($final_image, imagecolorallocate($final_image, 0, 0, 0));\n imagecopyresampled($final_image, $cropped_rotated_image, 0, 0, $imgX1, $imgY1, $cropW, $cropH, $cropW, $cropH);\n // finally output png image\n //imagepng($final_image, $output_filename.$type, $png_quality);\n imagejpeg($final_image, $output_filename.$type, $jpeg_quality);\n $response = Array(\n \"status\" => 'success',\n \"url\" => $output_filename1.$type\n );\n }\n // echo $output_filename.$type;\n try{\n $user=\\Auth::user();\n $user->user_image=$output_filename1.$type;\n $user->save();\n print json_encode($response);\n }catch(\\Exception $e){\n print json_encode( Array(\n \"status\" => 'error',\n \"error\" =>$e->getMessage()\n ));\n }\n \n }", "public function ImgCropToFile(){\r\n $imgUrl = $_POST['imgUrl'];\r\n// original sizes\r\n $imgInitW = $_POST['imgInitW'];\r\n $imgInitH = $_POST['imgInitH'];\r\n// resized sizes\r\n $imgW = $_POST['imgW'];\r\n $imgH = $_POST['imgH'];\r\n// offsets\r\n $imgY1 = $_POST['imgY1'];\r\n $imgX1 = $_POST['imgX1'];\r\n// crop box\r\n $cropW = $_POST['cropW'];\r\n $cropH = $_POST['cropH'];\r\n// rotation angle\r\n $angle = $_POST['rotation'];\r\n\r\n $jpeg_quality = 100;\r\n\r\n $what = new \\Think\\Image();\r\n $name = './'.$this::getPath($imgUrl).$this::getFileName($imgUrl);\r\n $c_name = './'.$this::getPath($imgUrl).'c_'.$this::getFileName($imgUrl);\r\n $p_name = './'.$this::getPath($imgUrl).'p_'.$this::getFileName($imgUrl);\r\n $what ->open($name);\r\n $what ->thumb($imgW, $imgH)->save($c_name);\r\n $what ->open($c_name);\r\n $what ->crop(($cropW),($cropH),$imgX1,$imgY1)->save($p_name);\r\n unlink($c_name);\r\n unlink($name);\r\n\r\n $m = M('img_mapping');\r\n $data = array();\r\n $data['user'] = $_SESSION['current_user']['id'];\r\n $data['img'] = './'.$this::getPath($p_name).$this::getFileName($p_name);\r\n $m->data($data)->add();\r\n\r\n $response = Array(\r\n \"status\" => 'success',\r\n \"url\" => __ROOT__.'/'.$this::getPath($p_name).$this::getFileName($p_name)\r\n );\r\n print json_encode($response);\r\n }", "private function savePhoto()\n {\n $image = Image::make($this->filePath);\n\n File::exists($this->sanghaPhotosPath()) or File::makeDirectory($this->sanghaPhotosPath());\n\n $image->resize(400, null, function ($constraint) {\n $constraint->aspectRatio();\n $constraint->upsize();\n })\n ->save($this->sanghaPhotosPath() . $this->fileName)\n ->resize(200, null, function ($constraint) {\n $constraint->aspectRatio();\n })\n ->save($this->sanghaPhotosPath() . 'tn_' . $this->fileName);\n\n }", "public function saveAsset()\n {\n if(!empty($this->uploadedFile))\n {\n // If file is exist -> remove him\n if(file_exists($this->getFilePath()))\n {\n unlink($this->getFilePath());\n }\n $this->genFilename();\n $imagine = Image::getImagine()->open($this->uploadedFile->tempName);\n }\n else\n {\n if(file_exists($this->getFilePath())) {\n $imagine = Image::getImagine()->open($this->getFilePath());\n } else return false;\n }\n\n $size = $imagine->getSize();\n $box = $this->getImageBox($size);\n\n if (($size->getWidth() <= $box->getWidth() && $size->getHeight() <= $box->getHeight()) || (!$box->getWidth() && !$box->getHeight())) {\n $widthDiff = abs($size->getWidth() - $box->getWidth()) / $size->getWidth();\n $heightDiff = abs($size->getHeight() - $box->getHeight()) / $size->getHeight();\n if($widthDiff > $heightDiff) {\n $resizeBox = new Box($box->getWidth(), $size->getHeight() * $box->getWidth()/$size->getWidth());\n } else {\n $resizeBox = new Box($size->getWidth() * $box->getHeight()/$size->getHeight(), $box->getHeight());\n }\n $imagine->resize($resizeBox);\n\n // var_dump($width);\n // var_dump($height);\n // die;\n // // $imagine->crop($point, $box);\n // $imagine->save($this->getFilePath());\n // return $this->save(false);\n }\n\n $imagine = $imagine->thumbnail($box, ManipulatorInterface::THUMBNAIL_OUTBOUND);\n $imagine->save($this->getFilePath());\n\n // create empty image to preserve aspect ratio of thumbnail\n // $thumb = Image::getImagine()->create($box, new Color('FFF', 100));\n\n // // calculate points\n // $startX = 0;\n // $startY = 0;\n // if ($size->getWidth() < $box->getWidth()) {\n // $startX = ceil($box->getWidth() - $size->getWidth()) / 2;\n // }\n // if ($size->getHeight() < $box->getHeight()) {\n // $startY = ceil($box->getHeight() - $size->getHeight()) / 2;\n // }\n\n // $thumb->paste($img, new Point($startX, $startY));\n // $thumb->save($this->getFilePath());\n\n return $this->save(false);\n }", "public function saveImage(Request $request){\n $x = explode('/', __DIR__);\n $path = [];\n for($i = 0; $i < count($x); $i++){\n if($x[$i] != 'app')\n array_push($path, $x[$i]);\n else\n break;\n }\n array_push($path, 'public', 'images', 'temp'. $request->ip(). '.jpg');\n $path = implode('/', $path);\n if(!file_exists($path)){\n fopen($path, 'w');\n }\n copy($request->image, $path);\n return response()->json(['code' => 200, 'message' => 'success', 'response' => $path])->header('Cache-control', 'no-cache');\n\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}", "public function store(Request $request)\n {\n $type = $request->input('type');\n $data = json_decode(stripslashes($request->input('image_data')));//裁剪数据\n $file = $request->file('image');\n $imageType = ['image/jpeg', 'image/gif', 'image/png'];\n if ($file->isValid() && in_array($file->getClientMimeType(), $imageType)) {\n switch ($type) {\n case 'avatar':\n $fileName = FileHelper::bringFileName($file->getClientOriginalExtension());\n $path = $file->storeAs('avatars', $fileName);\n if($path && $data){\n $newPath = base_path('public/storage/') . $path;\n ImageHelper::cropImage($newPath, $newPath, $data, $file->getMimeType(),200, 200);\n return response()->json(['state' => 'success', 'message' => '头像上传成功', 'result' => '/storage/' . $path]);\n }\n return response()->json(['state' => 'error', 'message' => '保存图片失败!']);\n case 'cover':\n $fileName = FileHelper::bringFileName($file->getClientOriginalExtension());\n $path = $file->storeAs('covers', $fileName);\n if($path && $data){\n $newPath = base_path('public/storage/') . $path;\n ImageHelper::cropImage($newPath, $newPath, $data, $file->getMimeType(),260,160);\n return response()->json(['state' => 'success', 'message' => '封面上传成功', 'result' => '/storage/' . $path]);\n }\n return response()->json(['state' => 'error', 'message' => '保存图片失败!']);\n default:\n return response()->json(['state' => 'error', 'message' => '上传图片分类错误!']);\n }\n }\n return response()->json(['state' => 'error', 'message' => '请上传有效的图片文件(JPG,JPEG,GIF,PNG格式)!']);\n }", "function store_avatar($image, $path)\n{\n // Get directory\n $path = check_directory($path);\n\n // Store avatar\n $image_path = Str::random(8) . '-' . $image->getClientOriginalName();\n\n // Create intervention image\n $img = Image::make($image->getRealPath());\n\n // Generate thumbnail\n $img->fit('150', '150')->stream();\n\n // Store thumbnail to disk\n Storage::put($path . '/' . $image_path, $img);\n\n // Return path to image\n return $path . '/' . $image_path;\n}", "function imgcrop(){\n\t\t$id = $this->session->userdata(SESSION_CONST_PRE.'userId');\n\t\t$dir_path = './assets/uploads/students/';\n\t\n\t\t$file_path = $dir_path . \"/Profile.small.jpg\";\n\t\t$src = $dir_path .'Profile.jpg';\n\t\tif(file_exists($file_path)){\n\t\t\t$src = $dir_path .'Profile.small.jpg';\n\t\t}\n\t\n\t\t$imgW = $_POST['w'];\n\t\t$imgH = $_POST['h'];\n\t\t$imgY1 = $_POST['y'];\n\t\t$imgX1 = $_POST['x'];\n\t\t$cropW = $_POST['w'];\n\t\t$cropH = $_POST['h'];\n\t\n\t\t$jpeg_quality = 100;\n\t\n\t\t//$img_r = imagecreatefromjpeg($src);\n\t\t$what = getimagesize($src);\n\t\t//list($imgInitW, $imgInitH, $type, $what) = getimagesize($src);\n\t\t$imgW = $imgInitW = $what[0];\n\t\t$imgH = $imgInitH = $what[1];\n\t\tswitch(strtolower($what['mime']))\n\t\t{\n\t\t\tcase 'image/png':\n\t\t\t\t$img_r = imagecreatefrompng($src);\n\t\t\t\t$source_image = imagecreatefrompng($src);\n\t\t\t\t$type = '.png';\n\t\t\t\tbreak;\n\t\t\tcase 'image/jpeg':\n\t\t\t\t$img_r = imagecreatefromjpeg($src);\n\t\t\t\t$source_image = imagecreatefromjpeg($src);\n\t\t\t\t$type = '.jpeg';\n\t\t\t\tbreak;\n\t\t\tcase 'image/jpg':\n\t\t\t\t$img_r = imagecreatefromjpeg($src);\n\t\t\t\t$source_image = imagecreatefromjpeg($src);\n\t\t\t\t$type = '.jpg';\n\t\t\t\tbreak;\n\t\t\tcase 'image/gif':\n\t\t\t\t$img_r = imagecreatefromgif($src);\n\t\t\t\t$source_image = imagecreatefromgif($src);\n\t\t\t\t$type = '.gif';\n\t\t\t\tbreak;\n\t\t\tdefault: die('image type not supported');\n\t\t}\n\t\n\t\t$resizedImage = imagecreatetruecolor($imgW, $imgH);\n\t\timagecopyresampled($resizedImage, $source_image, 0, 0, 0, 0, $imgW,\n\t\t$imgH, $imgInitW, $imgInitH);\n\t\n\t\n\t\t$dest_image = imagecreatetruecolor($cropW, $cropH);\n\t\timagecopyresampled($dest_image, $source_image, 0, 0, $imgX1, $imgY1, $cropW,\n\t\t$cropH, $cropW, $cropH);\n\t\n\t\n\t\timagejpeg($dest_image, $dir_path.'Profile.small.jpg', $jpeg_quality);\n\t\n\t}", "public function store()\n {\n if(!Csrf::checkToken($this->_request->getInput('_CSRF')))\n {\n $response = [\n 'status' => 'error',\n 'message' => 'csrf'\n ];\n return $this->_response->returnJson($response);\n }\n if($this->crop())\n {\n try {\n $this->_propertyImage->pid = $this->_pid;\n $this->_propertyImage->image_full_path = $this->_imageOut;\n $this->_propertyImage->save();\n }catch(Exception $e) {\n $response = [\n 'status' => 'error',\n 'message' => GENERIC_UPLOAD_ERROR_MESSAGE\n ];\n return $this->_response->returnJson($response);\n }\n $response = [\n 'status' => 'success',\n 'url' => $this->_imageOut\n ];\n return $this->_response->returnJson($response);\n }\n $response = [\n 'status' => 'error',\n 'message' => GENERIC_UPLOAD_ERROR_MESSAGE\n ];\n return $this->_response->returnJson($response);\n }", "public function postListUpload(Request $request) {\n $input = $request->file('listImg');\n\n\n // PASS THE INPUT AND RULES INTO THE VALIDATOR\n $this->validate($request, [\n 'listImg' => 'image|max:3000',\n ]);\n\n\n // SET UPLOAD PATH\n $destinationPath = 'uploads';\n // GET THE FILE EXTENSION\n // $extension = $input->getClientOriginalExtension();\n // RENAME THE UPLOAD WITH RANDOM NUMBER\n $fileName = 'list_original_' . \\Auth::id().'_'.$request->id.'.png';\n // MOVE THE UPLOADED FILES TO THE DESTINATION DIRECTORY\n $upload_success = $input->move($destinationPath, $fileName);\n\n $resizeImage= Image::make($destinationPath.'/'.$fileName);\n $height = $resizeImage->height();\n $width = $resizeImage->width();\n\n if ($height < $width) {\n $Coordinate = ($width - $height) / 2;\n $cropLargeImage = $resizeImage->crop($height,$height, $Coordinate, 0)->resize(250, 250)->save($destinationPath.'/'.'list_250x250_'. \\Auth::id().'_'.$request->id.'.png', 70);\n $cropMediumImage = $cropLargeImage->resize(150, 150)->save($destinationPath.'/'.'list_150x150_'. \\Auth::id().'_'.$request->id.'.png', 70);\n $cropSmallImage = $cropLargeImage->resize(125, 125)->save($destinationPath.'/'.'list_125x125_'. \\Auth::id().'_'.$request->id.'.png', 60);\n\n } elseif ($height > $width) {\n $Coordinate = ($height - $width) / 2;\n $cropLargeImage = $resizeImage->crop($width,$width,0, $Coordinate)->resize(250, 250)->save($destinationPath.'/'.'list_250x250_'. \\Auth::id().'_'.$request->id.'.png', 70);\n $cropMediumImage = $cropLargeImage->resize(150, 150)->save($destinationPath.'/'.'list_150x150_'. \\Auth::id().'_'.$request->id.'.png', 70);\n $cropSmallImage = $cropLargeImage->resize(125, 125)->save($destinationPath.'/'.'list_125x125_'. \\Auth::id().'_'.$request->id.'.png', 60);\n } else {\n $cropLargeImage = $resizeImage->resize(250, 250)->save($destinationPath.'/'.'list_250x250_'. \\Auth::id().'_'.$request->id.'.png', 70);\n $cropMediumImage = $resizeImage->resize(150, 150)->save($destinationPath.'/'.'list_150x150_'. \\Auth::id().'_'.$request->id.'.png', 70);\n $cropSmallImage = $resizeImage->resize(125, 125)->save($destinationPath.'/'.'list_125x125_'. \\Auth::id().'_'.$request->id.'.png', 60);\n }\n\n // IF UPLOAD IS SUCCESSFUL SEND SUCCESS MESSAGE OTHERWISE SEND ERROR MESSAGE\n\n if ($upload_success) {\n $list = \\App\\Lists::find($request->id);\n $list->listImg = $fileName;\n dump($list);\n // $list->save();\n return \"hi\";\n // return Redirect('/upload/{{$request->id}}');\n }\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'img' => 'required',\n ]);\n $file = $request->file('img');\n // $file = $request->file('img')->store('public/files');\n $img = Image::make($file)->fit(1096,1096);\n \n // paste another image \n $frame = Frame::latest()->value('frame');\n\n $theFrame = Storage::get($frame);\n \n $img->insert($theFrame);\n return $img->response('jpg');\n \n \n }", "public function store(Request $request)\n {\n $request->validate([\n 'imagenes' => 'required|image|mimes:jpeg,jpg,png,gif,svg|max:15048',\n ]);\n\n $urlimagen = '';\n\n if ($request->hasFile('imagenes')) {\n // Deleting Previous Image\n $image_prev = Image::where('imageable_id', Auth::user()->id)->where('imageable_type', 'App\\User')->first();\n/*\n if ($image_prev) {\n $archivo = substr($image_prev->url, 1);\n File::delete($archivo);\n }*/\n\n $imagen = $request->file('imagenes');\n\n if(pathinfo($imagen->getClientOriginalName(), PATHINFO_EXTENSION) == 'jfif') {\n $solo_nombre = pathinfo($imagen->getClientOriginalName(), PATHINFO_FILENAME);\n $nombre = time() . '_' . $solo_nombre . '.jpg';\n\n $ruta = public_path() . DS . 'imagenes';\n\n $path = $ruta . DS . $nombre;\n Imagen::make($imagen)->save($path,10);\n\n $urlimagen = DS . 'imagenes' . DS . $nombre;\n } else {\n $nombre = time() . '_' . $imagen->getClientOriginalName();\n\n $ruta = public_path() . DS . 'imagenes';\n \n $path = $ruta . DS . $nombre;\n try {\n Imagen::make($imagen)->save($path,10);\n } catch (Throwable $e) {\n return $e;\n }\n\n $urlimagen = DS . 'imagenes' . DS . $nombre;\n }\n\n // Creating or Updating Image in BD\n if ($image_prev) {\n $image_prev->url = $urlimagen;\n $image_prev->save();\n } else {\n $user = User::where('id', Auth::user()->id)->firstOrFail();\n $user->image()->create([\n 'url' => $urlimagen,\n ]);\n }\n }\n\n return redirect()->route('profile.auth')->with('datos', __('Profile Picture Updated Successfully'));\n }", "public function chngPics(Request $request) {\n $rules = array(\n 'image_src' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n );\n $validator = Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n return Redirect::back()\n ->withErrors($validator)\n ->withInput();\n }\n $usr_id = Auth::user()->id;\n $image = $request->file('image_src');\n if ($image) {\n\n $DIR = 'public/userimages/user_' . $usr_id;\n $SMALL = $DIR . '/' . 'small/';\n $MEDIUM = $DIR . '/' . 'medium/';\n $ORG = $DIR . '/' . 'original/';\n //$helper = new App\\http\\Controllers\\HelperController();\n\n if (!file_exists($DIR)) {\n\n mkdir($DIR, 0755, true);\n\n if (!file_exists($SMALL))\n mkdir($SMALL, 0755, true);\n\n if (!file_exists($MEDIUM))\n mkdir($MEDIUM, 0755, true);\n\n if (!file_exists($ORG))\n mkdir($ORG, 0755, true);\n }\n else {\n if (file_exists($DIR)) {\n\n //mkdir($DIR);\n\n if (!file_exists($SMALL))\n mkdir($SMALL, 0755, true);\n\n if (!file_exists($MEDIUM))\n mkdir($MEDIUM, 0755, true);\n\n if (!file_exists($ORG))\n mkdir($ORG, 0755, true);\n }\n }\n\n\n\n /* new code added for remove replacement of iphone posts from other posts date:3/10/2016 */\n \n $filename = time() . rand(1000, 9999) . '.' . $image->getClientOriginalExtension();\n // $ORG = str_replace(\"public/\",\"\",$ORG);\n\n // $location = public_path($ORG);\n $location = $ORG;\n \n $image->move($location, $filename);\n \n $imageController = new ImageController($usr_id);\n $thumbMedium = $imageController->resizeImage(140, 140, $filename, $ORG.$filename, $MEDIUM.\"/\".$filename); \n $thumbSmall = $imageController->resizeImage(35,30, $filename, $ORG.$filename, $SMALL.\"/\".$filename); \n \n //copy($MEDIUM . $filename, $SMALL . $filename);\n //copy($MEDIUM . $filename, $ORG . $filename);\n \n if($thumbMedium && $thumbSmall) {\n $update =userProfile::where('uid', '=', $usr_id)->update(['img' => $filename]); \n \n session(['profilepic' =>$filename]);\n \n return Response::json(array('success' => true, 'img' => URL($MEDIUM . $filename)), 200);\n }else{\n return Response::json(array('success' => false, 'message'=>'Error to upload image'), 200);\n }\n }\n }", "public function crop()\n {\n }", "public function savecoverimage() {\n\n $upload_data = array(\n 'upload_path' => \"./files/shops\",\n 'allowed_types' => \"gif|jpg|png|jpeg\",\n 'max_size' => 5120,\n 'quality' => 80,\n 'overwrite' => FALSE,\n 'width' => 1200,\n 'height' => 375\n );\n\n\n $file_name = \"\";\n $this->load->library('upload', $upload_data);\n if ($this->upload->do_upload('userfile')) {\n\n $uploaded_file = $this->upload->data();\n $file_name = $uploaded_file['file_name'];\n\n $image_config[\"image_library\"] = \"gd2\";\n $image_config[\"source_image\"] = $uploaded_file['full_path'];\n $image_config['maintain_ratio'] = TRUE;\n $image_config['new_image'] = './files/shops';\n $image_config['quality'] = 80;\n $image_config['width'] = 1200;\n $image_config['height'] = 375;\n $dim = (intval($upload_data[\"width\"]) / intval($upload_data[\"height\"])) - ($image_config['width'] / $image_config['height']);\n $image_config['master_dim'] = ($dim > 0) ? \"height\" : \"width\";\n\n $this->image_lib->initialize($image_config);\n\n $this->image_lib->resize();\n\n\n $image_config['image_library'] = 'gd2';\n $image_config['source_image'] = $uploaded_file['full_path'];\n $image_config['new_image'] = './files/shops';\n $image_config['quality'] = 80;\n $image_config['overwrite'] = TRUE;\n $image_config['maintain_ratio'] = FALSE;\n $image_config['width'] = 1200;\n $image_config['height'] = 375;\n $image_config['x_axis'] = '0';\n $image_config['y_axis'] = '0';\n\n $this->image_lib->clear();\n $this->image_lib->initialize($image_config);\n\n $this->image_lib->crop();\n\n $userId = $this->session->userdata('user_id');\n $result = $this->Users->savecoverimage($file_name, $userId);\n\n\n if ($result) {\n $this->output\n ->set_content_type('application/json')\n ->set_output(json_encode(array('result' => 1)));\n } else {\n $this->output\n ->set_content_type('application/json')\n ->set_output(json_encode(array('result' => 0)));\n }\n }\n }", "public function storeimage(Request $request)\n {\n $this->authorize('isAdmin');\n if($request->file('file'))\n {\n $image = $request->file('file');\n $name = \"ortm_\".time().'.'.$image->getClientOriginalExtension();\n\n $thumbnailImage = Images::make($image)->resize(200, 200)->save(public_path('/img/ourteam/thumbs/' . $name));\n\n $watermark = Images::make(public_path('/img/watermark.png'));\n $Image = Images::make($image)->insert($watermark, 'bottom-right', 10, 10)->save(public_path('/img/ourteam/' . $name));\n\n //$image->move(public_path().'/img/social/', $name);\n }\n\n $image= new Image();\n $image->image_name = $name;\n $image->save();\n\n return response()->json([\n 'data' => $name\n ], 200);\n }", "public function actionSaveCroppedImage() {\n\n if ($_REQUEST['output_filename'] == '') {\n $output_filename = \"media/croppic/croppedimg/croppedImg_\" . time();\n } else {\n $output_filename = $_REQUEST['output_filename'] . time();\n }\n $output_filename2 = Yii::app()->request->baseUrl . '/' . $output_filename;\n\n $imgUrl = Yii::app()->basePath.'/..'.str_replace(Yii::app()->request->baseUrl,'',$_POST['imgUrl']);\n $imgInitW = $_POST['imgInitW'];\n $imgInitH = $_POST['imgInitH'];\n $imgW = $_POST['imgW'];\n $imgH = $_POST['imgH'];\n $imgY1 = $_POST['imgY1'];\n $imgX1 = $_POST['imgX1'];\n $cropW = $_POST['cropW'];\n $cropH = $_POST['cropH'];\n\n $jpeg_quality = 100;\n\n $what = getimagesize($imgUrl);\n \n switch (strtolower($what['mime'])) {\n case 'image/png':\n $img_r = imagecreatefrompng($imgUrl);\n $source_image = imagecreatefrompng($imgUrl);\n $type = '.png';\n break;\n case 'image/jpeg':\n $img_r = imagecreatefromjpeg($imgUrl);\n $source_image = imagecreatefromjpeg($imgUrl);\n $type = '.jpeg';\n break;\n case 'image/gif':\n $img_r = imagecreatefromgif($imgUrl);\n $source_image = imagecreatefromgif($imgUrl);\n $type = '.gif';\n break;\n default: die('image type not supported');\n }\n\n $resizedImage = imagecreatetruecolor($imgW, $imgH);\n imagecopyresampled($resizedImage, $source_image, 0, 0, 0, 0, $imgW, $imgH, $imgInitW, $imgInitH);\n\n\n $dest_image = imagecreatetruecolor($cropW, $cropH);\n imagecopyresampled($dest_image, $resizedImage, 0, 0, $imgX1, $imgY1, $cropW, $cropH, $cropW, $cropH);\n\n\n imagejpeg($dest_image, $output_filename . $type, $jpeg_quality);\n\n $response = array(\n \"status\" => 'success',\n \"url\" => $output_filename2 . $type\n );\n print json_encode($response);\n }", "public function storeImg($image) {\n if(Auth::user()->image_url != '/images/user/default.png'){\n\n $getOldPath1 = explode('/', Auth::user()->image_url);\n $getOldPath2 = 'app/public/assets/ProfilPicture/' . $getOldPath1[4];\n $delete = unlink(storage_path($getOldPath2));\n\n }\n //store new profil pict\n $path = $image->store('/public/assets/ProfilPicture');\n $path2 = explode('/', $path);\n $this->data['image_url'] = '/storage/'.$path2[1].'/'.$path2[2].'/'.$path2[3];\n \n }", "public function store(Request $request)\n {\n $photos = $request->file('file');\n\n if (!is_array($photos)) {\n $photos = [$photos];\n }\n\n if (!is_dir($this->photos_path)) {\n mkdir($this->photos_path, 0777);\n }\n\n for ($i = 0; $i < count($photos); $i++) {\n $photo = $photos[$i];\n $name = sha1(date('YmdHis') . Str::random(30));\n $save_name = $name . '.' . $photo->getClientOriginalExtension();\n $resize_name = $name . Str::random(2) . '.' . $photo->getClientOriginalExtension();\n\n $resized_image = InterventionImage::make($photo)\n ->encode('jpg', 75)\n ->resize(1000, 750)\n ->crop(1000, 750);\n // ->save($this->photos_path . '/' . $resize_name);\n\n Storage::disk('s3')->put($resize_name,file_get_contents($photo), 'public');\n //$photo->move($this->photos_path, $save_name);\n\n $upload = new Image();\n $upload->file = $save_name;\n $upload->resizedfilename = $resize_name;\n $upload->originalfilename = basename($photo->getClientOriginalName());\n $upload->property_id = $request->input('propertyadd_id');\n $upload->save();\n }\n\n return Response()->json([\n 'message' => 'Image Enrégistrer avec sucès'\n ], 200);\n\n }", "public function crop()\n {\n $this->_pid = $this->_request->getInput('pid');\n $imgUrl = $this->_request->getInput('imgUrl');\n $imgInfo = new SplFileInfo($imgUrl);\n $cropParams = $this->_request->getAllPostInput();\n $cropParams['img_final_dir'] = '/images/properties/';\n $cropParams['image_out'] = $this->_pid . '-' . uniqid() . '.' . $imgInfo->getExtension();\n\n $this->_imageOut = $cropParams['img_final_dir'] . $cropParams['image_out'];\n\n if($this->_cropper->crop($cropParams))\n {\n return true;\n }\n return false;\n }", "public function storeProjectMainImage($project){\n if(request()->has('image')){\n $project->update(['image'=>request()->image->store('uploads', 'public')]);\n $image = Image::make(public_path('storage/'. $project->image))->fit(700,700);\n $image->save();\n }\n }", "public function imageCrop()\n {\n return view('ImageCrop');\n }", "function image_crop(){\n\n\t\t\t$imgUrl = $_POST['imgUrl'];\n\t\t\t/*explored image URL and get image name*/\n\t\t\t$expImgUrl=explode(\"/\", $imgUrl);\n\t\t\t$LengthOfArray = sizeof($expImgUrl);\n\t\t\t$imageName = $LengthOfArray-1;\n\t\t\t$imgName = $expImgUrl[$imageName];\n\t\t\t$imgInitW = $_POST['imgInitW'];\n\t\t\t$imgInitH = $_POST['imgInitH'];\n\t\t\t$imgW = $_POST['imgW'];\n\t\t\t$imgH = $_POST['imgH'];\n\t\t\t$imgY1 = $_POST['imgY1'];\n\t\t\t$imgX1 = $_POST['imgX1'];\n\t\t\t$cropW = $_POST['cropW'];\n\t\t\t$cropH = $_POST['cropH'];\n\n\t\t\t$jpeg_quality = 100;\n\t\t\t$rand = rand();\n\t\t\t$output_filename = \"../webroot/img/uploads/croppedImg_\".$rand;\n\t\t\t$oname = \"img/uploads/croppedImg_\".$rand;\n\t\t\t$Pname = \"img/uploads/\";\n\t\t\t$path = BASE_PATH;\n\n\t\t\t$what = getimagesize($Pname.\"/\".$imgName);\n\t\t\t\n\t\t\tswitch(strtolower($what['mime']))\n\t\t\t{\n\t\t\t\tcase 'image/png':\n\t\t\t\t\t$img_r = imagecreatefrompng($Pname.\"/\".$imgName);\n\t\t\t\t\t$source_image = imagecreatefrompng($Pname.\"/\".$imgName);\n\t\t\t\t\t$type = '.png';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'image/jpeg':\n\t\t\t\t\t$img_r = imagecreatefromjpeg($Pname.\"/\".$imgName);\n\t\t\t\t\t$source_image = imagecreatefromjpeg($Pname.\"/\".$imgName);\n\t\t\t\t\t$type = '.jpeg';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'image/gif':\n\t\t\t\t\t$img_r = imagecreatefromgif($Pname.\"/\".$imgName);\n\t\t\t\t\t$source_image = imagecreatefromgif($Pname.\"/\".$imgName);\n\t\t\t\t\t$type = '.gif';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: die('image type not supported');\n\t\t\t}\n\t\t\t\t\n\t\t\t$resizedImage = imagecreatetruecolor($imgW, $imgH);\n\t\t\timagecopyresampled($resizedImage, $source_image, 0, 0, 0, 0, $imgW, \n\t\t\t\t\t\t$imgH, $imgInitW, $imgInitH);\t\n\t\t\t\n\t\t\t\n\t\t\t$dest_image = imagecreatetruecolor($cropW, $cropH);\n\t\t\timagecopyresampled($dest_image, $resizedImage, 0, 0, $imgX1, $imgY1, $cropW, \n\t\t\t\t\t\t$cropH, $cropW, $cropH);\t\n\n\n\t\t\timagejpeg($dest_image, $output_filename.$type, $jpeg_quality);\n\t\t\t\n\t\t\t$response = array(\n\t\t\t\t\t\"status\" => 'success',\n\t\t\t\t\t\"url\" => $oname.$type, \n\t\t\t\t\t\"base\" => $path \n\t\t\t\t );\n\t\t\t print json_encode($response);\n\t\t\t exit;\n\t}", "public function save(array $options = []) {\n/* if (preg_match('/image/', $this->mime_type)) {\n $this->isImage = true;\n $manager = new ImageManager(array('driver' => 'gd'));\n $image = Storage::disk('public')->get($this->myFile);\n $imageOrig = $manager->make($image); \n //Get width and height of the image\n $this->img_width = $imageOrig->width();\n $this->img_height = $imageOrig->height();\n }*/\n parent::save($options);\n $this->createThumbs();\n }", "public function store(CreateImageRequest $request)\n {\n // uploaded vinyl cover or URL\n if($request->hasFile('imageFile')){\n $path = public_path() . '/uploads';\n $file = $request->file('imageFile');\n $fileName = time(). '_' .$file->getClientOriginalName();\n $file->move($path,$fileName);\n $image = $fileName;\n }\n $image = Image::create([\n 'project_id' => $request->input('project_id'),\n 'position' => 1,\n 'filename' => $image\n ]);\n if($image){\n $filename = substr($image->filename, 0, -4);\n // Resize image\n $img640 = Resizer::make('uploads/'.$image->filename)->widen(640);\n $img1280 = Resizer::make('uploads/'.$image->filename)->widen(1280);\n $img1920 = Resizer::make('uploads/'.$image->filename)->widen(1920);\n $img2560 = Resizer::make('uploads/'.$image->filename)->widen(2560);\n // Save images\n $img640->save('uploads/'.$filename.'_640.png');\n $img1280->save('uploads/'.$filename.'_1280.png');\n $img1920->save('uploads/'.$filename.'_1920.png');\n $img2560->save('uploads/'.$filename.'_2560.png');\n flash()->success('Image uploaded successfully!');\n }\n else{\n flash()->error('Oops! Something went wrong.');\n }\n return redirect(route('backend'));\n }", "public function uploadProfilePicture(Request $request)\n {\n\n $uploadedImage = $request['profile_img'];\n\n\n\n $pictureType = $uploadedImage->getClientOriginalExtension();\n\n\n //$pictureStr = (string) Image::make( $uploadedImage )->resize( 105, 105 )->encode( $pictureType );\n\n\n $pictureStr = (string) Image::make( $uploadedImage )->\n resize( 105, null, function ( $constraint ) {\n $constraint->aspectRatio();\n })->encode( $pictureType );\n\n \n \n\n\n\n //$uuploadedImage = Image::make($uploadedImage)->resize(105, 105);\n\n //Image::make($uploadedImage)->resize(105,105)->save('foo' . $uploadedImage->getClientOriginalExtension());\n\n //$uploadedImage = Image::make($uploadedImage)->resize(105,105);\n\n //$pictureFile = file_get_contents($uuploadedImage); \n\n\n //$image = base64_encode(file_get_contents($uuploadedImage->pat‌​h()));\n \n \n $pictureBlob = base64_encode($pictureStr);\n\n\n DB::table('users')\n ->where('users.id', '=', $request->get('id'))\n ->update(['users.profile_picture' => $request->get('id'), 'users.profile_picture' => $pictureBlob, \n 'users.profile_picture_type' => $pictureType\n\n ]);\n \n \n\n \n \n\n return Redirect::back();\n\n\n }", "public function cropAvatarAction()\n {\n // TODO: swap web dir to product path\n //$imgRealPath = '/Users/leonqiu/www/choumei.me/Symfony/web/' . $_POST['imageSource'];\n $imgRealPath = dirname(__FILE__) . '/../../../../web/' . $_POST['imageSource'];\n list($width, $height) = getimagesize($imgRealPath);\n \n $viewPortW = $_POST[\"viewPortW\"];\n\t $viewPortH = $_POST[\"viewPortH\"];\n $pWidth = $_POST[\"imageW\"];\n $pHeight = $_POST[\"imageH\"];\n $tmp = explode(\".\",$_POST[\"imageSource\"]);\n $ext = end(&$tmp);\n $function = $this->returnCorrectFunction($ext);\n //$image = $function($_POST[\"imageSource\"]);\n $image = $function($imgRealPath);\n $width = imagesx($image);\n $height = imagesy($image);\n \n // Resample\n $image_p = imagecreatetruecolor($pWidth, $pHeight);\n $this->setTransparency($image,$image_p,$ext);\n\t\timagecopyresampled($image_p, $image, 0, 0, 0, 0, $pWidth, $pHeight, $width, $height);\n\t\timagedestroy($image);\n\t\t$widthR = imagesx($image_p);\n\t\t$hegihtR = imagesy($image_p);\n\t\t\n\t\t$selectorX = $_POST[\"selectorX\"];\n\t\t$selectorY = $_POST[\"selectorY\"];\n\t\t\n\t\tif($_POST[\"imageRotate\"]){\n\t\t $angle = 360 - $_POST[\"imageRotate\"];\n\t\t $image_p = imagerotate($image_p,$angle,0);\n\t\t \n\t\t $pWidth = imagesx($image_p);\n\t\t $pHeight = imagesy($image_p);\n\t\t \n\t\t //print $pWidth.\"---\".$pHeight;\n\t\t\n\t\t $diffW = abs($pWidth - $widthR) / 2;\n\t\t $diffH = abs($pHeight - $hegihtR) / 2;\n\t\t \n\t\t $_POST[\"imageX\"] = ($pWidth > $widthR ? $_POST[\"imageX\"] - $diffW : $_POST[\"imageX\"] + $diffW);\n\t\t $_POST[\"imageY\"] = ($pHeight > $hegihtR ? $_POST[\"imageY\"] - $diffH : $_POST[\"imageY\"] + $diffH);\n\t\t\n\t\t \n\t\t}\n\t\t\n\t\t$dst_x = $src_x = $dst_y = $dst_x = 0;\n\t\t\n\t\tif($_POST[\"imageX\"] > 0){\n\t\t $dst_x = abs($_POST[\"imageX\"]);\n\t\t}else{\n\t\t $src_x = abs($_POST[\"imageX\"]);\n\t\t}\n\t\tif($_POST[\"imageY\"] > 0){\n\t\t $dst_y = abs($_POST[\"imageY\"]);\n\t\t}else{\n\t\t $src_y = abs($_POST[\"imageY\"]);\n\t\t}\n\t\t\n\t\t\n\t\t$viewport = imagecreatetruecolor($_POST[\"viewPortW\"],$_POST[\"viewPortH\"]);\n\t\t$this->setTransparency($image_p,$viewport,$ext);\n\t\t\n\t\timagecopy($viewport, $image_p, $dst_x, $dst_y, $src_x, $src_y, $pWidth, $pHeight);\n\t\timagedestroy($image_p);\n\t\t\n\t\t\n\t\t$selector = imagecreatetruecolor($_POST[\"selectorW\"],$_POST[\"selectorH\"]);\n\t\t$this->setTransparency($viewport,$selector,$ext);\n\t\timagecopy($selector, $viewport, 0, 0, $selectorX, $selectorY,$_POST[\"viewPortW\"],$_POST[\"viewPortH\"]);\n\t\t\n\t\t//$file = \"tmp/test\".time().\".\".$ext;\n\t\t// TODO: generate file name\n\t\t$fileName = uniqid() . \".\" . $ext;\n\t\t$user = $this->get('security.context')->getToken()->getUser();\n\t\t$avatarFile = dirname(__FILE__).'/../../../../web/uploads/avatar/'.$user->getId(). '/' .$fileName;\n\t\t$avatarUrl = '/uploads/avatar/'. $user->getId() . '/' . $fileName;\n\t\t$this->parseImage($ext,$selector,$avatarFile);\n\t\timagedestroy($viewport);\n\t\t//Return value\n\t\t//update avatar\n $em = $this->getDoctrine()->getEntityManager();\n $user->setAvatar($avatarUrl);\n $em->persist($user);\n $em->flush();\n\t\techo $avatarUrl;\n\t\texit;\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 store(Request $request)\n {\n //\n\n $user_id = Auth::id();\n $request->validate([\n\n 'image' => 'required|image|mimes:jpeg,png,jpg,webp|max:2048 '\n ]);\n $directory = public_path('images').'/'.$user_id;\n $imageName = time().'.'.$request->image->extension();\n\n //move the uploaded file to a directory named as user_id\n $saved = $request->image->move($directory, $imageName);\n $imagePath= \"$user_id/$imageName\";\n\n $imageUpload = new imageUpload;\n $imageUpload->name=$imageName;\n $imageUpload->path = \"images/$user_id/$imageName\";\n $imageUpload->user_id= $user_id;\n $imageUpload->save();\n\n return redirect()->route('getajaxupdate',['id' => $user_id])\n ->with('success','You have successfully uploaded image.')\n ->with('image',$imageName)\n ->with('id',$user_id);\n\n\n\n }", "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 }", "private function copyToStorage(Image $image) {\n \t$attrs = $image->attributesToArray();\n\t $this->command->info(\"Copying '{$attrs['path']}' to public folder\");\n \t$filePath = dirname(__FILE__).\"/Images/{$attrs['path']}\";\n \tStorage::put(\"public/images/{$attrs['id']}/{$attrs['path']}\", file_get_contents($filePath));\n }", "public function writeimg() {\n\t\t$data = Input::all();\n\t\t$img = $data['imgdata'];\n\t\t$student_id = $data['student_id'];\n\t\t$img = str_replace('data:image/png;base64,', '', $img);\n\t\t$img = str_replace(' ', '+', $img);\n\t\t$imgdat = base64_decode($img);\n\t\t$myPublicFolder = public_path();\n\t\t$savePath = $myPublicFolder.\"/photo\";\n\t\t$path = $savePath.\"/$student_id.png\";\n\t\tFile::delete($path);\n\t\tFile::put($path , $imgdat);\n\t\t$last_add = Student::orderby('id', 'desc')->first();\n\t\tStudent::where('student_id', '=', $student_id)->update(array('pic' => \"$student_id.png\"));\n\t\treturn View::make('finish', array('imgid' => Student::where('student_id', '=', $student_id)->firstOrFail()->group));\n\t}", "public function upload()\n{\n if(null === $this->getFile())\n {\n return;\n }\n\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n $this->filename =$this->getFile()->getClientOriginalName();\n\n $this->setFile(null);\n}", "public function save()\n {\n $this->validate();\n $this->validate(['image' => 'required|image']);\n\n // try to upload image and resize by ImageSaverController config\n try {\n $imageSaver = new ImageSaverController();\n $this->imagePath = $imageSaver->loadImage($this->image->getRealPath())->saveAllSizes();\n }catch (\\RuntimeException $exception){\n dd($exception);\n }\n\n $this->PostSaver();\n\n $this->resetAll();\n $this->ChangeCreatedMode();\n $this->swAlert([\n 'title' => 'Good job',\n 'text' => 'successfully added',\n 'icon' => 'success'\n ]);\n $this->render();\n }", "public function upload()\n {\n if (null === $this->getImg()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getImg()->move(\n self::SERVER_PATH_TO_PRESS_IMAGE_FOLDER,\n $this->getImg()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->imageUrl = $this->getImg()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setImg(null);\n }", "protected function save()\n {\n switch ($this->image_info['mime']) {\n \n case 'image/gif':\n imagegif($this->image, $this->getPath(true));\n break;\n \n case 'image/jpeg':\n imagejpeg($this->image, $this->getPath(true), $this->quality);\n break;\n \n case 'image/jpg':\n imagejpeg($this->image, $this->getPath(true), $this->quality);\n break;\n \n case 'image/png':\n imagepng($this->image, $this->getPath(true), round($this->quality / 10));\n break;\n \n default:\n $_errors[] = $this->image_info['mime'] . ' images are not supported';\n return $this->errorHandler();\n break;\n }\n \n chmod($this->getPath(true), 0777);\n }", "public function save()\n {\n // save the new Promo data table //\n $cropimg_data = $_POST['cropimg'];\n // smth like:- data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABaoAAAH0CAYAAADc0hrzAAAgAElEQVR4Xmy9Sax0a5aetWLv6JvT/P9t8ubNyqYyCyxbLmyMSypsIbCFZBDyDBkDLldhWTBhwgwJiQETJIYuMWcMEkhGmAmdBEJ\n\n $cropimg_remove_array1 = explode(\";\", $cropimg_data);\n // smth like:- base64,iVBORw0KGgoAAAANSUhEUgAABaoAAAH0CAYAAADc0hrzAAAgAElEQVR4Xmy9Sax0a5aetWLv6JvT/P9t8ubNyqYyCyxbLmyMSypsIbCFZBDyDBkDLldhWTBhwgwJiQETJIYuMWcMEkhGmAmdBEJ\n\n $cropimg_remove_array2 = explode(\",\", $cropimg_remove_array1[1]);\n // smth like:- iVBORw0KGgoAAAANSUhEUgAABaoAAAH0CAYAAADc0hrzAAAgAElEQVR4Xmy9Sax0a5aetWLv6JvT/P9t8ubNyqYyCyxbLmyMSypsIbCFZBDyDBkDLldhWTBhwgwJiQETJIYuMWcMEkhGmAmdBEJ\n\n $cropimg = base64_decode($cropimg_remove_array2[1]);\n\n $imageName = 'promo_'.time() . '.png';\n\n $dir_to_save = \"./assets/jollof_banners/fashionhompage_banner/\";\n if (!is_dir($dir_to_save)) {\n mkdir($dir_to_save);\n }\n file_put_contents($dir_to_save.$imageName, $cropimg);\n \n \n \n $input_date=$_POST['promo_date'];\n $date_start=date(\"Y-m-d H:i:s\",strtotime($input_date));\n \n $promo_duration = $this->promo->promodurationinfo($_POST['promo_duration']);\n \n if($promo_duration->durationname == '1 Day'){$date_end= date('Y-m-d H:i:s',strtotime('+1 day',$input_date));}\n else if($promo_duration->durationname == '1 Week') {$date_end= date('Y-m-d H:i:s',strtotime('+1 week',strtotime($input_date)));}\n else if($promo_duration->durationname == '1 Month'){$date_end= date('Y-m-d H:i:s',strtotime('+1 month',strtotime($input_date)));}\n else if($promo_duration->durationname == '3 Month'){$date_end= date('Y-m-d H:i:s',strtotime('+3 week',strtotime($input_date)));}\n else if($promo_duration->durationname == '6 Month'){$date_end= date('Y-m-d H:i:s',strtotime('+6 week',strtotime($input_date)));}\n else if($promo_duration->durationname == '1 Year') {$date_end= date('Y-m-d H:i:s',strtotime('+1 year',strtotime($input_date)));}\n \n $data_New = array( \n 'imageurl' => $_POST['promo_url'],\n 'imagename' => $imageName,\n 'bannertypeid' => $_POST[\"promotype\"],\n 'promodurationid'=> $_POST[\"promo_duration\"],\n 'usertype' => $this->session->Type,\n 'merchantid' => $this->session->merchant_id,\n 'userid' => $this->session->User_id,\n 'username' => $this->session->companyname,\n 'payment' => 'FREE',\n 'startdate' => $date_start,\n 'enddate' => $date_end,\n 'status' => 0\n );\n $insert_data = $this->Generic->add($data_New, $tablename=\"img_ads\");// insert to db\n\n if($insert_data) \n {\n $this->session->set_flashdata('success','success');\n $this->session->set_flashdata('message', 'Promo Saved');\n $Json_resultSave = array (\n 'status' => '1',\n 'content' => $imageName\n );\n echo json_encode($Json_resultSave);\n exit();\n }\n else \n { \n $this->session->set_flashdata('error','error');\n $this->session->set_flashdata('message', 'An error occur when Adding New Promo');\n $Json_resultSave = array (\n 'status' => '0',\n 'content' => 'There was a problem!! Pls Try Again.....'\n );\n echo json_encode($Json_resultSave);\n exit();\n }\n }", "public static function crop(){\n\n}", "public function storeImage(Request $request)\n {\n $request->validate([\n 'recipe_id' => 'required',\n 'image' => 'nullable',\n ]);\n\n if (!$request->image) {\n return response()->json([\n 'message' => 'No new image provided'\n ]);\n }\n\n $recipe = Recipe::findOrFail($request->recipe_id);\n\n list($type, $imageData) = explode(';', $request->image);\n list(, $imageData) = explode(',', $imageData);\n\n\n $imageData = base64_decode($imageData);\n // Get file mime type\n preg_match(\n '/data:[a-z]*\\/([a-z]*)/',\n substr($type, 0, 50),\n $imageMimeMatches\n );\n\n $mimeType = $imageMimeMatches[1];\n $fileType = $mimeType;\n\n // Validate type of file\n if(in_array($fileType, [ 'jpeg', 'png', 'gif' ])) {\n // Set a unique name to the file and save\n $file_name = 'images/' . uniqid() . '.' . $fileType;\n Storage::disk('local')->put('public/'.$file_name, $imageData);\n // $path = Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix();\n\n $recipe->image = $file_name;\n $recipe->save();\n\n return response()->json([\n 'message' => 'Successfully stored recipe image!',\n // 'path' => $path.$file_name,\n 'path' => $file_name,\n ]);\n }\n else {\n // echo 'Error : Only JPEG, PNG & GIF allowed';\n return response()->json([\n 'message' => 'Error : Only JPEG, PNG & GIF allowed'\n ]);\n }\n }", "private function saveImage()\n {\n $name = $_FILES['image']['name'];\n $tmp_name = $_FILES['image']['tmp_name'];\n\n return move_uploaded_file($tmp_name, 'images/' . $name);\n }", "public function store(Request $request)\n {\n\t\t$user = Auth::user();\n\t\t\n\t\t$input = $request->all();\n\t\t$path2 = 'default_profile.png';\n\t\t\n\t\t$images = array();\n\t\t\n\t\t$path = array();\n\t\t\n\t\t$path[0] = 'no_image.svg';\n\n\t\t$storage_path = \"../storage/app/public/\";\n\t\t$save_path = \"image/product/\";\n\n\t\t$watermark = Image::make(storage_path('../storage/app/public/image/homepage/watermark_50.png'));\n\t\t\n\t\tif($files = $request->file('images')){\n\t\t\t$i = 0;\n\t\t\tforeach($files as $key => $file){\n\t\t\t\tif ($file->isValid()) {\n\n\t\t\t\t\t// 이미지 회전 후 저장\n\t\t\t\t\t$rotate = $request->{'img_rotate'.($i + 1)} * -1;\n\t\t\t\t\t$img = InterventionImage::make($files[$i]);\n\n\t\t\t\t\tif($img->width() >= 1000){\n\t\t\t\t\t\t$img->resize(700, null, function ($constraint) {\n\t\t\t\t\t\t\t$constraint->aspectRatio(); //비율유지\n\t\t\t\t\t\t})->rotate($rotate)->encode('jpg');\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$img->rotate($rotate)->encode('jpg');\n\t\t\t\t\t}\n\n\t\t\t\t\t//#1\n\t\t\t\t\t$watermarkSize = $img->width() - 20; //size of the image minus 20 margins\n\t\t\t\t\t//#2\n\t\t\t\t\t$watermarkSize = $img->width() / 2; //half of the image size\n\t\t\t\t\t//#3\n\t\t\t\t\t$resizePercentage = 70;//70% less then an actual image (play with this value)\n\n\t\t\t\t\t$watermarkSize = round($img->width() * ((100 - $resizePercentage) / 100), 2);\n\n\t\t\t\t\t// resize watermark width keep height auto\n\t\t\t\t\t$watermark->resize($watermarkSize, null, function ($constraint) {\n\t\t\t\t\t\t$constraint->aspectRatio();\n\t\t\t\t\t});\n\n\t\t\t\t\t$hash = md5($img->__toString(). time());\n\t\t\t\t\t$path[$i] = $storage_path.$save_path.$hash.\".jpg\";\n\n\t\t\t\t\t//insert resized watermark to image center aligned\n\t\t\t\t\t$img->insert($watermark, 'center');\n\n\t\t\t\t\t$img->save($path[$i]);\n\n\t\t\t\t\t$path[$i] = '/'.str_replace($storage_path.$save_path,\"\",$path[$i]);\n\n\t\t\t\t\t$i++;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\n\t\t$save_path2 = \"image/\";\n\t\t\n\t\tif($request->hasFile('artist_img')){\n\t\t\tif ($request->file('artist_img')->isValid()) {\n\n\t\t\t\t// 이미지 회전 후 저장\n\t\t\t\t$rotate = $request->img_rotate_artist * -1;\n\t\t\t\t$img = InterventionImage::make($request->file('artist_img'));\n\n\t\t\t\tif($img->width() >= 100){\n\t\t\t\t\t$img->resize(100, null, function ($constraint) {\n\t\t\t\t\t\t$constraint->aspectRatio(); //비율유지\n\t\t\t\t\t})->rotate($rotate)->encode('jpg');\n\t\t\t\t}else{\n\t\t\t\t\t$img->rotate($rotate)->encode('jpg');\n\t\t\t\t}\n\n\t\t\t\t$hash = md5($img->__toString(). time());\n\t\t\t\t$path2 = $storage_path.$save_path2.$hash.\".jpg\";\n\t\t\t\t$img->save($path2);\n\n\t\t\t\t$path2 = '/'.str_replace($storage_path.$save_path2,\"\",$path2);\n\t\t\t}\n\t\t}\n\n\t\t$betting_set = DB::table('tlca_batting_set')->first(); \n\t\t\n\t\t$art_date = $request->input('date_y').$request->input('date_m').$request->input('date_d');\n\t\t\n\t\tdate_default_timezone_set(\"Asia/Seoul\");\n\t\t\n\t\t$start_batting_day = date(\"Y/m/d\",strtotime($betting_set->end_time.\" +1 days\"));\n\t\t$end_batting_day = date(\"Y/m/d\",strtotime($start_batting_day.\" +\".($betting_set->batting_term - 1).\" days\"));\n\t\t\n\t\t$ca_use = Category::where('id', $request->input('category'))->first()->ca_use;\n\t\tinfo(str_replace(',', '', $request->input('coin_price')));\n\n\t\t$today = date(\"Y-m-d\");\n\t\tif( $request->input('batting_yn') == 1){\n\t\t\tProduct::create([\n\t \t'title' => $request->input('title'),\n\t \t'seller_id' => $user->id,\n\t \t'artist_img' => $path2,\n\t \t'artist_name' => $request->input('artist_name'),\n\t \t'artist_intro' => $request->input('artist_intro'),\n\t \t'artist_career' => $request->input('artist_career'),\n\t \t'image1' => $path[0],\n\t \t'image2' => isset($path[1])?$path[1]:NULL,\n\t \t'image3' => isset($path[2])?$path[2]:NULL,\n\t \t'image4' => isset($path[3])?$path[3]:NULL,\n\t \t'image5' => isset($path[4])?$path[4]:NULL,\n\t \t'introduce' => $request->input('introduce'),\n\t \t'art_width_size' => $request->input('art_width_size'),\n\t \t'art_height_size' => $request->input('art_height_size'),\n\t \t'art_date' => $art_date,\n\t \t'ca_id' => $request->input('category'),\n\t \t'ca_use' => $ca_use,\n\t\t\t\t'coin_price' => str_replace(',', '', $request->input('coin_price')),\n\t\t\t\t'cash_price' => str_replace(',', '', $request->input('cash_price')),\n\t\t\t\t'delivery_price' => str_replace(',', '', $request->input('delivery_price')),\n\t \t'batting_yn' => $request->input('batting_yn'),\n\t \t'start_time' => $start_batting_day,\n\t\t\t\t'end_time' => $end_batting_day,\n\t\t\t\t'created_at' => $today,\n\t\t\t\t'updated_at' => $today\n\t ]);\t\n\t\t}else{\n\t\t\tProduct::create([\n\t \t'title' => $request->input('title'),\n\t \t'seller_id' => $user->id,\n\t \t'artist_img' => $path2,\n\t \t'artist_name' => $request->input('artist_name'),\n\t \t'artist_intro' => $request->input('artist_intro'),\n\t \t'artist_career' => $request->input('artist_career'),\n\t \t'image1' => $path[0],\n\t \t'image2' => isset($path[1])?$path[1]:NULL,\n\t \t'image3' => isset($path[2])?$path[2]:NULL,\n\t \t'image4' => isset($path[3])?$path[3]:NULL,\n\t \t'image5' => isset($path[4])?$path[4]:NULL,\n\t \t'introduce' => $request->input('introduce'),\n\t \t'art_width_size' => $request->input('art_width_size'),\n\t \t'art_height_size' => $request->input('art_height_size'),\n\t \t'art_date' => $art_date,\n\t \t'ca_id' => $request->input('category'),\n\t \t'ca_use' => $ca_use,\n\t\t\t\t'coin_price' => str_replace(',', '', $request->input('coin_price')),\n\t\t\t\t'cash_price' => str_replace(',', '', $request->input('cash_price')),\n\t\t\t\t'delivery_price' => str_replace(',', '', $request->input('delivery_price')),\n\t\t\t\t'created_at' => $today,\n\t\t\t\t'updated_at' => $today\n\t ]);\t\n\t\t}\n\n\t\tUser::where('id',$user->id)->update([\n\t\t\t'level' => '2',\n\t\t]);\n\t\t\n\t\tif($this->device == 'pc'){\n\t\t\treturn redirect(route('mypage.myart_list'));\n\t\t}else{\n\t\t\treturn redirect(route('mypage.mobile_mypage',['index' => 1]));\n\t\t}\n }", "public function cropAction()\n {\n $candidate = $this->getRequest()->server->get('HTTP_REFERER');\n\n // make sure we get back to product page (fallback to admin home)\n if (strpos($candidate, '/product/product/') !== false) {\n $return_path = $candidate;\n $this->getRequest()->getSession()->set('crop_return_path', $return_path);\n } else {\n $return_path = $this->getRequest()->getSession()->get('crop_return_path');\n if (empty($return_path)) {\n $return_path = '/admin/dashboard';\n }\n }\n\n $path = $this->getRequest()->get('path');\n\n $source_path = $this->container->getParameter('kernel.root_dir') . \"/../web\" . $this->getRequest()->get('src');\n list( $source_width, $source_height, $source_type ) = getimagesize($source_path);\n\n if ($this->getRequest()->isMethod('post')) {\n\n $vector = $this->getRequest()->get('v');\n\n switch ( $source_type )\n {\n case IMAGETYPE_GIF:\n $source_gdim = imagecreatefromgif($source_path);\n break;\n\n case IMAGETYPE_JPEG:\n $source_gdim = imagecreatefromjpeg($source_path);\n break;\n\n case IMAGETYPE_PNG:\n $source_gdim = imagecreatefrompng($source_path);\n break;\n }\n\n $width = $vector[2] - $vector[0];\n $height = $vector[3] - $vector[1];\n\n // if crop makes sense\n if ($width < $source_width) {\n $dest = imagecreatetruecolor($width, $height);\n imagecopy($dest, $source_gdim, 0, 0, $vector[0], $vector[1], $width, $height);\n\n switch ( $source_type )\n {\n case IMAGETYPE_GIF:\n imagegif($dest, $source_path);\n break;\n\n case IMAGETYPE_JPEG:\n imagejpeg($dest, $source_path);\n break;\n\n case IMAGETYPE_PNG:\n imagepng($dest, $source_path);\n break;\n }\n\n // use new width for rendering\n list( $source_width, $source_height, $source_type ) = getimagesize($source_path);\n\n $this->addFlash('sonata_flash_success', 'Image cropped');\n } else {\n $this->addFlash('sonata_flash_error', 'Image not cropped: wrong dimensions');\n }\n }\n\n return $this->render('TeoProductBundle:Admin:crop_image.html.twig', array(\n 'path' => $path,\n 'action' => 'crop',\n 'teo_product_aspect_ratio' => $this->container->getParameter('teo_product_aspect_ratio'),\n 'actual_width' => $source_width,\n 'return_path' => $return_path,\n 'random' => md5(mt_rand()) . md5(mt_rand())\n ));\n }", "public function imageTmp(Request $request)\n {\n $image = $request->file('tmp');\n if(!$image){\n return response()->json(['status' => 'err']);\n }\n \n $filename = uniqid(null, true) . '.jpg';\n \n \\Image::make($image->getRealPath())->resize(1280, null, function ($constraint) {\n $constraint->aspectRatio();\n })->save('upload/tmp/' . $filename, 95);\n \n return response()->json(['status' => 'ok', 'filename' => $filename]);\n }", "public function uploadimage()\n\t{\n\t\t$user = User::find($_POST['user_id']);\n\n\t\t$userprofile = Input::file( 'user_profile_image' );\n\n\t\tif( !empty( $userprofile ) )\n\t\t{\n\t\t\t$file_in = $userprofile->getRealPath();\n\n\t\t\t$file_out = 'profile/' . $_POST['user_id'] . \"-\" . str_random( 12 ) . \".jpg\";\n\n\t\t\t$img = Image::make( $file_in );\n\n\t\t\t$img->resize( 200, 200 );\n\n\t\t\t$img->save( Config::get('app.home') . '/public/' . $file_out, 80 );\n\n\t\t\t$handle = fopen( Config::get('app.home') . '/public/' . $file_out, \"r\" );\n\n\t\t\tFlysystem::connection( 'awss3' )->put( $file_out,\n\t\t\t\t\t\t\t\t\t\t\t\t fread( $handle,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t filesize( Config::get('app.home') . '/public/' . $file_out ) ) );\n\n\t\t\t$user->user_profile_image = $file_out;\n\t\t}\n\n\t\t$usercoverprofile = Input::file( 'user_cover_image' );\n\n\t\tif( !empty( $usercoverprofile ) )\n\t\t{\n\t\t\t$file_in = $usercoverprofile->getRealPath();\n\t\t\t$file_out = 'profile/' . $_POST['user_id'] . \"-\" . str_random( 12 ) . \".jpg\";\n\n\t\t\t$img = Image::make( $file_in );\n\n\t\t\t$img->resize( 200, 200 );\n\n\t\t\t$img->save( Config::get('app.home') . '/public/' . $file_out, 80 );\n\n\t\t\t$handle = fopen( Config::get('app.home') . '/public/' . $file_out, \"r\" );\n\n\t\t\tFlysystem::connection( 'awss3' )->put( $file_out,\n\t\t\t\t\t\t\t\t\t\t\t\t fread( $handle,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t filesize( Config::get('app.home') . '/public/' . $file_out ) ) );\n\n\t\t\t$user->user_cover_image = $file_out;\n\t\t}\n\t\t$user->save();\n\t\theader(\"Location:http://\".Config::get('app.url_admin').\"/user/\".$_POST['user_id']);\n\t\texit();\n\t\t/*end of code for upload user profile and cover image*/\n\t}", "public function UploadPhotos(UploadRequest $request, $id)\n {\n\n $school = School::findOrFail($id);\n\n //Store image directory to the database\n foreach ($request->photos as $photo) {\n $imageName = $photo->getClientOriginalName();\n\n //remove non numbers characters\n $newname = preg_replace('~\\D~', '', $imageName);\n\n $newimagename = $newname . '.' .\"jpg\";\n \n\n\n //save image ImageData to DB\n // $newimagename = $photo->store('school_photos/'.$school->center_number.'/', $newimagename );\n SchoolPhoto::create([\n 'school_id' => $school->id,\n 'filename' => $newname\n ]);\n\n\n //Save the Image to Public Folder\n $photo->move(\n base_path() . '/public/school_photos/'.$school->center_number.'/', $newimagename\n );\n }\n\n\n\n}", "private function imageStorage($image) {\n // $imgName = time() . '.' . $image->getClientOriginalExtension();\n $imgName = time() . '.' . 'jpg'; //temporary solution\n $localStoragePath = public_path('images');\n\n $img = Image::make($image);\n //treats the image and save it on the right path\n $img->encode('jpg', 75)->resize(500, 500)->save($localStoragePath . '/' . $imgName);\n\n //gets the path to save it\n if(env('APP_ENV') == 'local') {\n $path = public_path('images');\n } else {\n //path to url\n $path = env('APP_URL') . '/images';\n //AWS S3 save\n Storage::disk('s3')->put($imgName, $img);\n\n return Storage::disk('s3')->url($imgName);\n\n }\n\n return $path . '/' . $imgName;\n }", "public function store(Request $request) {\n \n // file validation\n $validator = Validator::make($request->all(),\n ['filename' => 'required|mimes:jpeg,png,jpg,bmp|max:2048']);\n \n // if validation fails\n if($validator->fails()) {\n return Alert::info('Imagen', 'Fallo en validacion de imagen');\n }\n \n // if validation success\n if($file = $request->file('filename')) {\n\n $name = $file->getClientOriginalName();\n \n $target_path = public_path('../resources/img/cartas/');\n \n if($file->move($target_path, $name)) { \n return Alert::info('Imagen', 'Imagen subida correctamente');\n }\n }\n /*\n $name = $request->file('filename')->getClientOriginalName();\n //$extension = $request->file('filename')->extension();\n\n //Storage::putFileAs('filename', new File('./../resources/img/cartas'), $name);\n\n //Storage::disk('local')->put($name, 'Contents');\n\n //$path = Storage::putFile('./resources/img/cartas', $request->file('filename'));\n //$path = Storage::putFileAs('./resources/img/cartas', $request->file('filename'), $name);\n //$path = $request->file('filename')->store('./resources/img/cartas');\n $target_path = public_path('../resources/img/cartas/');\n\n $request->file('filename')->move($target_path, $name);\n\n echo('imagen subida corectamente');\n */\n\n /**\n * $fileName = $request->file->getClientOriginalName();\n * $request->file->move(public_path('../resources/img/cartas'), $fileName);\n */\n\n /**\n * $data = request()->validate([\n * 'name' => 'required',\n * 'email' => 'required|email',\n * 'message' => 'required',\n * ]);\n */\n }", "public function store(Request $request){\n \n if ($request->hasFile('image')){\n\n $filenamewithextension = $request->image->getClientOriginalName();\n $filename = pathinfo($filenamewithextension, PATHINFO_FILENAME);\n $extension = $request->image->getClientOriginalExtension();\n $filenametostore = $filename.'_'.time().'.'.$extension;\n $request->image->storeAs('public/img/', $filenametostore);\n //$smallthumbnail = \"_small_\".$filename.'_'.time().'.'.$extension;\n //$smallthumbnailpath = public_path('storage/img/'.$smallthumbnail);\n //$this->createThumbnail($smallthumbnailpath,150,93);\n //$request->image->storeAs('storage/img/', $smallthumbnail);\n\n return response()->json(array('nomeArquivo'=>$filenametostore));\n\n } else{\n //return response()->json(array('nomeArquivo' => 'arquivo não recebido'));\n } \n\n }", "public function store(Request $request)\n {\n // controllo che l'immagine sia in base64\n if (base64_decode($request->image, true)) {\n\n $img = imagecreatefromstring(base64_decode($request->image));\n imagepng($img, 'myimage.png');\n $imgMime = getimagesize('myimage.png');\n\n // se l'immagine è valida sia in formato base64 che come estensione faccio la validazione backend\n if (($img) && ($imgMime['mime'] == 'image/png')) {\n // dd('correct');\n $request->validate([\n 'name' => 'required|max:50|min:6',\n 'image' => 'required',\n ]);\n //se passo la validazione salvo nel DB nome e immagine\n $data = $request->all();\n $newDress = new Dress();\n $newDress->name = $data['name'];\n $newDress->image = $data['image'];\n\n // genero lo slug prendendo il titolo questa volta dal form\n $slug = Str::slug($newDress->name, '-');\n\n $slugEditable = $slug;\n $currentSlug = Dress::where('slug', $slug)->first();\n $contatore = 1;\n while($currentSlug) {\n $slug = $slugEditable . '-' . $contatore;\n $contatore++;\n $currentSlug = Dress::where('slug', $slug)->first();\n }\n\n $newDress->slug = $slug;\n\n\n $newDress->save();\n\n //se non esiste creo la cartella per le immagini del progetto corrente\n if (!file_exists('./img/projects/' . $newDress->slug)) {\n mkdir('./img/projects/' . $newDress->slug, 0777, true);\n }\n\n $link= 'data:image/png;base64,' . $newDress->image;\n $destdir = './img/projects/' . $newDress->slug;\n $newImg = file_get_contents($link);\n file_put_contents('./img/projects/' . $newDress->slug . '/full.jpeg', $newImg);\n file_put_contents('./img/projects/' . $newDress->slug . '/mid.jpeg', $newImg);\n file_put_contents('./img/projects/' . $newDress->slug . '/thumbnail.jpeg', $newImg);\n\n\n // se non esiste creo una dopia della cartella per le immagini con il watermark\n if (!file_exists('./img/projects_watermarked/' . $newDress->slug)) {\n mkdir('./img/projects_watermarked/' . $newDress->slug, 0777, true);\n }\n $source = './img/projects/' . $newDress->slug;\n $destination = './img/projects_watermarked/' . $newDress->slug;\n\n $watermark = imagecreatefrompng('./img/watermark/watermark.png');\n\n $margin_right = 40;\n $margin_bottom = 10;\n\n $sx = imagesx($watermark);\n $sy = imagesy($watermark);\n $images = array_diff(scandir($source), array('..','.'));\n\n foreach ($images as $image) {\n $img = imagecreatefrompng($source . '/' . $image);\n imagecopy($img, $watermark, imagesx($img) -$sx - $margin_right, imagesy($img) - $sy - $margin_bottom, 0, 0, $sx, $sy);\n $i = imagejpeg($img, $destination . '/' . $image, 100);\n }\n\n\n// in questo punto dopo che ho le cartelle con le immagini ridimensiono le immagini mid e thumbnail\n if (!function_exists('resize_image')) {\n function resize_image($file, $w, $h) {\n list($width, $height) = getimagesize($file);\n $src = imagecreatefromjpeg($file);\n $dst = imagecreatetruecolor($w, $h);\n imagecopyresampled($dst, $src, 0, 0, 0, 0, $w, $h, $width, $height);\n return $dst;\n }\n //\n\n $imgMid = resize_image('./img/projects_watermarked/'. $newDress->slug . '/mid.jpeg', 250, 303);\n imagejpeg($imgMid, './img/projects_watermarked/'. $newDress->slug . '/mid.jpeg');\n\n $imgThumbnail = resize_image('./img/projects_watermarked/'. $newDress->slug . '/thumbnail.jpeg', 150, 181);\n imagejpeg($imgThumbnail, './img/projects_watermarked/'. $newDress->slug . '/thumbnail.jpeg');\n };\n //-----------------------\n return redirect()->route('dress.index')->withSuccess('Salvataggio avvenuto correttamente');\n }\n } else {\n return redirect()->route('dress.create')->withErrors('Errore: immagine non valida');\n\n }\n\n }", "public function user_crop()\r\n\t{\r\n\t\t// Get uploaded photo\r\n\t\t$uploaded_photo = $this->input->post('uploaded_photo');\r\n\r\n\t\t// Get image width, height\r\n\t\tlist($width, $height) = @getimagesize('./assets/uploads/' . $uploaded_photo);\r\n\r\n\t\t// Calculate ratio\r\n\t\t$ratio = $width / 536;\r\n\r\n\t\t// Get chosen crop coordinates\r\n\t\t$coords_x1 = round($ratio * $this->input->post('coords-x1'));\r\n\t\t$coords_y1 = round($ratio * $this->input->post('coords-y1'));\r\n\t\t$coords_x2 = round($ratio * $this->input->post('coords-x2'));\r\n\t\t$coords_y2 = round($ratio * $this->input->post('coords-y2'));\r\n\t\t$coords_w = round($ratio * $this->input->post('coords-w'));\r\n\t\t$coords_h = round($ratio * $this->input->post('coords-h'));\r\n\r\n\t\t// Profile thumbnail crop config\r\n\t\t$config['source_image'] = './assets/uploads/' . $uploaded_photo;\r\n\t\t$config['new_image'] = './assets/uploads/tall-' . strtolower($uploaded_photo);\r\n\t\t$config['width'] = $coords_w;\r\n\t\t$config['height'] = $coords_h;\r\n\t\t$config['maintain_ratio'] = FALSE;\r\n\t\t$config['x_axis'] = $coords_x1;\r\n\t\t$config['y_axis'] = $coords_y1;\r\n\r\n\t\t// Initialize the image library with config\r\n\t\t$this->image_lib->initialize($config);\r\n\r\n\t\t// Crop the image\r\n\t\tif (!$this->image_lib->crop())\r\n\t\t{\r\n\t\t\t$errors[] = $this->image_lib->display_errors('', '');\r\n\t\t}\r\n\r\n\t\t// Clear the config to start next thumbnail\r\n\t\t$config = array();\r\n\t\t$this->image_lib->clear();\r\n\r\n\t\t// Profile thumbnail resize config\r\n\t\t$config['source_image'] = './assets/uploads/tall-' . strtolower($uploaded_photo);\r\n\t\t$config['width'] = 385;\r\n\t\t$config['height'] = 465;\r\n\t\t$config['maintain_ratio'] = FALSE;\r\n\r\n\t\t// Initialize the image library with config\r\n\t\t$this->image_lib->initialize($config);\r\n\r\n\t\t// Resize the image\r\n\t\tif (!$this->image_lib->resize())\r\n\t\t{\r\n\t\t\t$errors[] = $this->image_lib->display_errors('', '');\r\n\t\t}\r\n\t}", "public function upload(Request $request)\n {\n \n $experience = Experience::findOrFail($request->id_experience);\n // getting all of the post data\n $file = array('image' => Input::file('image'));\n // setting up rules\n $rules = array('image' => 'required',); //mimes:jpeg,bmp,png and for max size max:10000\n // doing the validation, passing post data, rules and the messages\n $validator = Validator::make($file, $rules);\n if ($validator->fails()) {\n // send back to the page with the input data and errors\n Session::flash('error', 'Validation fail');\n return redirect($request->id_user . '/project/' . $request->id_project . '/experience/');\n }\n else {\n // checking file is valid.\n if (Input::file('image')->isValid()) {\n \n $size = getimagesize(Input::file('image'));\n $image = Input::file('image');\n $destinationPath = 'uploadsimages'; // upload path\n $extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n $fileName = round(microtime(true)).'.'.$extension; // renameing image\n $path = base_path().'/public/uploadsimages/' . $fileName;\n if($size[0] > 1366){\n /* Atribuição que o novo tamanho para imagens maiores que 1366px vai ser igual a metade do tamanho original */\n $newSize[0] = $size[0] * 0.5;\n $newSize[1] = $size[1] * 0.5;\n $experience->width = $newSize[0];\n $experience->heigth = $newSize[1];\n Image::make($image->getRealPath())->resize($newSize[0], $newSize[1])->save($path);\n\n $experience->image_link = \"/\" . $destinationPath . \"/\" . $fileName;\n $experience->update();\n \n }else{\n $experience->width = $size[0];\n $experience->heigth = $size[1];\n $experience->image_link = \"/\" . $destinationPath . \"/\" . $fileName;\n $experience->update();\n $image->move($destinationPath, $fileName); // uploading file to given path\n }\n // sending back with message\n Session::flash('success', 'Upload successfully'); \n return redirect($request->id_user . '/project/' . $request->id_project . '/experience/'.$request->id_experience.'/getscale');\n }\n else {\n // sending back with error message.\n Session::flash('error', 'uploaded file is not valid');\n return redirect($request->id_user . '/project/' . $request->id_project . '/experience/'.$request->id_experience.'/getscale');\n }\n }\n }", "function resizeImageandSave($image, $path, $disk = 'local', $width = 300, $height = 300)\n{\n $background = Image::canvas($width, $height, '#ffffff');\n\n // read image file and resize it to 262x54\n $img = Image::make($image);\n //Resize image\n $img->resize($width, $height, function ($constraint) {\n $constraint->aspectRatio();\n $constraint->upsize();\n });\n\n // insert resized image centered into background\n $background->insert($img, 'center');\n\n // save\n $filename = uniqid() . '.' . $image->getClientOriginalExtension();\n $path = $path . '/' . $filename;\n Storage::disk($disk)->put($path, (string) $background->encode());\n return $filename;\n}", "public static function crop($path = null, $width = null, $height = null, $x = null, $y = null) {\n\n if(isset($path)) {\n\n $img = Image::make(public_path('storage/'.$path));\n $img->crop($width, $height, $x, $y);\n\n $mix = explode('.', $path);\n $extension = $mix[1];\n $raw = explode('/', $mix[0]);\n $name = end($raw);\n\n $file = $name.'- Cropped - '.\"$width\".'x'.\"$height\".'.'.$extension;\n\n unset($raw[(sizeof($raw)-1)]);\n\n\t\t $file_path = implode('/', $raw).'/'.$file;\n\n $img->save(public_path('storage/'.$file_path));\n\n return $file_path;\n\n } else {\n throw new ImageUploaderException(\n \"Path is empty\"\n );\n }\n\n }", "function uploadProfileImage($filename, $tmpLocation, $type) {\n\n global $userObj;\n global $imageObj;\n\n if($type === 'own') {\n $imageObj->load($tmpLocation);\n $width = $imageObj->getWidth();\n $height = $imageObj->getHeight();\n\n if($width < $height) {\n $imageObj->resizeToWidth(400);\n } else {\n $imageObj->resizeToHeight(400);\n }\n\n $imageObj->crop(400);\n }\n\n $imgName = time() . '_' . $filename;\n $newLocation = \"../../public/images/upload/\" . $imgName;\n\n $loggedUser = $userObj->loggedUser($_SESSION[\"user\"][\"userID\"]);\n\n //if the user had own profile image we delete it from storage\n if($loggedUser[\"profileImage\"] != \"defaultAvatar.png\") {\n $previousLocation = \"../../public/images/upload/\" . $loggedUser[\"profileImage\"];\n }\n\n if($userObj->uploadProfileImage($imgName, $_SESSION[\"user\"][\"userID\"])) {\n \n if($type === 'own') {\n $imageObj->save($newLocation, 100);\n } else {\n copy($tmpLocation, $newLocation);\n }\n\n if(isset($previousLocation)) {\n unlink($previousLocation);\n }\n\n $result[\"data_type\"] = 1;\n $result[\"data_value\"] = $imgName;\n\n echo json_encode($result);\n exit;\n } else {\n $result[\"data_type\"] = 0;\n $result[\"data_value\"] = \"An error occured\";\n\n echo json_encode($result);\n exit;\n }\n\n}", "public function uploadCropImg() {\n \n $type = $this->input->post('type');\n if($type == 'create'){\n $json = array();\n $image_url = $this->input->post('image_url'); \n $user_id = base64_decode($this->input->post('member_id')); //image view use code only member id\n $upltype = $this->input->post('upltype');\n $json['img'] = $image_url;\n $json['user_id'] = $user_id;\n $json['upl'] = $upltype;\n\n $img_path = $this->session->userdata['img'];\n array_push($img_path, $image_url);\n $this->session->set_userdata('img',$img_path);\n $json['img_path_v'] = $this->session->userdata('img');\n\n header('Content-Type: application/json');\n echo json_encode($json);\n }else if($type == 'edit'){\n //echo 'edit';\n $json = array();\n $ad_id = $this->input->post('ad_id');\n $image_url = $this->input->post('image_url');\n $user_id = base64_decode($this->input->post('member_id')); //image view use code only member id\n $json['img'] = $image_url;\n $json['user_id'] = $user_id;\n $json['id'] = $ad_id;\n $imageData = array(\n 'AdsID'=>$ad_id,\n 'Images'=>$image_url,\n );\n $json['return_img_id'] = $this->Myads->insert_image($imageData);\n header('Content-Type: application/json');\n echo json_encode($json);\n }\n \n }", "public function storeImg(Request $request)\n {\n $imageName = request()->file->getClientOriginalName();\n request()->file->move(public_path('uploads'), $imageName);\n return response()->json(['uploaded' => '/uploads/'.$imageName]);\n }", "public function store(Request $request)\n {\n\n $folderPath = \"images/\";\n// return strlen ( $_POST['image1']);\n// return $_POST['image1']=='null';\n// exit;\n if ($_POST['image1']=='' ||$_POST['image1']=='null'){\n $path1=\"\";\n }else{\n $image_parts = explode(\";base64,\", $_POST['image1']);\n $image_type_aux = explode(\"image/\", $image_parts[0]);\n $image_type = $image_type_aux[1];\n $image_base64 = base64_decode($image_parts[1]);\n $file = $folderPath . uniqid() . '.'.$image_type;\n file_put_contents($file, $image_base64);\n $path1=$file;\n }\n\n\n\n if ($_POST['image2']=='' ||$_POST['image2']=='null'){\n $path2=\"\";\n }else{\n\n $image_parts = explode(\";base64,\", $_POST['image2']);\n $image_type_aux = explode(\"image/\", $image_parts[0]);\n $image_type = $image_type_aux[1];\n $image_base64 = base64_decode($image_parts[1]);\n $file = $folderPath . uniqid() . '.'.$image_type;\n file_put_contents($file, $image_base64);\n $path2=$file;\n }\n\n if ($_POST['image3']=='' ||$_POST['image3']=='null'){\n $path3=\"\";\n }else{\n\n $image_parts = explode(\";base64,\", $_POST['image3']);\n $image_type_aux = explode(\"image/\", $image_parts[0]);\n $image_type = $image_type_aux[1];\n $image_base64 = base64_decode($image_parts[1]);\n $file = $folderPath . uniqid() . '.'.$image_type;\n file_put_contents($file, $image_base64);\n $path3=$file;\n }\n\n if ($_POST['image4']==''||$_POST['image4']=='null'){\n $path4=\"\";\n }else{\n $image_parts = explode(\";base64,\", $_POST['image4']);\n $image_type_aux = explode(\"image/\", $image_parts[0]);\n $image_type = $image_type_aux[1];\n $image_base64 = base64_decode($image_parts[1]);\n $file = $folderPath . uniqid() . '.'.$image_type;\n file_put_contents($file, $image_base64);\n $path4=$file;\n }\n\n// $request->hasFile('image1')?$path1 = $request->file('image1')->store('images'):$path1='';\n// $request->hasFile('image2')?$path2 = $request->file('image2')->store('images'):$path2='';\n// $request->hasFile('image3')?$path3 = $request->file('image3')->store('images'):$path3='';\n// $request->hasFile('image4')?$path4 = $request->file('image4')->store('images'):$path4='';\n// $path = $request->file('image2')->store('images');\n// $path = $request->file('image3')->store('images');\n// $path = $request->file('image4')->store('images');\n\n// return $path;\n//\n// exit;\n $d=New Asistencia();\n// $d->objetos=$request->objetos;\n isset($request->objetos)&&$request->objetos!='undefined'?$d->objetos=strtoupper($request->objetos):$d->objetos='';\n $d->recinto=Auth::user()->tipo;\n// $d->motivo=$request->motivo;\n isset($request->motivo)&&$request->motivo!='undefined'?$d->motivo=strtoupper($request->motivo):$d->motivo='';\n// $d->targeta=$request->targeta;\n isset($request->targeta)&&$request->targeta!='undefined'?$d->targeta=strtoupper($request->targeta):$d->targeta='';\n $d->image1=$path1;\n $d->image2=$path2;\n $d->image3=$path3;\n $d->image4=$path4;\n $d->persona_id=$request->persona_id;\n $d->destino_id=$request->destino_id;\n $d->user_id=Auth::user()->id;\n $d->save();\n// return $d;\n return Asistencia::with('persona')\n ->with('destino')\n ->with('user')\n ->where('recinto','=',Auth::user()->tipo)\n ->where('user_id','=',Auth::user()->id)\n ->where('id','=',$d->id)\n ->get();\n\n }", "public function store(Request $request)\n {\n // dd($request->all());\n $this->validate($request, [\n 'email' => 'unique:users|required|email',\n 'name' => 'required|max:50',\n 'address_one' => 'max:50',\n 'address_two' => 'max:50',\n 'eircode' => 'max:15',\n 'country' => 'max:50',\n 'password' => 'required|max:50',\n 'fileinput' => 'image|mimes:jpeg,png,jpg|max:2048',\n ]);\n\n\n $file = $request->file('fileinput');\n $image = Image::make($file->getRealPath());\n $image->resize(250, 250);\n\n $thumbnail_image_name = pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME).'.'.$file->getClientOriginalExtension();\n //save resized image to public\n $image->save(public_path('img/'.$thumbnail_image_name));\n $saved_image_uri = $image->dirname.'/'.$image->basename;\n //Save to private folder\n $uploaded_image_url = Storage::putFile('uploads', new File($saved_image_uri));\n //Now delete public image\n $image->destroy();\n unlink($saved_image_uri);\n\n\n $user = new User;\n $user->email = $request->email;\n $user->name = $request->name;\n $user->address_one = $request->address_one;\n $user->address_two = $request->address_two;\n $user->eircode = $request->eircode;\n $user->country = $request->country;\n $user->password = Hash::make($request->password);\n $user->image_url = $uploaded_image_url;\n\n $user->save();\n\n\n return back()->with([\n 'success' => 'Form Submitted successfully!'\n ]);\n }", "public function store(Request $request,$id)\n {\n $photos = $request->file('file');\n if (!is_dir(public_path('/images'))) {\n mkdir(public_path('/images'), 0777);\n }\n $photo = $photos;\n $name = sha1(date('YmdHis') . Str::random(30));\n $save_name = $name . '.' . $photo->getClientOriginalExtension();\n $resize_name = $name . Str::random(2) . '.' . $photo->getClientOriginalExtension();\n \n Image::make($photo)\n ->resize(800, 800)\n ->save(public_path('/storage/photos') . '/' . $resize_name);\n \n $gallery=new Gallery;\n $gallery->realestate_id=$id;\n $gallery->photos=$resize_name;\n $gallery->save();\n }", "public function storeImage(UploadedFile $file, string $targetFolder, int $imgWidth, int $imgHeight, bool $keepProportion = true)\n {\n if ($file == null)\n return null;\n $path = $file->hashName(\"public/$targetFolder\");\n $image = Image::make($file);\n if ($keepProportion){\n $image->resize($imgWidth, $imgHeight, function ($constraint) {\n $constraint->aspectRatio();\n });\n }else{\n $image->resize($imgWidth, $imgHeight);\n }\n Storage::disk(self::DISK)->put($path, (string)$image->encode());\n return $path;\n }", "public function store(Request $request)\n {\n\n $fileName = Storage::disk('public')->put('',$request->file('file_name'));\n\n $thumbPath = storage_path('app/public/thumb/').$fileName;\n\n $manager = new ImageManager(array('driver' => 'gd'));\n\n\n $img = $manager->make($request->file_name)->resize(100, 100)->save($thumbPath);\n\n\n\n $file = new File();\n $file->file_name = $fileName;\n $file->save();\n\n return redirect(route('files.index'));\n }", "public function upload(Request $request)\n {\n $file = $request->image; \n $filecontent = $file->openFile()->fread($file->getSize()); \n $filename = date('YmdHis') . $file->getClientOriginalName(); \n $file->move(public_path() . '/images/', $filename);\n return view('back.photo.create', ['image' => $filename]);\n }", "public function StoreSlider(Request $request)\n {\n\n $slider_image = $request->file('image');\n\n $name_gen = hexdec(uniqid()).'.'.$slider_image->getClientOriginalExtension();\n Image::make($slider_image)->resize(1920,1088)->save('image/slider/'.$name_gen );\n\n $last_img ='image/slider/'.$name_gen;\n\n\n //end upload image\n\n\n Slider::insert([\n 'title' => $request->title,\n 'description' => $request->description,\n 'image'=> $last_img,\n 'created_at'=>Carbon::now(),\n ]);\n\n return redirect()->route('home.slider')->with('success','Slider Inserted successfully');\n }", "public function photo() {\n\t\t$this->layout = null;\n\t\t$uploadPath = Configure::read(\"App.UPLOAD_PATH\");\n\t\t$thumbnailPath = Configure::read(\"App.PROFILE_IMG_PATH\");\n\t\t$uploadUrl = Configure::read(\"App.UPLOAD_PATH_URL\");\n\t\t$webFolder = $thumbnailPath;\n\t\t$tempUrl = FULL_BASE_URL . \"/uploads/tmp/\";\n\t\t$webUrl = FULL_BASE_URL . \"/uploads/user_profile\";\n\t\t/*\n\t\t * Do the image Cropping\n\t\t */\n\t\tif (isset($this->request->data['crop_image'])) {\n\n\n\t\t\t$uploadedImage = $this->request->data['cropfileName'];\n\n\t\t\ttry {\n\n\t\t\t\t$options = array('thumbnail' => array(\n\t\t\t\t\t\t\"max_width\" => $this->minimumImageSize[0],\n\t\t\t\t\t\t\"max_height\" => $this->minimumImageSize[1],\n\t\t\t\t\t\t\"path\" => $thumbnailPath\n\t\t\t\t\t),\n\t\t\t\t\t'max_width' => 700\n\t\t\t\t);\n\t\t\t\t$x1 = $_POST[\"x1\"];\n\t\t\t\t$y1 = $_POST[\"y1\"];\n\t\t\t\t$width = $_POST[\"w\"];\n\t\t\t\t$height = $_POST[\"h\"];\n\t\t\t\t$fileName = $_POST['cropfileName'];\n\t\t\t\t$imageUrl = $tempUrl . $_POST['cropfileName'];\n\n\t\t\t\t$photoPath = $uploadPath . DIRECTORY_SEPARATOR . $uploadedImage;\n\n\t\t\t\tif ($width <= 0) {\n\t\t\t\t\t$width = $this->minimumImageSize[0];\n\t\t\t\t\t$x1 = 0;\n\t\t\t\t}\n\n\t\t\t\tif ($height <= 0) {\n\t\t\t\t\t$height = $this->minimumImageSize[1];\n\t\t\t\t\t$y1 = 0;\n\t\t\t\t}\n\n\t\t\t\tif ($width > 0 && $height > 0) {\n\t\t\t\t\t$status = ImageTool::crop(array(\n\t\t\t\t\t\t\t\t'input' => $photoPath,\n\t\t\t\t\t\t\t\t'output' => $photoPath,\n\t\t\t\t\t\t\t\t'width' => $width,\n\t\t\t\t\t\t\t\t'height' => $height,\n\t\t\t\t\t\t\t\t'output_width' => $this->minimumImageSize[0],\n\t\t\t\t\t\t\t\t'output_height' => $this->minimumImageSize[1],\n\t\t\t\t\t\t\t\t'top' => $y1,\n\t\t\t\t\t\t\t\t'left' => $x1,\n\t\t\t\t\t));\n\n\t\t\t\t\t$result['success'] = true;\n\t\t\t\t\t$result['fileUrl'] = $tempUrl . \"\" . $uploadedImage;\n\t\t\t\t\t$result['fileName'] = $uploadedImage;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception(\"Image Not cropped\");\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$result['success'] = false;\n\t\t\t\t$result['message'] = $e->getMessage();\n\t\t\t}\n\n\t\t\t$result = htmlspecialchars(json_encode($result), ENT_NOQUOTES);\n\t\t\techo $result;\n\t\t} else {\n\t\t\t/*\n\t\t\t * Functionality to upload the image to a temporary folder\n\t\t\t */\n\t\t\t$uploader = new $this->Uploader();\n\t\t\t//$webFolder\n\n\t\t\t$uploader->allowedExtensions = array(\"jpg\", \"jpeg\", \"png\", \"gif\"); // all files types allowed by default\n\t\t\t// Specify max file size in bytes.\n\t\t\t$uploader->sizeLimit = 5 * 1024 * 1024; // default is 5 MiB\n\n\t\t\t$uploader->minImageSize = array('200', '200');\n\n\t\t\t// Specify the input name set in the javascript.\n\t\t\t$uploader->inputName = \"qqfile\"; // matches Fine Uploader's default inputName value by default\n\t\t\t// If you want to use the chunking/resume feature, specify the folder to temporarily save parts.\n\t\t\t$uploader->chunksFolder = \"chunks\";\n\n\t\t\t$method = $_SERVER[\"REQUEST_METHOD\"];\n\t\t\tif ($method == \"POST\") {\n\t\t\t\theader(\"Content-Type: text/plain\");\n\n\t\t\t\t// Call handleUpload() with the name of the folder, relative to PHP's getcwd()\n\t\t\t\t$result = $uploader->handleUpload($uploadPath);\n\n\t\t\t\tif (isset($result['success'])) {\n\t\t\t\t\t$result['file_name'] = $uploader->getUploadName();\n\n\t\t\t\t\t$photoPath = $uploadPath . DIRECTORY_SEPARATOR . $result['file_name'];\n\t\t\t\t\t$status = ImageTool::resize(array(\n\t\t\t\t\t\t\t\t'quality' => 90,\n\t\t\t\t\t\t\t\t'enlarge' => false,\n\t\t\t\t\t\t\t\t'keepRatio' => true,\n\t\t\t\t\t\t\t\t'paddings' => false,\n\t\t\t\t\t\t\t\t'crop' => false,\n\t\t\t\t\t\t\t\t'input' => $photoPath,\n\t\t\t\t\t\t\t\t'output' => $photoPath,\n\t\t\t\t\t\t\t\t'width' => '520',\n\t\t\t\t\t\t\t\t'height' => '220'\n\t\t\t\t\t));\n\n\t\t\t\t\t// image dimension\n\t\t\t\t\tlist($imageWidth, $imageHeight) = getimagesize($photoPath);\n\n\t\t\t\t\t$result['imageWidth'] = $imageWidth;\n\t\t\t\t\t$result['imageHeight'] = $imageHeight;\n\t\t\t\t\t$result['fileName'] = $result['file_name'];\n\t\t\t\t\t$result['fileurl'] = $tempUrl . DIRECTORY_SEPARATOR . $result['file_name'];\n\t\t\t\t}\n\n\t\t\t\techo json_encode($result);\n\t\t\t} else {\n\t\t\t\theader(\"HTTP/1.0 405 Method Not Allowed\");\n\t\t\t}\n\t\t}\n\n\t\texit;\n\t}", "public function imageUploadPost(Request $request)\n {\n \n $id = $request['id'];\n $imageName = time().'.'.$request->image->extension(); \n $request->image->move(public_path('images'), $imageName);\n $new_photo = \"/images/\".$imageName;\n $new_image = Blog::find($id);\n $new_image->img = $new_photo;\n $new_image->save();\n \n return redirect()->back()->withSuccess('Фото акции успешно добавлено');\n\n }", "function save_img() {\n imagejpeg($this->img, 'captcha.jpg');\n\n // Libération de la mémoire\n imagedestroy($this->img);\n \n }", "public function processPhoto()\n\t{\n $filename = $this->createFilename();\n\n // resize image\tand save them\n $this->uploadImage(\\Input::file('photo'), 100, 50, 'uploads/photos/medium/' . $filename);\n $this->uploadImage(\\Input::file('photo'), 50, 25, 'uploads/photos/small/' . $filename);\n\n\t\t\\Input::file('photo')->move('uploads/photos/original/', $filename);\n\n\t\t// Save photo in the database\n\t\treturn $this->applicant->update(['photo' => $filename]);\n\t}", "public function savetheuploadedfile() {\n\t\t$public_dir = 'public/images/';\n\t\t$baseurl = base_url();\n\t\tif ($_FILES['file']['name']) {\n\t\t\t\tif (!$_FILES['file']['error']) {\n\t\t\t\t\t\t$name = md5(rand(100, 200));\n\t\t\t\t\t\t$ext = explode('.', $_FILES['file']['name']);\n\t\t\t\t\t\t$filename = $name . '.' . $ext[1];\n\t\t\t\t\t\t$destination = $public_dir . $filename; //change path of the folder...\n\t\t\t\t\t\t$location = $_FILES[\"file\"][\"tmp_name\"];\n\t\t\t\t\t\tmove_uploaded_file($location, $destination);\n\t\t\t\t\t\t// echo $destination;\n\n\t\t\t\t\t\techo $baseurl.'/public/images/' . $filename;\n\t\t\t\t} else {\n\t\t\t\t\t\techo $message = 'The following error occured: ' . $_FILES['file']['error'];\n\t\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function adUploadPicture(){\n\n if (Input::hasFile('prof_pic')) {\n $file = Input::file('prof_pic');\n $file_original_name = $file->getClientOriginalName();\n $filename = str_random(32) . $file->getClientOriginalName();\n\n $destination = public_path() . '/images/khateeb_pictures/';\n\n $slider = Input::file(\"prof_pic\")->getRealPath();\n\n if(Input::file('prof_pic')->move($destination, $filename)){\n $pic = new AdKhateebsPhoto();\n $pic->photo_url = $filename ;\n $pic->ad_id = Auth::user()->user_id ;\n\n $pic->save();\n\n return \"true\";\n\n }else{\n return \"false\";\n }\n }else{\n return \"false\";\n }\n\n }", "public function soumettre(Request $request)\n {\n $avatarPath = $request->session()->get('avatarPath');\n\n $dossier = 'storage/imagesSubmits/';\n $user=Auth::User()->id;\n $avatars=Avatar::all();\n foreach($avatars as $avatar){\n $userId = $avatar->user_id;\n $imageValide = $avatar->imageValider;\n if ($userId==$user and $imageValide == false){\n $avatar->delete();\n }\n /*if($avatar==$user){\n echo ('trouve doublon de '.$username);\n }*/\n }\n $avatarName=$_POST['publierNom'];\n $avatar = new Avatar();\n $avatar->user_id = $user;\n $avatar->imageUrl = $avatarName;\n $avatar->save();\n //recupere l'extension du nom de l'image\n $avatarHeader = 'image/'.substr(strrchr($avatarName, '.'),1);\n //sauvegarde de l'image cropped apres encodage(balise canvas)/decodage Base64\n \\header($avatarHeader);\n $avatarBase64=$_POST['publierHref'];\n //on retire le MINE-type et le mot clé present pour ne recuperer que la data de l'encodage\n $avatarBase64= substr(strrchr($avatarBase64,','),1);\n $avatarData=base64_decode($avatarBase64);\n $avatarImage=imagecreatefromstring($avatarData);\n imagejpeg($avatarImage,$dossier.$avatarName);\n\n return view ('profile.profile',compact('avatarPath'));\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required|string',\n 'sub_title' => 'required|string', \n 'description' => 'required|string', \n 'big_img' => 'required|image', \n 'sm_img' => 'required|image', \n 'client' => 'required|string', \n 'category' => 'required|string' \n ]);\n\n $protfolios= new Protfolio;\n $protfolios->title=$request->title;\n $protfolios->sub_title=$request->sub_title;\n $protfolios->description=$request->description;\n $protfolios->client=$request->client;\n $protfolios->category=$request->category;\n\n $big_file = $request->file('big_img');\n Storage::putFile('public/img/', $big_file);\n $protfolios->big_img =\"storage/img/\".$big_file->hashName();\n\n $sm_file = $request->file('sm_img');\n Storage::putFile('public/img/', $sm_file);\n $protfolios->sm_img =\"storage/img/\".$sm_file->hashName();\n\n $protfolios->save();\n return redirect()->route('admin.protfolios.create')->with('success', \"New Protfolio Create successfully\");\n\n\n\n }", "function saveFile(UploadedFile $file, $width)\n{\n $filename = md5(mt_rand().$file->getBasename()).'.'.$file->guessClientExtension();\n\n $file->move(__DIR__.'/../../img', $filename);\n\n $imagine = new Imagine\\Gd\\Imagine();\n $image = $imagine->open(__DIR__.'/../../img/'.$filename);\n\n $box = $image->getSize();\n $box = $box->widen((int) $width);\n\n $image = $image->thumbnail($box, Imagine\\Image\\ImageInterface::THUMBNAIL_OUTBOUND);\n $image->save(__DIR__.'/../../img/mini_'.$filename);\n\n return $filename;\n}", "public function storeImage($request, $fileKey, $fileName, $path) {\n\n if($request->hasFile($fileKey)){\n\n //get the file from the profile_image request...\n $image = $request->file($fileKey);\n\n //move the file to correct location\n $image->move($path, $fileName);\n\n }\n\n else {\n return false;\n }\n\n\n\n }", "private function generate()\n {\n $originalImages = Storage::files(env('PHOTO_PATH'));\n\n foreach ($originalImages as $originalImage) {\n $pieces = explode('/', $originalImage);\n\n $exp = explode('.', end($pieces));\n\n $extension = end($exp);\n\n array_pop($exp);\n\n $imageId = implode('.', $exp);\n\n $photos = [];\n\n foreach ($this->dimensions as $key => $dimension) {\n $fileName = env('PHOTO_PATH_RESIZE') . \"{$imageId}_{$key}.$extension\";\n\n if (! Storage::exists($fileName)) {\n $img = Image::make(Storage::get($originalImage));\n $img->resize($dimension['width'], $dimension['height']);\n\n Storage::put($fileName, (string)$img->encode(), 'public');\n\n if (Storage::exists($fileName)) {\n $photos[$key] = asset(Storage::url($fileName));\n }\n }\n }\n\n /**\n * Save on Storage\n */\n if (count($photos)) {\n $photo = new Photo();\n $photo->name = $imageId;\n $photo->photos = $photos;\n $photo->photos = $photos;\n $photo->save();\n }\n }\n }", "public function store(Request $request)\n {\n\n// $imageName = time() . '-' . preg_match_all('/data\\:image\\/([a-zA-Z]+)\\;base64/',$request->photo,$matched).'.jpg';\n $imageName = time() . '.' . explode('/',explode(':', substr($request->photo, 0, strpos($request->photo, ';')))[1])[1];\n \\Image::make($request->photo)->save(public_path('/assets/uploaded_images/'). $imageName);\n// dd($imageName);\n\n $contact = new Contact();\n $contact->name = $request->name;\n $contact->email = $request->email;\n $contact->position = $request->position;\n $contact->company = $request->company;\n $contact->phone = $request->phone;\n $contact->subject = $request->subject;\n $contact->photo = $imageName;\n $contact->save();\n }", "public function saveProduct($img, $request) {\n \n $extension = $img->getClientOriginalExtension();\n \n if ($request->hasFile('file')) {\n $image = $request->file('file')->store('public/profile');\n } else {\n $image = \"\";\n }\n return $image; \n }", "protected function actualizar(Request $request, User $user ){\n\n\n $datosUsua = request()->except(['_token','_method']);\n\n if($request->hasFile('foto')){\n\n \n\n\n // $request = request();\n\n\n\n\n\n $profileImage = $request->file('foto');\n\n\n $usua=User::findOrFail( auth()->user()->id );\n Storage::delete($usua->foto);\n // $datosUsua['foto']= $request->file('foto')->store('uploads','public');\n\n $profileImageSaveAsName = time() . Auth::id() . \"-profile.\" . $profileImage->getClientOriginalExtension();\n \n $upload_path = 'storage/app/public/uploads/';\n $datosUsua = $upload_path . $profileImageSaveAsName;\n $success = $profileImage->move($upload_path, $profileImageSaveAsName);\n\n\n\n }\n \n\n User::where('id','=', auth()->user()->id)->update($datosUsua);\n\n $usua=User::findOrFail(auth()->user()->id);\n\n\n\n// $user->update($request->foto);\nreturn response()->json($usua);\n\n}", "public function store(Request $request)\n {\n\n $image = time().'.'.$request->img->extension();\n\n $request->img->move(public_path('images'), $image);\n\n\n Image::create([\n 'title'=>$request['title'],\n 'desc'=>$request['desc'],\n 'img'=>$image,\n\n\n ]);\n\n return redirect()->route('image.index')->with('success','successfully done');\n\n }", "public function avatarUpload(Request $request)\n {\n $tempFile = $request->file('avatar');\n\n $extension = $tempFile->getClientOriginalExtension();\n\n $user = User::find($request->input('id'));\n\n $success = true;\n\n if ($user) {\n if ($user->photo_url != '' && !is_null($user->photo_url)) {\n $delete = Image::deleteImages($user, 'user-profile-image');\n $success = $delete['success'];\n }\n $tempFile = file_get_contents($tempFile);\n $tempSave = Image::saveTempImage($tempFile, $user->id);\n if (!$tempSave['success']) return response($tempSave);\n $fileDetails = Image::getFileKey($tempSave['file_path'], $user->email, 'user-profile-image');\n $bucket_upload = Image::uploadImageToBucket($fileDetails['filekey'], $fileDetails['path'], $fileDetails['size']);\n\n if ($bucket_upload['success']) {\n $user->photo_url = $bucket_upload['file_path'];\n $user->save();\n\n $user->settings->user_image = $bucket_upload['file_path'];\n $user->settings->save();\n $user_image = $bucket_upload['file_path'];\n } else {\n $success = false;\n $user_image = $user->photo_url;\n }\n } else {\n $user_image = $user->photo_url;\n }\n Image::clearTemps('stage-logo', $user->id);\n if (!$success) return false;\n return response()->json([\n 'result' => $success ? 'success' : 'fail',\n 'user_image' => $user_image\n ]);\n }", "public function imageUpload(Request $request)\n {\n $file = $request->img;\n $filename = \"img_\".date('Ymd_His').\"_\".$file->getClientOriginalName();\n $move_path = 'images/photo/';\n\n $file->move($move_path,$filename);\n return $move_path.$filename;\n }", "public function store(Request $request, $id)\n {\n\n $photos = $request->file('file');\n \n if (!is_array($photos)) {\n $photos = [$photos];\n }\n \n if (!is_dir(public_path('/images'))) {\n mkdir(public_path('/images'));\n }\n \n for ($i = 0; $i < count($photos); $i++) {\n $photo = $photos[$i];\n $name = sha1(date('YmdHis') . str_random(30));\n $save_name = $name . '.' . $photo->getClientOriginalExtension();\n // $resize_name = $name . str_random(2) . '.' . $photo->getClientOriginalExtension();\n \n \n $photo->move(public_path('/images'), $save_name);\n \n $upload = new ProyectoImagen();\n $upload->url = $save_name;\n $upload->proyecto_id = $id;\n $upload->save();\n }\n\n return redirect('/proyectos/image/'.$id);\n\n }", "protected function cropMagic(): void\n {\n $this->image->crop($this->cropWidth, $this->cropHeight, $this->cropLeft, $this->cropTop);\n }", "public function upload($image)\n {\n // $image = Image::make($image)->fit(300);\n // Storage::put($path, (string) $image->encode());\n // return $url = Storage::url($path);\n\n $image_name = time() . rand(1, 100000) . '.' . $image->getClientOriginalExtension();\n $image->move(public_path('images'), $image_name);\n return 'images/' . $image_name;\n }", "public function imageFile()\n {\n $file = substr($this->path(), strrpos($this->path(), '/') + 1);\n return storage_path() . '/app/public/' . $file;\n }", "public function upload_profile_images()\n {\n $this->helper = new Helpers;\n $request = request();\n $user = JWTAuth::toUser($request->token);\n $user_id = $user->id;\n \n if ($request->file('image')) {\n $rules = [\n 'image' => 'required|image|mimes:jpg,png,jpeg,gif',\n ];\n\n $validator = Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n return response()->json(\n [\n 'status_message' => $validator->messages()->first(),\n 'status_code' => '0',\n ]\n );\n }\n\n $file = $request->file('image');\n $path = '/images/users/'.$user_id.'/';\n\n if (UPLOAD_DRIVER == 'cloudinary') {\n $c = $this->helper->cloud_upload($file);\n if ($c['status'] != \"error\") {\n $file_name = $c['message']['public_id'];\n } else {\n return response()->json([\n 'success_message' => $c['message'],\n 'status_code' => \"0\",\n ]);\n }\n }\n else{\n $file_name = $this->helper->fileUpload($file, $path);\n\n //change compress image in 1440*960 \n $this->helper->compress_image(\"images/users/\".$user_id.\"/\".$file_name, \"images/users/\".$user_id.\"/\".$file_name, 80, 1440, 960);\n\n //change compress image in 225*225 \n $li=$this->helper->compress_image(\"images/users/\".$user_id.\"/\".$file_name, \"images/users/\".$user_id.\"/\".$file_name, 80, 225, 225);\n\n //change compress image in 510*510 \n $this->helper->compress_image(\"images/users/\".$user_id.\"/\".$file_name, \"images/users/\".$user_id.\"/\".$file_name, 80, 510, 510);\n\n //change compress image in 1349*402 \n $this->helper->compress_image(\"images/users/\".$user_id.\"/\".$file_name, \"images/users/\".$user_id.\"/\".$file_name, 80, 1349, 402);\n\n //change compress image in 450*250 \n $this->helper->compress_image(\"images/users/\".$user_id.\"/\".$file_name, \"images/users/\".$user_id.\"/\".$file_name, 80, 450, 250);\n } \n }\n ProfilePicture::where('user_id',$user_id)->update(['src'=>$file_name,'photo_source'=>'Local']);\n $pro_pic = @ProfilePicture::where('user_id',$user_id)->first();\n $normal = @$pro_pic->src;\n $small = @$pro_pic->src;\n $large = @$pro_pic->header_src510;\n return response()->json([\n 'success_message' => \"Profile Image Upload Successfully\",\n 'status_code' => \"1\",\n 'normal_image_url' => $normal,\n 'small_image_url' => $small,\n 'large_image_url' => $large,\n 'file_name' => $file_name\n ]);\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 }", "public function store(Request $request)\n {\n //Rules set for the form in order to be validated successfully\n $this->validate($request,\n [\n 'title' => 'required',\n 'body' => 'required',\n 'cover_image' => 'image | max:1999' //Restrictions for image: Must be image | can be null(empty) and max image size 1999KB\n ]);\n $post = new Post;\n $post->title = $request->input('title');\n $post->body = $request->input('body');\n $post->user_id = auth()->user()->id; // Get User ID of logged in User\n\n //Handle File upload\n if($request->hasFile('cover_image')){\n //Get Filename with extension\n $filenameWithExt = $request->file('cover_image')->getClientOriginalName();\n //Get just filename\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME); //PHP method to extract name without extension\n //Get Extension\n $extension = $request->file('cover_image')->getClientOriginalExtension();\n //Filename to store\n $fileNameToStore = $filename . '_' . time() . '.' . $extension; // Unique Filename\n //Upload the image: It will be stored in public > cover_images\n $path = $request->file('cover_image')->move('cover_images', $fileNameToStore);\n //For Laravel 5.3 or higher after creating symlink:\n //Upload the image: It will be stored in Storage > app > public > cover_imagess\n //$path = $request->file('cover_image')->storeAs('public/cover_images', $fileNameToStore);\n $post->cover_image = $fileNameToStore;\n\n }\n else{\n $fileNameToStore = 'noimage.jpg';\n $post->cover_image = $fileNameToStore;\n }\n $post->save();\n return redirect('/posts/')->with('success', 'Post created.');\n }", "public function saveimage(Request $request)\n { \n\n\n }", "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n Image::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->path\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "function image_crop()\n\t{\n\t\t$protocol = 'image_process_'.$this->resize_protocol;\n\t\t\n\t\tif (substr($protocol, -3) == 'gd2')\n\t\t{\n\t\t\t$protocol = 'image_process_gd';\n\t\t}\n\t\t\n\t\treturn $this->$protocol('crop');\n\t}", "public function upload(){\n $file = array('image' => Input::file('avatar'));\n // setting up rules\n $rules = array('image' => 'required',); //mimes:jpeg,bmp,png and for max size max:10000\n // doing the validation, passing post data, rules and the messages\n $validator = Validator::make($file, $rules);\n if ($validator->fails()) {\n return redirect()->route('myprofile')->with(['errors' => $validator->errors()]);\n }else{\n // checking file is valid.\n if (Input::file('avatar')->isValid()) {\n $path = 'public/uploads/users/'.Auth::User()->id.'/avatar/';\n Storage::makeDirectory($path, $mode = 0777, true);\n Storage::disk('local')->put($path, Input::file('avatar'));\n $user = Users::find(Auth::User()->id);\n $createdFileName = Storage::files($path);\n $pathFile = str_replace('public/','',$createdFileName[0]);\n $user->avatar = '/storage/'.$pathFile;\n if ($user->save()){\n return redirect()->route('myprofile')->with(['msg' => 'Image was uploaded with success']);\n }\n }else{\n exit('error');\n }\n }\n }", "public function postPhoto($request){\n /* $this->validate($request, [\n 'post_image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:402400',\n ]); */ \n $data['usermedia'] = new UserMedia();\n \n $userNameFolder = str_replace(' ', '-', Auth::user()->id ); \n $profilePath = public_path('user/'.$userNameFolder.'/post');\n $extension=array(\"jpeg\",\"jpg\",\"png\",\"gif\");\n if (!file_exists($profilePath)) {\n File::makeDirectory($profilePath, $mode = 0777, true, true);\n }\n $last_id=0;\n \n if(!empty($_FILES[\"post_image\"][\"tmp_name\"]))\n { \n \n \n $file_name=str_random(3).'-' .time(). '.jpg';\n \n $file_tmp=$_FILES[\"post_image\"][\"tmp_name\"];\n \n $ext=pathinfo($file_name,PATHINFO_EXTENSION);\n \n if (!file_exists($profilePath)) {\n File::makeDirectory($profilePath, $mode = 0777, true, true);\n }\n \n $filesize = $_FILES['post_image']['size'];\n \n print_r($filesize);\n if(in_array($ext,$extension))\n { \n if(!file_exists($profilePath.\"/\".$file_name))\n { \n if($filesize> 2097152)\n { \n $fileDestination = $profilePath.\"/\".$file_name;\n move_uploaded_file($file_tmp=$_FILES[\"post_image\"][\"tmp_name\"],$fileDestination);\n // optimize\n $compressImg = $profilePath.'/compress-img/';\n if (!file_exists($compressImg)) {\n File::makeDirectory($compressImg, $mode = 0777, true, true);\n }\n $check = $newAlbum->compress($fileDestination,$compressImg.\"/\".$file_name, 20);\n unlink($fileDestination);\n $imageUrl ='/user/'.$userNameFolder.'/post/compress-img/'.$file_name;\n //save image in media\n $usermedia=$data['usermedia']->saveMedia($imageUrl,0);\n $last_id=$usermedia->id;\n }else\n {\n move_uploaded_file($file_tmp=$_FILES[\"post_image\"][\"tmp_name\"],$profilePath.\"/\".$file_name);\n //save image in media\n $imageUrl ='/user/'.$userNameFolder.'/post/'.$file_name;\n $usermedia=$data['usermedia']->saveMedia($imageUrl,0);\n $last_id=$usermedia->id;\n }\n \n } \n }\n else\n {\n array_push($error,\"$file_name,\");\n }\n \n }\n \n \n return $last_id;\n }", "public function uploadImage()\n {\n try {\n if (Input::hasFile('image')) {\n $image = Input::file('image');\n\n $extension = $image->getClientOriginalExtension();\n\n\n $filename = date('Y-m-d-H:i:s') . \"-\" . $image->getClientOriginalName();\n\n $filename = str_replace(\":\",\"_\",$filename);\n\n $imagePath = public_path() . '/images/' . $filename;\n\n $imageConfig = Config::get('app.images.sizes.large');\n\n try {\n $responseImg = Image::make($image->getRealPath())->save($imagePath);\n } catch (Exception $ex) {\n return $this->setStatusCode(500)->respondWithError($ex);\n }\n\n $successResponse = [\n 'status' => true,\n 'message' => 'Image uploaded successfully!',\n 'imageName' => $responseImg->filename . '.' . $extension,\n 'imagePath' => URL::to('/images/' . $responseImg->filename) . '.' . $extension\n ];\n\n return $this->setStatusCode(200)->respond($successResponse);\n } else {\n return $this->setStatusCode(404)->respondWithError(\"Image does not exist or is not in the right format!\");\n }\n\n } catch (Exception $e) {\n return $this->setStatusCode(500)->respondWithError($e);\n }\n\n }", "public function upload_profile_image(Request $request)\n {\n $this->helper = new Helpers;\n $user = JWTAuth::toUser($_POST['token']);\n $user_id = $user->id;\n //ceck uploaded image is set or not\n if(isset($_FILES['image']))\n {\n $errors = array();\n $file_name = time().'_'.$_FILES['image']['name'];\n $type = pathinfo($file_name, PATHINFO_EXTENSION);\n $file_tmp = $_FILES['image']['tmp_name'];\n $dir_name = dirname($_SERVER['SCRIPT_FILENAME']).'/images/users/'.$user_id;\n $f_name = dirname($_SERVER['SCRIPT_FILENAME']).'/images/users/'.$user_id.'/'.$file_name;\n \n //check file directory is created or not\n if(!file_exists($dir_name))\n { //create file directory\n mkdir(dirname($_SERVER['SCRIPT_FILENAME']).'/images/users/'.$user_id, 0777, true);\n }\n if(UPLOAD_DRIVER=='cloudinary')\n {\n $c=$this->helper->cloud_upload($file_tmp);\n if($c['status']!=\"error\")\n {\n $file_name=$c['message']['public_id']; \n }\n else\n {\n return response()->json([\n 'success_message' => $c['message'],\n 'status_code' => \"0\"\n ]);\n }\n }\n else\n {\n //upload image from temp_file to server file\n if(move_uploaded_file($file_tmp,$f_name))\n {\n //change compress image in 1440*960 \n $this->helper->compress_image(\"images/users/\".$user_id.\"/\".$file_name, \"images/users/\".$user_id.\"/\".$file_name, 80, 1440, 960);\n\n //change compress image in 225*225 \n $li=$this->helper->compress_image(\"images/users/\".$user_id.\"/\".$file_name, \"images/users/\".$user_id.\"/\".$file_name, 80, 225, 225);\n\n //change compress image in 510*510 \n $this->helper->compress_image(\"images/users/\".$user_id.\"/\".$file_name, \"images/users/\".$user_id.\"/\".$file_name, 80, 510, 510);\n\n //change compress image in 1349*402 \n $this->helper->compress_image(\"images/users/\".$user_id.\"/\".$file_name, \"images/users/\".$user_id.\"/\".$file_name, 80, 1349, 402);\n\n //change compress image in 450*250 \n $this->helper->compress_image(\"images/users/\".$user_id.\"/\".$file_name, \"images/users/\".$user_id.\"/\".$file_name, 80, 450, 250);\n } \n }\n @ProfilePicture::where('user_id',$user_id)->update(['src'=>$file_name,'photo_source'=>'Local']);\n $pro_pic = @ProfilePicture::where('user_id',$user_id)->first();\n $normal = @$pro_pic->src;\n $small = @$pro_pic->src;\n $large = @$pro_pic->header_src510;\n return response()->json([\n 'success_message' => \"Profile Image Upload Successfully\",\n 'status_code' => \"1\",\n 'normal_image_url' => $normal,\n 'small_image_url' => $small,\n 'large_image_url' => $large,\n 'file_name' => $file_name\n ]);\n }\n \n }", "public function store(Request $request)\n {\n // IMPORTANT: check image size\n\n if ($request->validate([\n 'image' => 'required|image|max:2048'\n ])) {\n\n try {\n\n $image = new AsideImage([\n 'src' => $request->file('image')->store('images'),\n 'image_order' => AsideImage::count('*'),\n 'name' => $request->input('name'),\n 'url' => $request->input('url')\n ]);\n \n $image->save();\n \n return response('Imagen guardada exitosamente', 200);\n } catch (Exception $err) {\n return response($err->getMessage(), 500);\n }\n }\n }", "private function _imgSave(){\r\n\r\n\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($this->hasLogin()){\r\n\r\n /*\r\n \t*\r\n \t*\r\n \t*\tCheck the method used is POST\r\n \t*\r\n \t*\r\n \t*/\r\n \tif($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n $url = strtok($_POST['url'], '?');\r\n\r\n $sourcePath = ROOT.'/site/files/_tmp/'.basename($url);\r\n $img = getimagesize($sourcePath);\r\n $new_name = uniqid();\r\n\r\n switch($img['mime']){\r\n case 'image/png':\r\n $new_name .= '.png';\r\n break;\r\n case 'image/jpeg':\r\n $new_name .= '.jpg';\r\n break;\r\n case 'image/gif':\r\n $new_name .= '.gif';\r\n break;\r\n default:\r\n echo \"Only PNG, JPEG or GIF images are allowed!\";\r\n exit;\r\n }\r\n\r\n $targetPath = ROOT.'/site/files/'.$new_name;\r\n $webPath = WEBROOT.'/site/files/'.$new_name;\r\n\r\n if(rename($sourcePath, $targetPath)){\r\n $result->url = $webPath;\r\n $result->size = [$img[0],$img[1]];\r\n $result->alt = 'an image';\r\n $response = 200;\r\n } else {\r\n $response = 400;\r\n }\r\n\r\n }\r\n }\r\n\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n\r\n }" ]
[ "0.71058506", "0.70651007", "0.67372644", "0.6717091", "0.6568915", "0.65273964", "0.65133256", "0.6492005", "0.6475585", "0.64752233", "0.6472589", "0.64352393", "0.64113545", "0.63901067", "0.6375164", "0.6366815", "0.6363233", "0.6335592", "0.63334024", "0.63281304", "0.63245654", "0.6311861", "0.63017946", "0.62797874", "0.6264672", "0.6160522", "0.6157635", "0.6144657", "0.6123383", "0.6121159", "0.6119293", "0.6115663", "0.6114859", "0.610905", "0.6089744", "0.6079675", "0.6068823", "0.606756", "0.6064776", "0.60522074", "0.6049901", "0.6049328", "0.6043807", "0.6027492", "0.6026808", "0.6024183", "0.6017275", "0.5996644", "0.59942937", "0.5982782", "0.5976297", "0.5966251", "0.59583807", "0.5946725", "0.59445494", "0.5925222", "0.59125936", "0.5895852", "0.58938795", "0.5886763", "0.5882651", "0.5881653", "0.5860407", "0.58528954", "0.5843964", "0.5837708", "0.5833472", "0.5830081", "0.58295035", "0.58249164", "0.5812345", "0.5803319", "0.58031446", "0.57872564", "0.5785164", "0.5780561", "0.5778134", "0.5772332", "0.5771685", "0.5770468", "0.57689965", "0.57606256", "0.57583016", "0.5757841", "0.5753976", "0.5753767", "0.57523096", "0.57414037", "0.5718816", "0.5703768", "0.5701658", "0.5700084", "0.5691837", "0.56873274", "0.56872565", "0.5687159", "0.5684243", "0.56827366", "0.56735194", "0.56713873", "0.5670879" ]
0.0
-1
Make a grid builder.
protected function grid() { $grid = new Grid(new Payment); $grid->disableCreateButton(); $grid->column('id', __('Id')); $grid->column('user_id', __('用户')); // $grid->column('app_id', __('App id')); $grid->column('price', __('金额')); $grid->column('transaction_id', __('三方订单号')); $grid->column('out_trade_no', __('平台订单号')); $grid->column('type', __('订单类型'))->using(['20' => '商城订单']); $grid->column('status', __('状态'))->using(['0' => '未支付', '1' => '已支付', '2' => '未支付']); // $grid->column('other', __('Other')); $grid->column('payment_at', __('支付时间')); $grid->column('created_at', __('创建时间')); $grid->column('updated_at', __('更新时间')); return $grid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function grid()\n {\n $grid = new Grid(new Formulario());\n\n $grid->disableExport();\n\n $grid->column('name', __('Nombre'));\n $grid->column('description', __('Descripción'));\n $grid->column('go_to_formulario', 'Continuar a formulario')->display(function ($formId) {\n if ($formId) {\n $form = Formulario::find($formId);\n return \"<span>{$form['name']}</span>\";\n }\n });\n\n $grid->model()->orderBy('id', 'asc');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Direction());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __(trans('hhx.name')));\n $grid->column('intro', __(trans('hhx.intro')));\n $grid->column('Img', __(trans('hhx.img')))->image();\n $grid->column('status', __(trans('hhx.status')))->using(config('hhx.status'));\n $grid->column('order_num', __(trans('hhx.order_num')));\n $grid->column('all_num', __(trans('hhx.all_num')));\n $grid->column('this_year', __(trans('hhx.this_year')));\n $grid->column('stock', __(trans('hhx.stock')));\n $grid->column('created_at', __(trans('hhx.created_at')));\n $grid->column('updated_at', __(trans('hhx.updated_at')));\n\n return $grid;\n }", "public function getGridBuilder($name);", "protected function grid()\n {\n $grid = new Grid(new Good);\n $grid->column('id', __('Id'))->sortable();\n $grid->column('name', __('名称'));\n $grid->column('unit', __('单位'));\n //$grid->column('list_img', __('商品图片'))->image()->width(10);\n $grid->column('amount', __('价格'));\n $grid->column('created_at', __('创建时间'));\n $grid->disableExport();\n $grid->disableRowSelector();\n $grid->disableFilter();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Activity());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('image', __('Image'));\n $grid->column('user_roles', __('User roles'));\n $grid->column('intro', __('Intro'));\n $grid->column('details', __('Details'));\n $grid->column('start_at', __('Start at'));\n $grid->column('end_at', __('End at'));\n $grid->column('created_at', __('Created at'));\n $grid->column('location', __('Location'));\n $grid->column('fee', __('Fee'));\n $grid->column('involves', __('Involves'));\n $grid->column('involves_min', __('Involves min'));\n $grid->column('involves_max', __('Involves max'));\n $grid->column('status', __('Status'));\n $grid->column('organizers', __('Organizers'));\n $grid->column('views', __('Views'));\n $grid->column('collectors_num', __('Collectors num'));\n $grid->column('is_stick', __('Is stick'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new NewEnergy());\n\n $grid->column('user_id', __('用户'));\n $grid->column('car_id', __('车辆ID'));\n $grid->column('start_mileage', __('开始里程'));\n $grid->column('end_mileage', __('结束里程'));\n $grid->column('mileage', __('里程'));\n $grid->column('type', __('车辆类型'));\n $grid->column('status', __('状态'));\n $grid->column('remark', __('备注'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new MachinesStyle());\n\n $grid->model()->latest();\n \n $grid->column('id', __('索引'))->sortable();\n\n $grid->column('style_name', __('型号名称'))->help('机具的型号名称');\n\n $grid->column('machines_fact.factory_name', __('所属厂商'))->help('机具型号所属的厂商');\n\n // $grid->column('machines_fact.machines_types.name', __('所属类型'))->help('机具型号所属的类型');\n\n $grid->column('created_at', __('创建时间'))->date('Y-m-d H:i:s')->help('机具型号的创建时间');\n\n $grid->column('updated_at', __('修改时间'))->date('Y-m-d H:i:s')->help('机具型号的最后修改时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Enseignant());\n\n $grid->column('id', __('Id'));\n $grid->column('matricule', __('Matricule'));\n $grid->column('nom', __('Nom'));\n $grid->column('postnom', __('Postnom'));\n $grid->column('prenom', __('Prenom'));\n $grid->column('sexe', __('Sexe'));\n $grid->column('grade', __('Grade'));\n $grid->column('fonction', __('Fonction'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new LotteryCode());\n $grid->model()->orderBy('prizes_time', 'desc');\n $grid->id('Id');\n $grid->code('抽奖码');\n $grid->batch_num('批次号');\n $grid->prizes_name('奖品');\n $grid->valid_period('有效期');\n $grid->prizes_time('抽奖时间');\n $grid->award_status('发奖状态')->editable('select', [0 => '未发放', 1 => '已发放']);\n $grid->disableCreateButton();\n $grid->disableActions();\n $grid->filter(function($filter){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n // 在这里添加字段过滤器\n $filter->like('code', '抽奖码');\n $filter->like('batch_num', '批次号');\n $filter->between('prizes_time', '抽奖时间')->datetime();\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Boarding());\n\n $grid->column('id', __('Id'));\n $grid->column('pet.name', __('Pet Name'));\n $grid->column('reservation.date', __('Reservation Date'));\n $grid->column('cage_id', __('Cage Number'));\n $grid->column('end_date', __('End date'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n $grid->filter(function($filter){\n\n $filter->disableIdFilter();\n $filter->like('pet.name', 'Pet Name');\n \n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Engine());\n\n $grid->column('id', __('#'));\n $grid->column('power_station_id', __('Power station'))\n ->display(function ($userId) {\n $u = PowerStation::find($userId);\n if (!$u)\n return \"-\";\n return $u->name;\n })\n ->sortable();\n $grid->column('name', __('Tank Name'));\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new gameLog());\n\n $grid->column('onlyId', ___('OnlyId'));\n $grid->column('bigBlindIndex', ___('BigBlindIndex'));\n $grid->column('gameNums', ___('GameNums'));\n $grid->column('smallBlindIndex', ___('SmallBlindIndex'));\n $grid->column('tableCards', ___('TableCards'));\n $grid->column('tableId', ___('TableId'));\n $grid->column('tableSeat1Str1', ___('TableSeat1Str1'));\n $grid->column('tableSeat1Str2', ___('TableSeat1Str2'));\n $grid->column('tableSeat1Str3', ___('TableSeat1Str3'));\n $grid->column('tableSeat1Str4', ___('TableSeat1Str4'));\n $grid->column('tableSeat1Str5', ___('TableSeat1Str5'));\n $grid->column('tableSeat1Str6', ___('TableSeat1Str6'));\n $grid->column('tableSeat1Str7', ___('TableSeat1Str7'));\n $grid->column('time', ___('Time'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Work);\n\n $grid->id('Id')->sortable();;\n $grid->name(trans('Название'))->sortable();;\n $grid->description(trans('Описание'))->sortable();;\n $grid->order_id(trans('Порядок'))->sortable();;\n\n $grid->paginate(20);\n\n $grid->filter(function($filter){\n $filter->disableIdFilter();\n $filter->like('name', trans('Название'));\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Cate());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('link', __('Link'));\n $grid->column('thumb', __('Thumb'));\n $grid->column('status', __('Status'));\n $grid->column('sort', __('Sort'));\n $grid->column('createtime', __('Createtime'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new BrandCooperation);\n\n $grid->sort('排序')->editable()->sortable();\n $grid->name('品牌名称');\n $grid->is_show('是否显示')->editable('select', [1 => '显示', 0 => '隐藏']);\n $grid->created_at('添加时间')->sortable();\n\n// $grid->actions(function ($actions) {\n// $actions->disableView(); // 禁用查看\n// });\n\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n // 查询\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->like('name', '品牌名称');\n $filter->equal('is_show', '显隐')->radio([1 => '显示', 0 => '隐藏']);\n });\n\n return $grid;\n }", "public function buildGrid() {\n // Processing Grids\n if ($this->getContext('container.grids')) {\n $grids = new VTCore_Bootstrap_Grid_Column($this->getContext('container.grids'));\n $this->addClass($grids->getClass(), 'grids');\n }\n\n return $this;\n }", "protected function grid()\n {\n $grid = new Grid(new Category);\n\n $grid->id('ID');\n $grid->name('Название');\n //$grid->intro_img('Превью');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Activity);\n\n $grid->id('Id');\n $grid->log_name('Log name');\n $grid->description('Description');\n $grid->subject_id('Subject id');\n $grid->subject_type('Subject type');\n $grid->causer_id('Causer id');\n $grid->causer_type('Causer type');\n $grid->properties('Properties');\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n $grid->disableCreateButton();\n\n $grid->actions(function ($actions) {\n $actions->disableEdit();\n $actions->disableView();\n });\n\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n\n $filter->between('created_at', '创建时间')->datetime();\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Banner);\n\n $grid->id('Id');\n $grid->title('Title');\n $grid->image('Image')->display(function($image) {\n return '<img width=\"30\" src=\"' . (env('APP_URL') . '/storage/' . ($image ?: 'images/default.png')) . '\"\"/>';\n });\n $grid->status('Status');\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new $this->currentModel);\n\n $grid->id('ID')->sortable();\n\n $grid->company_id('公司名称')->display(function ($company_id) {\n $company = Company::find($company_id);\n if ($company) {\n return $company->company_name;\n }\n return $company_id;\n });\n $grid->project_name('项目名称')->sortable();\n $grid->link_url('项目链接');\n $grid->display('公开度')->display(function ($display) {\n return $display == 0 ? '公开' : '私密';\n });\n $grid->created_at('添加时间')->sortable();\n\n return $grid;\n }", "protected function constructGrid()\n {\n // jquery script for loading first page of grid\n $table = \"\n <script type=\\\"text/javascript\\\">\n // load first page\n WschangeModelPagination(\n '$this->_id',\n '$this->_action',\n '$this->_modelName',\n '$this->noDataText',\n $this->itemsPerPage,\n $this->showEdit,\n '$this->_order',\n '$this->_formId',\n 0,\n '$this->_id'+'_0',\n '$this->_edit_action',\n '$this->_delete_action'\n );\n </script>\n \";\n\n // container for edit dialog\n if ($this->showEdit) {\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'\"></div>';\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'_new\"></div>';\n }\n\n // title\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-1\">';\n $table .= '<h1>'.$this->_model->metaName.'</h1>';\n $table .= '</div>';\n $table .= '</div>';\n\n // add and search controls\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-2\">';\n $table .= '<form class=\"uk-form uk-form-horizontal\">';\n $table .= '<fieldset data-uk-margin>';\n // new item button\n if ($this->showEdit) {\n $table .= '<button class=\"uk-button uk-button-success\"'\n .' data-uk-modal=\"{target:\\'#'.$this->_formId\n .'_new\\', center:true}\"'\n .' id=\"btn_create_'.$this->_id.'\"'\n .' type=\"button\" onclick=\"WseditModelID('\n .'\\''.$this->_formId.'_new\\', '\n .'\\''.$this->_modelName.'\\', '\n .'0, \\''.$this->_edit_action.'\\')\">';\n $table .= '<i class=\"uk-icon-plus\"></i>';\n $table .= '</button>';\n }\n // search control\n $table .= '<input';\n $table .= ' type=\"text\" id=\"search_'.$this->_id.'\"';\n $table .= '/>';\n $table .= '<button class=\"uk-button\"'\n .' id=\"btn_search_'.$this->_id\n .'\" type=\"button\" onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .'0, \\''.$this->_id.'\\'+\\'_0\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\">';\n $table .= '<i class=\"uk-icon-search\"></i>';\n $table .= '</button>';\n\n $table .= '</fieldset>';\n $table .= '</form>';\n $table .= '</div>';\n $table .= '</div>';\n\n // Grid View table\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-1-1\">';\n $table .= '<div class=\"uk-overflow-container\">';\n $table .= '<table class=\"uk-table uk-table-hover uk-table-striped\">';\n $table .= '<thead>';\n $table .= '<tr>';\n foreach ($this->_model->columns as $column) {\n if (!in_array($column, $this->_model->hiddenColumns)) {\n if (isset($this->_model->columnHeaders[$column])) {\n $table .= '<th>'\n .$this->_model->columnHeaders[$column];\n $table .= '</th>';\n } else {\n $table .= '<th>'.$column.'</th>';\n }\n }\n }\n if ($this->showEdit) {\n $table .= '<th></th>';\n }\n $table .= '</tr>';\n $table .= '</thead>';\n\n // container of table data loaded from AJAX request\n $table .= '<tbody id=\"'.$this->_id.'\"></tbody>';\n\n // end of grid table\n $table .= '</table>';\n $table .= '</div>';\n $table .= '</div>';\n $table .= '</div>';\n\n // get number ow rows from query so that we can make pager\n $db = new WsDatabase();\n $countQuery = 'SELECT COUNT(*) AS nrows FROM '.$this->_model->tableName;\n $result = $db->query($countQuery);\n $this->nRows = intval($result[0]['nrows']);\n $db->close();\n\n // number of items in pager\n $nPages = $this->getPagination($this->nRows);\n\n // construct pager\n $table .= '<ul class=\"uk-pagination uk-pagination-left\">';\n // links to pages\n for ($i = 0; $i < $nPages; $i++) {\n $table .= '<li>';\n $table .= '\n <a id=\"'.$this->_id.'_'.$i.'\"\n href=\"javascript:void(0)\"\n onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .$i.',\\''.$this->_id.'_'.$i.'\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\"/>'\n .($i+1).'</a>';\n $table .= '</li>';\n }\n // end of pager\n $table .= '</ul>';\n\n // end of master div element\n $table .= '<br/>';\n\n $table .= '<script type=\"text/javascript\">'\n .'$(\"#search_'.$this->_id.'\").keydown(function(event) {'\n .' if(event.keyCode == 13) {'\n .' event.preventDefault();'\n .' $(\"#btn_search_'.$this->_id.'\").click();'\n .' }'\n .'});'\n .'</script>';\n\n unset($i, $nPages, $db, $result, $countQuery);\n return $table;\n }", "protected function grid()\n {\n $grid = new Grid(new Clinic());\n\n $grid->column('id', __('Id'))->filter();\n $grid->column('image', __('Image'))->image();\n $grid->column('name', __('Name'))->filter();\n $grid->column('type', __('Type'))->using(['1' => 'Clinic', '2' => 'Hospital'])->filter();\n $grid->column('email', __('Email'))->filter();\n $grid->column('phone', __('Phone'))->filter();\n $grid->column('address', __('Address'))->filter();\n $grid->column('website_url', __('Website url'))->link()->filter();\n $grid->column('profile_finish', __('Profile finish'))->bool()->filter();\n $grid->column('status', __('Status'))->bool()->filter();\n $grid->column('created_at', __('Created at'))->filter();\n $grid->column('updated_at', __('Updated at'))->filter();\n\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Information);\n\n $grid->model()->where('adminuser_id', '=', Admin::user()->id);\n $grid->disableCreateButton();\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('项目名称'));\n $grid->column('content', __('项目简介'))->limit(30);\n $grid->column('industry', __('行业类别'));\n $grid->column('investment', __('投资金额')); \n $grid->column('cont_name', __('资方联系人'));\n $grid->column('cont_phone', __('资方联系方式'));\n $grid->column('staff_name', __('工作人员姓名'));\n $grid->column('staff_phone', __('工作人员电话'));\n $grid->column('created_at', __('上报时间'));\n $grid->column('updated_at', __('更新时间'));\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n // 在这里添加字段过滤器\n $filter->like('name', '项目名称');\n $filter->like('cont_name', '资方联系人');\n $filter->like('content', '项目情况');\n });\n\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order);\n\n $grid->column('id', __('Id'));\n $grid->column('currency', __('Currency'));\n $grid->column('amount', __('Amount'));\n $grid->column('state', __('State'));\n $grid->column('game_id', __('Game id'));\n $grid->column('user_id', __('User id'));\n $grid->column('product_id', __('Product id'));\n $grid->column('product_name', __('Product name'));\n $grid->column('cp_order_id', __('Cp order id'));\n $grid->column('callback_url', __('Callback url'));\n $grid->column('callback_info', __('Callback info'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Dictionary());\n $grid->disableRowSelector();\n $grid->disableExport();\n\n $grid->column('id', __('Id'));\n $grid->column('type', __('Type'))->display(function () {\n return $this->type ? Dictionary::TYPES[$this->type] : null;\n })->label();\n $grid->column('option', __('Option'));\n $grid->column('slug', __('Slug'));\n $grid->column('alternative', __('Alternative'));\n $grid->column('approved', __('Approved'))->switch();\n $grid->column('sort', __('Sort'));\n\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n $filter->expand();\n $filter->where(function ($query) {\n $query->where('dictionaries.type', '=', $this->input);\n }, __('Фильтровать по типу'))->select(Dictionary::TYPES);\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new SpecificationTemplate());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('keys', __('Keys'))->display(function ($keys) {\n return implode(',', $keys);\n });\n $grid->column('content', __('Content'))->display(function ($content) {\n return implode('<br/>', array_map(fn($values) => implode(',', $values), $content));\n });\n $grid->column('sort', __('Sort'))->editable();\n $grid->column('is_display', __('Is display'))->switch();\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n $grid->actions(function (Grid\\Displayers\\Actions $actions) {\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order);\n\n\n //only display paid order\n $grid->model()->whereNotNull('paid_at')->orderBy('paid_at', 'desc');\n\n $grid->no('order number');\n $grid->column('user.name', 'Buyer');\n $grid->total_amount('Total Amount')->sortable();\n $grid->paid_at('Paid Time')->sortable();\n $grid->ship_status('Shipment')->display(function($value) {\n return Order::$shipStatusMap[$value];\n });\n $grid->refund_status('Refund Status')->display(function($value) {\n return Order::$refundStatusMap[$value];\n });\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->disableEdit();\n });\n $grid->tools(function ($tools) {\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Book());\n\n $grid->column('id', __('Id'));\n $grid->author()->display(function($v) {\n return $v['name'];\n });\n $grid->column('title', __('Title'));\n $grid->column('description', __('Description'));\n $grid->column('year', __('Year'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Blog());\n\n $grid->column('id', __('Id'));\n $grid->column('title', __('Title'));\n $grid->column('sub_title', __('Sub title'));\n $grid->column('tag', __('Tag'));\n $grid->column('body', __('Body'));\n $grid->column('posted_by', __('Posted by'));\n $grid->column('posted_at', __('Posted at'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new PointMachine());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('point.name', __('Point name'));\n $grid->column('machine_no', __('Machine no'));\n // 1-自助型 2-全自动型\n $grid->column('type', __('Type'))->display(function ($type) {\n return $type == 1 ? '自助型 ' : '全自动型';\n });\n $grid->column('cost', __('Cost'));\n $grid->column('cost_at', __('Cost at'));\n $grid->column('build_at', __('Build at'));\n $grid->column('remark', __('Remark'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new City());\n\n $grid->column('id', __('Id'));\n $grid->column('sort', __('Sort'));\n $grid->column('name', __('Name'));\n $grid->column('slug', __('Slug'));\n $grid->column('description', __('field.description'))->display(function ($item) {\n return mb_strimwidth($item, 0, 500, '...');\n });\n $grid->column('files', __('field.images'))->display(function () {\n $images = array();\n foreach ($this->files as $file) {\n array_push($images, preg_replace(\"/images\\//\", \"images/small.\", $file->file));\n }\n return $images;\n })->carousel(150, 100);\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Talent);\n\n $grid->column('talents_id', 'ID');\n $grid->column('name', '姓名')->filter('like');\n $grid->column('sex', '性别')->filter('like');\n $grid->column('jobtitle', '工作单位及职务')->filter('like');\n $grid->column('education', '学历学位')->filter('like');\n $grid->column('university', '毕业院校与专业')->filter('like');\n $grid->column('major', '目前的专业/技术特长')->filter('like');\n $grid->column('linkphone', '联系电话')->filter('like');\n $grid->exporter(new TalentExporter());\n $grid->actions(function ($actions) {\n // 去掉查看\n $actions->disableView();\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Resources);\n\n $grid->id('ID');\n $grid->type('类型')->using(Resources::TYPE)->filter(Resources::TYPE);\n $grid->name('名称');\n $grid->url('图片')->image();\n $grid->sort_num('排序')->editable()->sortable();\n $grid->memo('备注');\n\n $grid->disableExport();\n $grid->disableFilter();\n\n $grid->actions(function ($actions) {\n $actions->disableView();\n $actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new SiteHelp);\n\n $grid->model()->latest();\n\n $grid->filter(function ($filter) {\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->equal('site_help_category_id', __('site-help::help.site_help_category_id'))\n ->select(SiteHelpCategory::pluck('name', 'id'));\n $filter->like('title', __('site-help::help.title'));\n $filter->equal('status', __('site-help::help.status.label'))\n ->select(__('site-help::help.status.value'));\n });\n\n $grid->column('thumbnail', __('site-help::help.thumbnail'))->image('', 66);\n $grid->column('id', __('site-help::help.id'));\n $grid->column('category.name', __('site-help::help.site_help_category_id'));\n $grid->column('title', __('site-help::help.title'));\n $grid->column('useful', __('site-help::help.useful'));\n $grid->column('status', __('site-help::help.status.label'))\n ->using(__('site-help::help.status.value'));\n $grid->column('created_at', __('admin.created_at'));\n $grid->column('updated_at', __('admin.updated_at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Platform());\n\n $grid->column('platform_number', __('Platform number'));\n $grid->column('platform_name', __('Platform name'))->label()\n ->expand(function ($model){\n $shops = $model->shops()->get()->map(function ($shop){\n return $shop->only(['shop_number', 'shop_name']);\n });\n\n return new Table([__('Platform number'), __('Platform name')], $shops->toArray());\n });\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n $grid->filter(function ($filter){\n $filter->disableIdFilter();\n $filter->equal('platform_number', __('Platform number'));\n $filter->like('platform_name', __('Platform name'));\n });\n\n $grid->paginate(10);\n\n $grid->disableRowSelector();\n\n $grid->actions(function ($actions){\n $actions->disableView();\n $actions->disableDelete();\n });\n\n return $grid;\n }", "public function getDatagridViewBuilder();", "protected function grid()\n {\n $grid = new Grid(new Barang());\n\n $grid->filter(function($filter){\n $filter->disableIdFilter();\n $filter->like('nama', 'Nama');\n });\n $grid->column('id', __('Id'));\n $grid->column('nama', __('Nama'));\n $grid->column('harga', __('Harga Beli'));\n $grid->column('harga_jual', __('Harga Jual'));\n $grid->column('satuan_id', __('Satuan id'))->display(function($satuan) {\n return Satuan::find($satuan)->nama;\n });\n $grid->column('jumlah_unit', __('Jumlah Unit'));\n $grid->column('parent_id', 'Parent')->display(function($id) {\n if($id) {\n return Barang::find($id)->nama;\n }\n else {\n return null;\n }\n });\n $grid->column('b_pengiriman', __('Pengiriman'));\n $grid->column('b_keamanan', __('Keamanan'));\n // $grid->column('created_at', __('Created at'));\n // $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Collect());\n $grid->disableActions();\n $grid->disableCreateButton();\n $grid->column('name','姓名');\n $grid->column('phone','手机号');\n $grid->column('address','地址');\n $grid->column('time','时间');\n $grid->column('message','备注');\n\n $postsExporter = new ColectExport();\n $postsExporter->fileName = date('Y-m-d H:i:s').'.xlsx';\n $grid->exporter($postsExporter);\n $url = url()->current();\n $url .= \"?_export_=all\";\n $grid->tools(function ($tools)use($grid,$url){\n $tools->append(new Export($grid,$url));\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Customer);\n $grid->model()->where('is_delete',0)->orderBy('id','desc');\n $grid->id('ID')->sortable();\n $grid->code('客户编号');\n $grid->name('客户名称');\n $grid->contactor('联系人');\n $grid->tel('联系电话');\n $grid->email('邮箱');\n $grid->address('地址');\n $grid->receivables('应收账款数字');\n\n $grid->create_time('创建时间')->display(function ($create_time) {\n return date('Y-m-d H:i',$create_time);\n })->sortable();\n\n // 查询过滤\n $grid->filter(function($filter){\n $filter->column(1/2, function ($filter) {\n $filter->like('code', '客户编号');\n $filter->like('name', '客户名称');\n });\n $filter->column(1/2, function ($filter) {\n $filter->like('contactor', '联系人');\n $filter->like('tel', '联系电话');\n $filter->use(new TimestampBetween('create_time','创建时间'))->datetime();\n });\n\n\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Setting());\n\n $grid->column('id', __('Id'));\n $grid->column('member_fee', __('Member fee'));\n $grid->column('task_rate', __('Task rate'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new HhxEquip());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __(trans('hhx.name')));\n $grid->column('hhx_travel_id', __(trans('hhx.hhx_travel_id')))->display(function ($hhx_travel_id){\n return self::getTravelService()->getNameByTravelId($hhx_travel_id);\n });\n $grid->column('status', __(trans('hhx.status')))->select(config('hhx.equip_status'));\n $grid->column('created_at', __(trans('hhx.created_at')));\n $grid->column('updated_at', __(trans('hhx.updated_at')));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Sections());\n\n $grid->column('id', __('ID'))->editable() -> sortable();\n $grid->column('name', __('Nazwa'))->editable() -> sortable();\n $grid->column('pageId', __('ID sekcji (w sensie HTML)'))->editable() -> sortable();\n $grid->column('content', __('Zawartość'))->editable() -> sortable();\n $grid->column('style', __('Style(CSS)'))->editable() -> sortable();\n $grid->column('created_at', __('Utworzono')) -> sortable();\n $grid->column('updated_at', __('Zauktalizowano')) -> sortable() ;\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new MethodPrice);\n\n $grid->id('ID');\n $grid->entity('Сущность')->select(Pest::all()->pluck('name','id'));\n $grid->method('Сущность')->select(Method::all()->pluck('name','id'));\n $grid->chemical('Сущность')->select(Chemical::all()->pluck('name','id'));\n $grid->square_1('Сущность')->select(Chemical::all()->pluck('name','id'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Feedback);\n $grid->column('id', 'ID');\n $grid->column('content', '内容');\n $grid->column('member', '用户')->display(function(){\n return $this->member->nickname;\n });\n $grid->column('created_at', '时间');\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Site());\n\n $grid->id('ID');\n $grid->category()->title('分类');\n $grid->title('标题');\n $grid->thumb('图标')->gallery(['width' => 50, 'height' => 50]);\n $grid->describe('描述')->limit(40);\n $grid->url('地址');\n\n $grid->disableFilter();\n $grid->disableExport();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Goods);\n\n $grid->id('Id');\n $grid->title(trans('admin.title'));\n $grid->slogan(trans('admin.slogan'));\n $grid->name(trans('admin.name'));\n $grid->price(trans('admin.price'))->editable();\n $grid->created_at(trans('admin.created_at'));\n $grid->updated_at(trans('admin.updated_at'));\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n $grid->disableExport();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Activity());\n $grid->model()->orderBy('created_at','desc');\n\n $grid->column('id', __('Id'));\n $grid->column('log_name', __('Log name'))->using($this->log_name);\n $grid->column('description', __('Description'))->limit(10);\n $grid->column('subject_id', __('Subject id'));\n $grid->column('subject_type', __('Subject type'));\n $grid->column('causer_id', __('Causer id'));\n $grid->column('causer_type', __('Causer type'));\n $grid->column('properties', __('Properties'))->display(function ($properties) {\n $properties = [\n '详情' => isset($properties['description']) ? $properties['description'] : '',\n '备注' => isset($properties['remark']) ? $properties['remark'] : '',\n ];\n return new Table([], $properties);\n });\n $grid->column('created_at', __('Created at'))->sortable();\n $grid->column('updated_at', __('Updated at'));\n\n $grid->filter(function ($filter) {\n\n $filter->equal('log_name', __('Log name'))->select($this->log_name);\n\n });\n\n #禁用创建按钮\n $grid->disableCreateButton();\n\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->disableView();\n $actions->disableEdit();\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Usertype());\n\n $grid->column('id', 'ID');\n $grid->column('usertype', '分类名称');\n $grid->column('created_at', '创建时间');\n $grid->column('updated_at', '修改时间');\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableRowSelector();\n $grid->disableColumnSelector();\n $grid->disableActions();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Regional());\n\n $grid->column('id', 'ID');\n $grid->column('logo', 'Logo')->image('', '50', '50');\n $grid->column('name', 'Nama');\n $grid->column('address', 'Alamat');\n $grid->column('created_at', 'Dibuat')->date('d-m-Y');\n $grid->column('updated_at', 'Diubah')->date('d-m-Y');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Plan);\n $grid->model()->whereHas('category');\n\n $grid->column('category.name', __('Категория'));\n $grid->column('count', __('План'))->editable()->sortable();\n $grid->column('month_name', __('Месяц'));\n $grid->column('year', __('Год'))->sortable();\n// $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order());\n\n $grid->column('id', __('Id'));\n $grid->column('trip', __('Trip'))->display(function () {\n return $this->trip->name;\n });\n $grid->column('user', __('User'))->display(function () {\n return $this->user->name . ' ' . $this->user->surname . \" ({$this->user->email})\";\n });\n $grid->column('paid', __('Paid'))->bool()->filter([\n 0 => 'No',\n 1 => 'Yes',\n ]);\n $grid->column('reservation_expires', __('Reservation expires'))->sortable();\n $grid->column('price', __('Price'));\n\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Terrace());\n\n $grid->column('id', __('Id'))->sortable()->style('text-align:center');\n $grid->column('image', __('平台图片'))->style('text-align:center')->image();\n $grid->column('name', __('平台名称'))->style('text-align:center');\n $grid->column('path', __('外链'))->style('text-align:center');\n $grid->column('notice_info', __('提示语'))->style('text-align:center');\n $grid->column('status', __('状态'))->display(function($status){\n return $status == 1 ? '未推荐' : '已推荐';\n })->style('text-align:center');\n $grid->column('created_at', __('创建时间'))->style('text-align:center');\n $grid->disableExport();\n\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->add(new Terracedel());\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new WechatUser);\n\n $grid->column('id', __('ID'));\n $grid->column('nick_name', __('昵称'));\n $grid->column('name', __('用户名'));\n $grid->column('password', __('密码'));\n $grid->column('mobile', __('手机号'));\n $grid->column('mini_program_open_id', __('OpenId'));\n $grid->column('created_at', __('创建时间'));\n $grid->column('updated_at', __('更新时间'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Code());\n\n\n \n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n\n $filter->column(1 / 2, function ($filter) {\n $filter->like('phone', '手机号');\n $filter->like('ip', 'IP');\n });\n\n $filter->column(1 / 2, function ($filter) {\n $filter->between('created_at', '时间范围')->datetime();\n });\n\n\n });\n\n\n // $grid->column('id', __('Id'));\n $grid->column('phone', __('手机号'))->filter('like');\n $grid->column('code', __('验证码'));\n $grid->column('created_at', __('发送时间'));\n $grid->column('used_at', __('使用时间'));\n $grid->column('ip', __('IP'));\n $grid->model()->latest();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Purchase());\n\n $grid->column('id', \"编号\");\n $grid->column('consumer_name', \"客户\")->display(function () {\n return $this->consumer->full_name;\n });\n $grid->column('house_readable_name', \"房源\")->display(function () {\n return $this->house->readable_name;\n });\n $grid->column('started_at', \"生效日期\");\n $grid->column('ended_at', \"结束日期\");\n $grid->column('sell_type', \"出售方式\")->display(function ($sell_type) {\n return Purchase::$type[$sell_type];\n });\n $grid->column('price', \"成交价格\")->display(function ($price) {\n return \"¥$price\";\n });\n $grid->column('created_at', \"创建日期\");\n $grid->column('updated_at', \"更新日期\");\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Specialization);\n\n $grid->id('Id');\n $grid->full_name('Полное найменование');\n $grid->short_name('Краткое найменование');\n $grid->code('Код специальности');\n $grid->cathedra_id('Кафедра')->using(Cathedra::all()->pluck('abbreviation', 'id')->toArray());\n $grid->created_at('Создано');\n $grid->updated_at('Обновлено');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Gys);\n\n $grid->id('Id');\n $grid->name('公司名称');\n $grid->tel('联系人电话');\n $grid->file('营业执照')->display(function ($v){\n $str = '';\n foreach (explode(',',$v) as $item){\n $str.= '<a target=\"_blank\" href=\"'.env('APP_URL').$item.'\"><img src=\"'.env('APP_URL').$item.'\" width=\"100\" style=\"padding:10px;border:solid #eee 1px;border-radius:3px;margin-right:3px\"/></a>';\n }\n return $str;\n });\n $grid->hyzz('资质证书')->display(function ($v){\n $str = '';\n foreach (explode(',',$v) as $item){\n $str.= '<a target=\"_blank\" href=\"'.env('APP_URL').$item.'\"><img src=\"'.env('APP_URL').$item.'\" width=\"100\" style=\"padding:10px;border:solid #eee 1px;border-radius:3px;margin-right:3px\"/></a>';\n }\n return $str;\n });\n $grid->type('类型');\n $grid->username('用户名称');\n $grid->password('密码');\n $grid->created_at('创建时间');\n $grid->updated_at('更新时间');\n $grid->status('账户状态')->radio([\n 0=> '审核中',\n 1=> '审核通过',\n 2=> '冻结账户'\n ]);\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new City());\n\n// $grid->column('id', __('Id'));\n $grid->column('date', __('Дата'));\n $grid->column('name', __('Город'))->display(function () {\n return '<a href=\"/admin/city-users?set='.$this->id.'\">'.$this->name.'</a>';\n });\n $grid->column('image', 'Картинка')->display(function () {\n $str = $this->image!='' ? '<img src=\"/uploads/images/'.$this->image.'\" height=\"100\"/>' : '';\n return $str;\n });\n// $grid->column('text', __('Text'));\n $grid->column('show', 'Активен')->display(function () {\n return $this->show ? 'да' : 'нет';\n });\n// $grid->column('orders', __('Orders'));\n// $grid->column('created_at', __('Created at'));\n// $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Category);\n\n $grid->id('Id');\n $grid->parent_id('父ID');\n $grid->name('名称');\n $grid->order('排序');\n $grid->image('图片');\n $grid->index_template('首页模版');\n $grid->detail_template('详情模版');\n $grid->status('Status')->display(function ($status){\n return $status ? '<p class=\"text-success\">启用</p>' : '<p class=\"text-muted\">禁用</p>';\n });\n $grid->created_at('创建时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Member());\n\n $grid->column('id', 'id')->sortable();\n $grid->column('username','用户名');\n $grid->column('phone', '手机号')->display(function() {\n return substr($this->phone, 0, 3).'****'.substr($this->phone, 7);\n });\n $grid->column('avatar', '头像')->image('', 50, 50);\n $grid->column('created_at', '注册时间')->sortable();\n $grid->disableCreateButton();\n $grid->disableExport();\n $grid->disableActions();\n $grid->filter(function ($filter) {\n\n // 设置created_at字段的范围查询\n $filter->between('created_at', '创建时间')->datetime();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Product);\n\n $grid->id('Id');\n $grid->name('商品名');\n $grid->column('category.name', '品类');\n $grid->fabric('Fabric');\n $grid->gsm('Gsm');\n $grid->material('Material');\n $grid->attach('Attach');\n $grid->head_image('商品图')->image('http://yujiaknit.test/images/', 100, 100);\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n $grid->filter(function ($filter) {\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Feed());\n\n $grid->column('id', __('Id'));\n $grid->column('url', __('url'));\n $grid->column('id_author', __('Id author'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Withdrawal());\n\n $grid->filter(function($filter){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n $filter->like('name', __('分区名称'));\n });\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('uid', __('用户昵称(UID)'))->display(function ($uid) {\n return UsersInfo::where('id',$uid)->value('nickname').\"({$uid})\";\n });\n $grid->column('real_name', __('实名姓名'));\n $grid->column('id_card', __('身份证号码'));\n $grid->column('mobile', __('联系电话'));\n $grid->column('amount', __('提现数量'));\n $grid->column('status', __('状态'))->display(function ($status) {\n return Withdrawal::$status[$status];\n });\n $grid->column('created_at', __('创建时间'));\n $grid->column('updated_at', __('修改时间'));\n\n $grid->disableActions();\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new StationBannerImage());\n\n $grid->column('id', __('Id'));\n $grid->column('station.station_name', __('測站'));\n $grid->column('image', __('輪播圖'))->image('', '50');\n $grid->column('url', __('連結'))->link();\n $grid->column('order', __('排序'));\n $grid->column('valid_at', __('有效日期'));\n $grid->column('mod_user', __('異動人員'));\n $grid->column('updated_at', __('異動時間'));\n\n if (Admin::user()->username != 'admin') {\n $grid->model()->where('station_id', '=', Admin::user()->station_id);\n }\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new KuponGroup);\n\n $grid->column('id', __('ID'))->sortable();\n $grid->column('name',__('Nama'));\n $grid->column('total',__('Jumlah Kupon'));\n $grid->column('amount_per_kupon',__('Nilai Per Kupon'));\n $grid->column('expired',__('Kedaluwarsa'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n return Admin::grid(Classroom::class, function (Grid $grid) {\n\n $grid->id('ID')->sortable();\n\n // $grid->column();\n\n $grid->column('number', '编号');\n $grid->column('name', '名称');\n $grid->column('location', '地点');\n $grid->column('square', '面积');\n $grid->column('floor', '楼层');\n $grid->column('is_free', '是否空闲');\n $grid->column('building_name', '建筑物名称');\n\n $grid->created_at();\n $grid->updated_at();\n });\n }", "protected function grid()\n {\n $grid = new Grid(new Milestone);\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('type', __('Type'))->select(Milestone::TYPE_MAP);\n $grid->column('version', __('Version'));\n $grid->column('content', __('Content'));\n $grid->column('detail', __('Detail'));\n $grid->column('created_at', __('Created at'))->sortable()->hide();\n $grid->column('updated_at', __('Updated at'))->sortable()->hide();\n\n $grid->model()->orderBy('id', 'desc');\n\n $grid->filter(function ($filter) {\n $filter->equal('version', '版本');\n $filter->like('content', '内容');\n $filter->equal('type', '类型')->select(Milestone::TYPE_MAP);\n $filter->between('created_at', '创建时间')->datetime();\n $filter->between('updated_at', '更新时间')->datetime();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Test());\n\n $grid->id('编号');\n $grid->name('教师姓名');\n $grid->work_point('教学分数');\n $grid->science_point('科研分数');\n $grid->disableCreateButton();\n $grid->disableFilter();\n $grid->disableActions();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new UserHealth());\n\n $grid->column('id', __('Id'))->filter();\n $grid->column('height', __('Height'))->filter();\n $grid->column('weight', __('Weight'))->filter();\n $grid->column('blood_pressure', __('Blood pressure'))->filter();\n $grid->column('sugar_level', __('Sugar level'))->filter();\n $grid->column('blood_type', __('Blood type'))->filter();\n $grid->column('muscle_mass', __('Muscle mass'))->filter();\n $grid->column('metabolism', __('Metabolism'))->filter();\n $grid->column('genetic_history', __('Genetic history'))->filter();\n $grid->column('illness_history', __('Illness history'))->filter();\n $grid->column('allergies', __('Allergies'))->filter();\n $grid->column('prescription', __('Prescription'))->filter();\n $grid->column('operations', __('Operations'))->filter();\n $grid->column('user_id', __('User id'))->filter();\n $grid->column('created_at', __('Created at'))->filter();\n $grid->column('updated_at', __('Updated at'))->filter();\n\n return $grid;\n }", "protected function grid()\n { \n \n $grid = new Grid(new Blog);\n\n $grid->id('Id')->sortable();\n $grid->title('标题');\n // $grid->content('内容');\n $grid->logo('图片')->display(function ($value) {\n return \"<img width='50' src='/upload/$value'>\";\n });\n $grid->discuss('评论');\n $grid->display('浏览');\n \n $grid->lab_id('标签')->display(function ($value) {\n $lab_name = Lab::select('lab_name')->where('id',$value)->get();\n \n return $lab_name[0]->lab_name;\n });\n\n $grid->cat_id('分类')->display(function ($value) {\n $cat_name = Cat::select('cat_name')->where('id',$value)->get();\n return $cat_name[0]->cat_name;\n });\n \n\n\n $grid->created_at('添加时间');\n \n $grid->actions(function ($actions){\n $actions->disableView();\n });\n\n $grid->filter(function($filter){\n $filter->like('title', '标题');\n $filter->like('content', '内容');\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new User());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('surname', __('Surname'));\n $grid->column('email', __('Email'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Category());\n $grid->model()->small();\n \n $grid->quickCreate(function (Grid\\Tools\\QuickCreate $create) {\n $create->text('erp_id', 'ERP ID');\n $create->text('name', '小分類名稱');\n $create->select('parent_id', __('中分類'))->options(\n Category::Mid()->pluck('name', 'id')\n );\n $create->text('type','分級(不需改)')->default(3);\n });\n\n $grid->column('erp_id', __('ERP Id'));\n $grid->column('name', __('小分類名稱'));\n $grid->column('parent_id', __('中分類'))->display(function($userId) {\n return Category::find($userId)->name;\n });\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new WechatEvent);\n\n $grid->id('Id');\n $grid->title('事件标题');\n $grid->key('Key');\n $grid->event('事件类型')->using(WechatEvent::EVENTLIST);\n $grid->method('执行方法');\n $grid->column('message.title', '消息标题');\n $grid->created_at('创建时间');\n $grid->updated_at('修改时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Station());\n\n $grid->column('id', __('Id'));\n $grid->column('area.area_name', __(trans('admin.area_name')));\n $grid->column('station_code', __(trans('admin.station_code')));\n $grid->column('station_name', __(trans('admin.station_name')));\n $grid->column('telno', __(trans('admin.telno')));\n $grid->column('order', __(trans('admin.order')));\n $grid->column('valid_at', __(trans('admin.valid_at')));\n $grid->column('mod_user', __(trans('admin.mod_user')));\n $grid->column('updated_at', __(trans('admin.updated_at')));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new GithubRepositories());\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('name', __('项目名'))->limit(20);\n $grid->column('full_name', __('项目全名'))->limit(40);\n $grid->column('description', __('简介'))->limit(60);\n// $grid->column('owner', __('作者资料'));\n $grid->column('html_url', __('网页地址'))->link();\n// $grid->column('original_data', __('原始数据'));\n $grid->column('created_at', __('创建时间'));\n// $grid->column('updated_at', __('更新时间'));\n\n //快捷搜索\n $grid->quickSearch('name', 'full_name', 'description');\n\n //倒叙\n $grid->model()->orderBy('id', 'desc');\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Product);\n\n $grid->column('id', __('Id'));\n $grid->column('type.name', __('分类名称'));\n $grid->column('recommend.name', __('推荐名称'));\n $grid->column('name', __('产品名称'));\n $grid->column('description', __('产品描述'));\n $states = [\n 'off' => ['value' => 0, 'text' => '否', 'color' => 'danger'],\n 'on' => ['value' => 1, 'text' => '是', 'color' => 'success'],\n ];\n $grid->column('pop', __('推荐'))->switch($states);\n $grid->column('logo','logo图')->display(function (){\n if ($this->logo){\n return '<div class=\"pop\"><img src='.env('APP_URl').'/uploads/'.$this->logo.' style=\"width:100px;height:100px;\"></div>';\n }else{\n return ;\n }\n });\n $grid->column('price', __('价格'));\n $grid->column('updated_at', __('更新时间'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Student);\n\n $grid->id('Id');\n $grid->surname('Фамилия');\n $grid->name('Имя');\n $grid->family_name('Отчество');\n $grid->telegram_id('Telegram-id');\n $grid->email('Email');\n $grid->number('Контактный телефон');\n $grid->groups_id('Группа')->using(Group::all()->pluck('name', 'id')->toArray());\n $grid->created_at('Создание записи');\n $grid->updated_at('Редактирование записи');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Goods);\n $grid->id('ID')->sortable();\n $grid->name('名称');\n $grid->type('分类')->display(function($status) {\n $arr = (new AdminModel('goods_type'))->getAll('',['type','id']);\n foreach ($arr as $key => $value) {\n if($status==$value['id']) return $value['type']; \n }\n \n });\n $grid->cover('商品大图')->image('',70, 70);\n $grid->image('详情图')->image('',70, 70);\n $grid->stock('库存');\n $grid->price('积分价格');\n $grid->status('状态')->display(function($status) {\n if($status==1) return \"上架中\";\n if($status==0) return \"已下架\"; \n });\n $grid->disableExport();//禁用导出数据按钮\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();//禁用查询过滤器\n });\n \n \n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new $this->currentModel);\n\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n //$filter->disableIdFilter();\n\n // 在这里添加字段过滤器\n $filter->like('title_designer_cn', '标题(设计师)');\n $filter->like('title_name_cn', '标题(项目名称)');\n $filter->like('title_intro_cn', '标题(项目介绍)');\n\n });\n\n $grid->id('ID')->sortable();\n $grid->title_designer_cn('标题(中)')->display(function () {\n return CurrentModel::formatTitle($this, 'cn');\n });\n $grid->title_designer_en('标题(英)')->display(function () {\n return CurrentModel::formatTitle($this, 'en');\n });\n $grid->article_status('状态')->display(function ($article_status) {\n switch ($article_status) {\n case '0' :\n $article_status = '草稿';\n break;\n case '1' :\n $article_status = '审核中';\n break;\n case '2' :\n $article_status = '已发布';\n break;\n }\n return $article_status;\n });\n $grid->release_time('发布时间')->sortable();\n \n // $grid->column('created_at', __('发布时间'));\n $grid->created_at('添加时间')->sortable();\n // $grid->column('updated_at', __('添加时间'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new WechatMessage);\n\n $grid->id('Id');\n $grid->msg_type('消息类型');\n $grid->media_id('素材id');\n $grid->title('标题');\n $grid->created_at('创建时间');\n $grid->updated_at('修改时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new User());\n\n $grid->column('id', __('field.id'));\n $grid->column('name', __('Name'));\n $grid->column('email', __('Email'));\n $grid->column('email_verified_at', __('Email verified at'));\n $grid->column('password', __('Password'));\n $grid->column('remember_token', __('Remember token'));\n $grid->column('point', __('Point'));\n $grid->column('status', __('field.status'));\n $grid->column('created_at', __('field.created_at'));\n $grid->column('updated_at', __('field.updated_at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Product);\n $grid->model()->where('type',$this->getProductType())->orderBy('id','desc');\n //调用自定义的Grid\n\n $this->customGird($grid);\n $grid->actions(function ($actions) {\n $actions->disableView();\n $actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new News);\n\n $grid->id('Id');\n $grid->title('题目');\n $grid->category_id('分类ID');\n // $grid->content('内容');\n $grid->thumbnail('封面图');\n $grid->status('状态');\n $grid->read_count('阅读数量');\n $grid->created_at('创建时间');\n $grid->updated_at('更新时间');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new DbTop());\n $grid->header(function ($query) {\n $alread = DbTop::whereStatus(1)->count();\n $notyet = DbTop::whereStatus(0)->count();\n $notok = DbTop::whereStatus(2)->count();\n $pan = DbTop::where('pan_url', '<>', '')->count();\n $x = '已看:' . $alread . '<br />未看:' . $notyet . '<br />不感兴趣:' . $notok . '<br />资源:' . $pan;\n return '<div class=\"alert alert-success\" role=\"alert\">' . $x . '</div>';\n });\n $grid->column('no', __(trans('hhx.no')))->display(function ($no) {\n return 'No.' . $no;\n });\n $grid->column('img', __(trans('hhx.img')))->image();\n $grid->column('c_title', __(trans('hhx.c_title')))->display(function () {\n return $this->c_title . ' ' . $this->year;\n });\n $grid->column('rating_num', __(trans('hhx.rating_num')));\n $grid->column('inq', __(trans('hhx.inq')));\n $grid->column('actor', __(trans('hhx.actor')));\n $grid->column('type', __(trans('hhx.type')));\n $grid->column('status', __(trans('hhx.status')))->select(config('hhx.db_status'));\n $grid->filter(function ($filter) {\n $filter->like('c_title', '中文名');\n $filter->like('year', '年');\n $filter->like('status', trans('hhx.status'))->select(config('hhx.db_status'));\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Drug);\n\n $grid->id('ID');\n $grid->street_name('«Уличное» название');\n $grid->city('Город');\n $grid->column('photo_drug','Фотография наркотика')->display(function () {\n $photo = Photo::whereDrugId($this->id)->where('type', 0)->first();\n\n if ($photo) {\n return $photo->photo;\n } else {\n return '';\n }\n })->image();\n\n $grid->column('confirm', 'Подтверждение')->display(function ($confirm) {\n if ($confirm) {\n return '✅Подтверждено';\n } else {\n return '❌Не подтверждено';\n }\n });\n $grid->updated_at('Дата изменения');\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Profile());\n\n $grid->column('id', __('ID'))->sortable();\n $grid->column('name', __('ID'))->sortable();\n $grid->column('surname', __('ID'))->sortable();\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new ProductSku);\n\n $grid->column('id', 'ID');\n $grid->column('name', 'sku名称')->editable();\n $grid->column('sku_number', 'sku编号')->editable();\n // $grid->column('description', 'sku描述');\n $grid->product(\"所属商品\")->display(function ($product) {\n return $product['name'];\n });\n $grid->column('price', '原价')->editable();\n $grid->column('stock', '库存量')->editable();\n $grid->column('is_on_sale', '是否上架')->using([0 => '否', 1 => '是']);\n $grid->column('primary_picture', '商品主图');\n $grid->column('retail_price', '零售价格')->editable();\n $grid->column('is_promotion', '是否促销')->using([0 => '否', 1 => '是']);\n $grid->column('promotion_price', '促销价格')->editable();\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Leavetime());\n $grid->filter(function ($filter) {\n $filter->like('designer.name', '设计师');\n $filter->between('created_at','创建时间')->datetime();\n });\n $grid->column('id', __('Id'));\n $grid->column('designer.name', __('设计师'));\n $grid->column('type', __('请假类型'))->display(function ($value) {\n return $value ? '半天' : '全天';\n });\n $grid->column('date', __('请假日期'));\n $grid->column('time', __('时间段'))->display(function ($time) {\n $html = '';\n foreach ($time as $k => $value){\n $work = Worktime::where('id','=',$value)->first();\n if($work){\n $html .= \"<span class='label label-success' style='margin-left: 10px'>{$work['time']}</span>\";\n }else{\n $html = '';\n }\n\n }\n return $html;\n });\n $grid->column('created_at', __('创建日期'));\n $grid->actions(function ($actions) {\n $actions->disableView();\n //$actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n $grid->model()->orderBy('id', 'desc');\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new ProductSku());\n\n $grid->column('id', __('Id'));\n $grid->column('product', __('产品'))->display(function ($product){\n return $product['title'];\n });\n $grid->column('title', __('Title'));\n $grid->column('description', __('Description'));\n $grid->column('price', __('Price'));\n $grid->column('stock', __('Stock'));\n $grid->column('options', __('sku规格'))->display(function ($options){\n if (count($options) > 0){\n $strOption = '';\n foreach ($options as $option) {\n $strOption .= \"<p>{$option['product_property_name']}:{$option['product_property_value']}</p>\";\n }\n return $strOption;\n }\n return '';\n });\n\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Order);\n // 只展示已支付的订单,并且默认按支付时间倒序排序\n $grid->model()->whereNotNull('paid_at')->orderBy('paid_at', 'desc');\n\n $grid->no('订单流水号');\n //展示关联关系的字段时,使用column方法\n $grid->column('user.name','买家');\n $grid->total_amount('总金额')->sortable();\n $grid->paid_at('支付时间')->sortable();\n $grid->ship_status('物流')->display(function($value) {\n return Order::$shipStatusMap[$value];\n });\n $grid->refund_status('退款状态')->display(function($value) {\n return Order::$refundStatusMap[$value];\n });\n // 禁用创建按钮,后台不需要创建订单\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n // 禁用删除和编辑按钮\n $actions->disableDelete();\n $actions->disableEdit();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n// return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new SkuModel);\n\n $grid->column('s_id', __('skuid'));\n $grid->column('sku_num', __('编号'));\n $grid->column('goods_id', __('商品id'));\n $grid->column('sku_name', __('sku名称'));\n $grid->column('sku_price', __('Sku价格'));\n $grid->column('sku_goods_repertory', __('库存'));\n $grid->column('sku_goods_img', __('照片'))->image();\n $grid->column('created_at', __('添加时间'));\n $grid->column('updated_at', __('修改时间'));\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new StockProduct);\n\n $grid->column('id', __('Id'));\n // $grid->column('product_id', __('Product id'))->modal('Product Name', function($model){\n // $products = $model->product()->get()->map(function($product) {\n // return $product->only('id','product_name');\n // });\n // return new Table(['ID', 'Product Name'], $products->toArray());\n // });\n $grid->column('product.product_name', __('Name'));\n $grid->column('moq', __('Moq'));\n $grid->column('quantity', __('Quantity'));\n $grid->column('price', __('Price'));\n $grid->column('note', __('Note'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Project());\n $grid->model()->orderBy('id', 'desc');\n $grid->id('ID')->sortable();\n $grid->name('项目名称')->editable();\n $grid->url('项目地址')->link();\n $grid->username('账号');\n $grid->password('密码');\n $status = [\n 'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '禁用', 'color' => 'danger'],\n ];\n $grid->status('状态')->switch($status);\n $grid->created_at('创建时间');\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableRowSelector();\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new Subscribe());\n $grid->column('number', __('商品编号'));\n $grid->column('name', __('商品名称'));\n $grid->column('subtitle', __('商品副标题'));\n $grid->column('price', __('单价'));\n $grid->column('quantity', __('库存'));\n $grid->column('type', __('分类'));\n $grid->column('status', __('状态'));\n $grid->column('recommend', __('推荐'));\n $grid->column('sold', __('总售量'));\n $grid->column('integral', __('返还碳积分'));\n $grid->column('emission', __('返还碳减排'));\n $grid->column('place', __('地点'));\n $grid->column('maintenance', __('养护'));\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new GroupTask());\n $grid->column('name', __('messages.name'));\n $grid->column('active', __('messages.active'))->switch();\n $grid->column('sort', __('messages.sort'))->editable();\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new HotRank());\n\n// $grid->column('id', __('Id'));\n $grid->column('sort', __('排序'))->editable();\n $grid->column('nickname', __('昵称'));\n $grid->column('avatar', __('头像'))->image();\n $grid->column('gender', __('性别'))->using([\n 1 => '男',\n 2 => '女'\n ]);\n// $grid->column('role', __('Role'));\n// $grid->column('intro', __('Intro'));\n $grid->column('fans', __('粉丝数'));\n $grid->column('red_book_link', __('小红书链接'));\n $grid->column('red_book_fans', __('小红书粉丝'));\n $grid->column('douyin_link', __('抖音链接'));\n $grid->column('douyin_fans', __('抖音粉丝'));\n $grid->column('created_at', __('创建时间'));\n $grid->actions(function ($actions) use ($grid) {\n // 去掉删除\n// $actions->disableDelete();\n// // 去掉编辑\n// $actions->disableEdit();\n // 去掉查看\n $actions->disableView();\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new TaskOrder);\n $grid->model()->orderBy('id', 'desc');\n $grid->filter(function($filter){\n $filter->disableIdFilter();\n $filter->equal('eid','快递单号')->integer();\n $filter->equal('store','快递网点')->select(storedatas(1));\n $filter->equal('etype','快递公司')->select(edatas());\n $filter->equal('sname','客服名称');\n $filter->between('created_at', '导入时间')->datetime();\n });\n $grid->id('ID');\n $grid->eid('快递单号');\n $grid->sname('客服名称');\n $grid->store('快递网点');\n $grid->etype('快递公司');\n\n $grid->created_at('分配时间');\n //$grid->updated_at('分配时间');\n $excel = new ExcelExpoter();\n $excel->setAttr([ '快递单号','快递网点','快递公司','负责客服','导入时间'], ['eid','store','etype','sname','created_at']);\n $grid->exporter($excel);\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new AnswerList);\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('title', trans('admin.title_answer'))->width(500);\n $grid->column('A', trans('admin.A'))->width(150);\n $grid->column('B', trans('admin.B'))->width(150);\n $grid->column('C', trans('admin.C'))->width(150);\n $grid->column('D', trans('admin.D'))->width(150);\n $grid->column('correct', trans('admin.correct'))->width(100);\n $grid->column('status', trans('admin.status'))->using(AnswerList::STATUSES)->label(['warning', 'primary']);\n $grid->column('created_at', trans('admin.created_at'));\n $grid->column('updated_at', trans('admin.updated_at'));\n\n $grid->filter(function ($filter){\n $filter->disableIdFilter();\n $filter->column(1 / 2, function ($filter) {\n $filter->equal('id', __('Id'));\n });\n $filter->column(1 / 2, function ($filter) {\n $filter->like('title', trans('admin.title'));\n });\n });\n\n return $grid;\n }", "protected function grid()\n {\n $grid = new Grid(new userWhitelist());\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n $filter->like('accountName', ___('accountName'));\n });\n $grid->column('id', ___('Id'));\n $grid->column('accountId', ___('AccountId'));\n $grid->column('accountName', ___('AccountName'));\n $grid->column('nickName', ___('NickName'));\n\n return $grid;\n }", "protected function grid()\n {\n $Adv=new Adv();\n $grid = new Grid($Adv);\n\n $platform= $Adv->platform;\n $type= $Adv->type;\n $status= $Adv->status;\n\n $list_array=[\n array(\"field\"=>\"title\",\"title\"=>\"标题\",\"type\"=>\"value\"),\n array(\"field\"=>\"platform\",\"title\"=>\"平台\",\"type\"=>\"array\",\"array\"=>$platform),\n array(\"field\"=>\"type\",\"title\"=>\"类型\",\"type\"=>\"array\",\"array\"=>$type),\n array(\"field\"=>\"image\",\"title\"=>\"图片\",\"type\"=>\"image\"),\n array(\"field\"=>\"start_time\",\"title\"=>\"活动开始时间\",\"type\"=>\"value\"),\n array(\"field\"=>\"end_time\",\"title\"=>\"活动结束时间\",\"type\"=>\"value\"),\n array(\"field\"=>\"status\",\"title\"=>\"状态\",\"type\"=>\"array\",\"array\"=>$status),\n array(\"field\"=>\"created_at\",\"title\"=>\"创建时间\",\"type\"=>\"value\")\n ];\n BaseControllers::setlist_show($grid,$list_array);\n\n $grid->filter(function($filter) use($platform,$type){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->in('platform', \"平台\")->multipleSelect($platform);\n $filter->in('type', \"类型\")->multipleSelect($type);\n });\n return $grid;\n }" ]
[ "0.72541326", "0.7218252", "0.7064843", "0.70040804", "0.6995721", "0.69847125", "0.695367", "0.6928443", "0.6927314", "0.69256824", "0.6923453", "0.69233567", "0.6922796", "0.6907988", "0.6889554", "0.6888196", "0.6878719", "0.6845261", "0.68254143", "0.6818076", "0.6810526", "0.6801908", "0.68007404", "0.6792371", "0.67900723", "0.6785066", "0.67814827", "0.67809147", "0.6773841", "0.67679495", "0.6767842", "0.67664576", "0.67600983", "0.6759144", "0.6747873", "0.67451704", "0.6735288", "0.6732706", "0.6727944", "0.6718374", "0.6718129", "0.67142314", "0.6713679", "0.67077774", "0.66969377", "0.66829485", "0.6681708", "0.66795236", "0.66743", "0.6665543", "0.66581196", "0.6655195", "0.6648576", "0.6647211", "0.6639091", "0.6634314", "0.66231555", "0.6622456", "0.6605076", "0.6601071", "0.6595102", "0.6593814", "0.65931946", "0.6590833", "0.65907514", "0.65832734", "0.657433", "0.6573453", "0.65642095", "0.65639156", "0.655778", "0.65577185", "0.6556319", "0.6553949", "0.6552593", "0.6549884", "0.6542962", "0.65393496", "0.65337956", "0.6528965", "0.6526889", "0.65218806", "0.650997", "0.6508564", "0.65050364", "0.6498207", "0.6491189", "0.647587", "0.6474169", "0.6469046", "0.6464774", "0.6463954", "0.64510244", "0.6450445", "0.6450348", "0.64481837", "0.64450586", "0.6444865", "0.6443929", "0.64308834" ]
0.6595906
60
Make a show builder.
protected function detail($id) { $show = new Show(Payment::findOrFail($id)); $show->field('id', __('Id')); $show->field('user.nickname', __('用户')); $show->field('app_id', __('App id')); $show->field('price', __('金额')); $show->field('transaction_id', __('三方订单号')); $show->field('out_trade_no', __('平台订单号')); $show->field('type', __('订单类型')); $show->field('status', __('状态')); $show->field('other', __('Other')); $show->field('payment_at', __('支付时间')); $show->field('created_at', __('创建时间')); $show->field('updated_at', __('更新时间')); return $show; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function buildShowLayout(): void;", "public function buildShowLayout()\n {\n $this->addSection('Section', function(ShowLayoutSection $section) {\n $section->addColumn(6, function(ShowLayoutColumn $column) {\n $column->withSingleField('id');\n $column->withSingleField('name');\n $column->withSingleField('url');\n $column->withSingleField('vendor_id');\n $column->withSingleField('parent_id');\n $column->withSingleField('created_at');\n $column->withSingleField('updated_at');\n });\n })->addEntityListSection('products', 'products');\n }", "function Show()\n {}", "public static function builder();", "public function buildShowFields()\n {\n $this->addField(\n SharpShowTextField::make('id')\n ->setLabel('Id:')\n )->addField(\n SharpShowTextField::make('name')\n ->setLabel('name:')\n )->addField(\n SharpShowTextField::make('url')\n ->setLabel('url:')\n )->addField(\n SharpShowTextField::make('vendor_id')\n ->setLabel('vendor_id')\n )->addField(\n SharpShowTextField::make('parent_id')\n ->setLabel('parent_id')\n )->addField(\n SharpShowTextField::make('created_at')\n ->setLabel('Created At:')\n )->addField(\n SharpShowTextField::make('updated_at')\n ->setLabel('Updated At:')\n )->addField(\n SharpShowEntityListField::make('products', 'product')\n ->hideFilterWithValue('category', function($instanceId) {\n return $instanceId;\n })\n ->showEntityState(false)\n ->showReorderButton(true)\n ->showCreateButton(false)\n );\n }", "public function show() {\n \n }", "public function show();", "public function show();", "public function show();", "public function show();", "public function show() {\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t\n\t}", "abstract protected function show();", "public function show()\n\t{\n\n\t}", "public function show($show)\n {\n \n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "abstract function buildShowFields(): void;", "public function show()\n {\n //\n }", "public function show()\n {\n \n }", "public function show()\n {\n \n }", "public function show() {\n \n \n }", "function Show()\r\n\t{\r\n\r\n\t}", "public function show()\n\t{\n\t\treturn $this;\n\t}", "public function Show(){\n\t\techo(\"\n\t\t<div class='$this->claseCSS'>\n\t\t<div class='WidgetTitle'><a id='TitleBlock' href='$this->masURL'><div id='TitleText'>$this->Titulo</div></a></div>\n\t\t\t$this->Contenido\n\t\t\t<div class='footer'><a href='$this->masURL'>Ver m&aacute;s...</a></div>\n\t\t</div>\n\t\t\");\n\t}", "public function show()\n {\n \n }", "public function show()\n {\n \n }", "public function show()\n {\n\n }", "public function makeView() {\n\t\treturn \n\t\t\t$this->getView()\n\t\t\t\t->with('option', $this);\n\t}", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n {\n\n }", "public function show()\n { \n \n }", "function show()\n {\n }", "public function show()\n { \n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public static function builder() {\n\t\treturn new Builder();\n\t}", "public function show_box()\n\t\t{\n\t\t\techo '<div id=\"mfn-wrapper\">';\n\t\t\t\techo '<input type=\"hidden\" name=\"mfn-builder-nonce\" value=\"'. wp_create_nonce('mfn-builder-nonce') .'\" />';\n\t\t\t\tmfn_builder_show();\n\t\t\techo '</div>';\n\t\t}", "public function createBuilder();", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "public function display() {\r\n $this->_display->show();\r\n\r\n return $this;\r\n }", "public function show(){\n\n }", "public function show(){\n\n }", "public function show()\n {\n new $this->controller();\n }", "public function show()\n {\n //\n }", "public function show(Menu_builder $menu_builder)\n {\n //\n }", "public function getBuilder();", "public static function builder() {\n return new self();\n }", "public function show()\n {\n return view('scaffold::show');\n }", "function buildShowConfig(): void\n {\n // No default implementation\n }", "function show(){\n\t}", "public function build() {\n\t\t$this->add($this->Html->A(array('href' => 'http://cakephp.org', 'target' => '_blank', 'text' => 'CakePHP')));\n\t\t$this->add($this->Html->Abbr(array('text' => __('This is an abrreviation'))));\n\t\t$this->add($this->Html->Address(array('text' => __('This is an address'))));\n\t\t$this->add($this->Html->B(array('text' => __('This is bold text'))));\n\t\t$this->add($this->Html->Bdo(array('name' => 'value')));\n\t\t$this->add($this->Html->Blockquote(array('text' => __('This is a block quote'))));\n\t\t$this->add($this->Html->Br());\n\t\t$this->add($this->Html->Button(array('value' => __('This is a button'))));\n\t\t$this->add($this->Html->Cite(array('text' => __('This is a citation'))));\n\t\t$this->add($this->Html->Code(array('text' => __('This is a code block'))));\n\t\t$this->add($this->Html->Comment(array('text' => __('This is a comment'))));\n\t\t$this->add($this->Html->Del(array('text' => __('This is deleted text'))));\n\t\t$this->add($this->Html->Dfn(array('text' => __('This is a definition'))));\n\t\t$this->add($this->Html->Div(array('text' => __('This is a division'))));\n\t\t$dl = $this->Html->Dl(array('text' => __('This is a defined list')));\n\t\t$dl->add($this->Html->Dt(array('text' => __('This is a definition title'))));\n\t\t$dl->add($this->Html->Dd(array('text' => __('This is a definition data'))));\n\t\t$this->add($dl);\n\t\t$this->add($this->Html->Em(array('text' => __('This is text with emphasis'))));\n\t\t$form = $this->Html->Form(array('name' => 'example'));\n\t\t\t$fieldset = $this->Html->Fieldset();\n\t\t\t$fieldset->add($this->Html->Legend(array('text' => __('This is a legend of a fieldset'))));\n\t\t\t$fieldset->add($this->Html->Label(array('text' => __('This is a label'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'text', 'type' => 'text', 'value' => __('This is a text input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'password', 'type' => 'password', 'value' => __('This is a password input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'radio', 'type' => 'radio', 'value' => 'radio')));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'checkbox', 'type' => 'checkbox', 'value' => 'checkbox')));\n\t\t\t$fieldset->add($this->Html->Textarea(array('name' => 'textarea', 'text' => __('This is a textarea'))));\n\t\t\t\t$select = $this->Html->Select(array('name' => 'select'));\n\t\t\t\t\t$optgroup = $this->Html->Optgroup(array('label' => __('This is an option group')));\n\t\t\t\t\t$optgroup->add($this->Html->Option(array('value' => 123, 'text' => __('This is an option'))));\n\t\t\t\t$select->add($optgroup);\n\t\t\t$fieldset->add($select);\n\t\t$form->add($fieldset);\n\t\t$this->add($form);\n\t\t$this->add($this->Html->Hr());\n\t\t$this->add($this->Html->I(array('text' => __('This is text in italics'))));\n\t\t$this->add($this->Html->Iframe(array('name' => 'ctk', 'src' => 'https://github.com/jameswatts/cake-toolkit')));\n\t\t$this->add($this->Html->Img(array('src' => 'http://cakephp.org/img/cake-logo.png', 'alt' => 'CakePHP')));\n\t\t$this->add($this->Html->Ins(array('text' => __('This is inserted text'))));\n\t\t$this->add($this->Html->Kbd(array('text' => __('This is keyboard text'))));\n\t\t$map = $this->Html->Map();\n\t\t$map->add($this->Html->Area());\n\t\t$this->add($map);\n\t\t$this->add($this->Html->Noscript(array('text' => __('This is displayed if you do not have JavaScript enabled'))));\n\t\t$object = $this->Html->Object();\n\t\t$object->add($this->Html->Param(array('name' => 'example', 'value' => 123)));\n\t\t$this->add($object);\n\t\t$this->add($this->Html->P(array('text' => __('This is a paragraph of text'))));\n\t\t$this->add($this->Html->Pre(array('text' => __('This is preformatted text'))));\n\t\t$this->add($this->Html->Q(array('text' => __('This is a quotation'))));\n\t\t$this->add($this->Html->S(array('text' => __('This is a strike-through text'))));\n\t\t$this->add($this->Html->Samp(array('text' => __('This is a sample text'))));\n\t\t$this->add($this->Html->Small(array('text' => __('This is small text'))));\n\t\t$this->add($this->Html->Span(array('text' => __('This is a span'))));\n\t\t$this->add($this->Html->Strong(array('text' => __('This is a strong text'))));\n\t\t$this->add($this->Html->Style(array('name' => 'value')));\n\t\t$this->add($this->Html->Sub(array('text' => __('This is a sub-text'))));\n\t\t$this->add($this->Html->Sup(array('text' => __('This is a super-text'))));\n\t\t$table = $this->Html->Table(array('border' => 1));\n\t\t$table->add($this->Html->Caption(array('text' => __('This is a table caption'))));\n\t\t\t$colgroup = $this->Html->Colgroup();\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$tbody = $this->Html->Tbody();\n\t\t\t\t$tr = $this->Html->Tr();\n\t\t\t\t$tr->add($this->Html->Th(array('text' => __('This is a table header'))));\n\t\t\t\t$tr->add($this->Html->Td(array('text' => __('This is a table data'))));\n\t\t\t$tbody->add($tr);\n\t\t$table->add($colgroup);\n\t\t$table->add($tbody);\n\t\t$this->add($table);\n\t\t$ol = $this->Html->Ol();\n\t\t$ol->add($this->Html->Li(array('text' => __('This is an ordered list item'))));\n\t\t$this->add($ol);\n\t\t$ul = $this->Html->Ul();\n\t\t$ul->add($this->Html->Li(array('text' => __('This is an unordered list item'))));\n\t\t$this->add($ul);\n\t\t$this->add($this->Html->Var(array('text' => __('This is a variable'))));\n\t}", "protected function setupShowOperation()\n {\n $this->crud->set('show.setFromDb', false);\n\n CRUD::addColumn([\n 'name' => 'description',\n 'label' => 'Description',\n 'type' => 'string'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'items',\n 'label' => 'Code Items',\n 'type' => 'table',\n 'columns' => [\n 'description' => 'Description',\n 'show_is_visible' => 'Is Visible'\n ]\n ]);\n\n CRUD::addColumn([\n 'name' => 'is_visible',\n 'label' => 'Is Visible',\n 'type' => 'boolean'\n ]);\n }", "public function __construct(bool $show = false)\n {\n $this->show = $show;\n }", "public static function build() {\n return new Builder();\n }", "public function setShow($val = 'null')\n {\n $this->addParams('show', $val);\n\n return $this;\n }", "public function show()\n {\n return view(\n 'manager/job-builder-root'\n )->with([\n 'title' => Lang::get('manager/job_builder.title'),\n ]);\n }", "public function show() {\n echo $this->mountElement();\n }", "public function builder()\n {\n return new Builder($this);\n }", "public function show()\n {\n echo $this->constructGrid();\n }", "static public function builder(): Builder\n {\n return new Builder;\n }", "private function viewBuilder() {\n $html = '';\n $file = false;\n // Create fields\n foreach ($this->formDatas as $field) {\n $type = $field['type'];\n switch ($type) {\n case 'text' :\n case 'password' :\n case 'hidden' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n // Addon - 2013-07-31\n case 'date' :\n case 'datetime' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"text\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n\n\n if ($type == 'datetime') {\n $plugin = $this->addPlugin('widget', false);\n $plugin = $this->addPlugin('date');\n }\n $plugin = $this->addPlugin($type);\n if (!isset($this->js['script'])) {\n $this->js['script'] = '';\n }\n if ($type == 'datetime') {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datetimepicker({ dateFormat: \"yy-mm-dd\", timeFormat : \"HH:mm\"});});</script>';\n } else {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datepicker({ dateFormat: \"yy-mm-dd\"});});</script>';\n }\n break;\n // End Addon\n case 'select' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <select name=\"' . $field['name'] . '\">';\n // Add options\n foreach ($field['options'] as $option) {\n $html .= '\n <option value=\"' . $option . '\" <?php echo set_select(\"' . $field['name'] . '\", \"' . $option . '\"); ?>>' . $option . '</option>';\n }\n $html .= '\n </select>';\n break;\n case 'checkbox' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['checkbox'] as $option) {\n $html .= '\n <input type=\"checkbox\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'radio' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['radio'] as $option) {\n $html .= '\n <input type=\"radio\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'reset' :\n case 'submit' :\n $html .= '\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n case 'textarea' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <textarea name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\"><?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?></textarea>';\n break;\n case 'file' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"file\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" />';\n $file = true;\n break;\n }\n }\n\n $view = '\n <html>\n <head>\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php echo base_url() ?>assets/css/generator/' . $this->cssName . '.css\">\n '; // Addon - 2013-07-31\n foreach ($this->css as $css) {\n $view .= $css . '\n ';\n }\n foreach ($this->js as $js) {\n $view .= $js . '\n ';\n }\n // End Addon\n $view .= '\n </head>\n <body>\n <?php\n // Show errors\n if(isset($error)) {\n switch($error) {\n case \"validation\" :\n echo validation_errors();\n break;\n case \"save\" :\n echo \"<p class=\\'error\\'>Save error !</p>\";\n break;\n }\n }\n if(isset($errorfile)) {\n foreach($errorfile as $name => $value) {\n echo \"<p class=\\'error\\'>File \\\"\".$name.\"\\\" upload error : \".$value.\"</p>\";\n }\n }\n ?>\n <form action=\"<?php echo base_url() ?>' . $this->formName . '\" method=\"post\" ' . ($file == true ? 'enctype=\"multipart/form-data\"' : '') . '>\n ' . $html . '\n </form>\n </body>\n </html>';\n return array(str_replace('<', '&lt;', $view), $view);\n }", "public function create()\n {\n /*return view(\"banda\");*/\n }", "public function __construct(){\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }", "public function create()\n {\n return view('Samples.create', [\n 'create' => new FormBuilder(\n [\n 'title'=>'text',\n 'slug'=>'text',\n 'type_id'=>'hidden',\n 'id'=>'hidden' \n ],\n ['samples.store'],\n 'POST',\n 'Create'\n ) \n ]);\n }", "function\n\tShow ()\n\t{\n\t\t$this->sourceStrings();\n\t\t\n\t\tif ($this->Title == '')\n\t\t{\n\t\t\t$this->Title = $this->_STRINGS['DEFAULT_QUERY_TITLE'];\n\t\t}\n\n\t\tif (count($this->Additional) > 0)\n\t\t\t$this->Fields = array_merge($this->Fields, $this->Additional);\n\t\t\n\t\t$this->display();\n\t}", "public function setAsBuilder() {\r\n\t\t$this->setFrontEnd(false);\r\n\t\t$this->RenderWhole = true;\r\n\t\t$this->setMenuTemplate(__DIR__ . '/myNavigationBuilder.latte');\r\n\t}", "protected function buildControl()\n\t\t{\n\t\t\tswitch($this->getDisplayMode())\n\t\t\t{\n\t\t\t\tcase self::DISPLAYMODE_ICONS :\n\t\t\t\t\t$this->buildIconView();\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::DISPLAYMODE_LIST :\n\t\t\t\t\t$this->buildListView();\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::DISPLAYMODE_DETAILS :\n\t\t\t\t\t$this->buildDetailView();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatic::fail(\"Unknown DisplayMode '%s'\", $this->getDisplayMode());\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public function create()\n {\n return view('liquors.create')->with(['makers' => Maker::toSelectArray()]);\n }", "public function show()\n {\n return view('panel::show');\n }", "public function show()\n {\n return view('panel::show');\n }", "protected function setupShowOperation()\n {\n CRUD::addColumn(['name' => 'text_one', 'label' => 'Текст первый.']); // columns\n CRUD::addColumn(['name' => 'image_one', 'type' => 'image', 'label' => 'Изображение первое.']); // columns\n CRUD::addColumn(['name' => 'text_two', 'label' => 'Текст второй.']); // columns\n CRUD::addColumn(['name' => 'image_two', 'type' => 'image', 'label' => 'Изображение второе.']); // columns\n CRUD::addColumn(['name' => 'text_third', 'label' => 'Текст третий.']); // columns\n CRUD::addColumn(['name' => 'image_third', 'type' => 'image', 'label' => 'Изображение третье.']); // columns\n CRUD::addColumn(['name' => 'image_four', 'type' => 'image', 'label' => 'Изображение четвертое.']); // columns\n\n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']);\n */\n }", "public function setBuilder(ViewBuilder $builder): View;", "public function show()\n {\n return $this->view();\n }", "public function show()\n {\n return view('hirmvc::show');\n }" ]
[ "0.6526378", "0.65068364", "0.6488276", "0.64457935", "0.6348684", "0.6289494", "0.62589526", "0.62589526", "0.62589526", "0.62589526", "0.62530345", "0.62369376", "0.62369376", "0.62369376", "0.62308425", "0.62241685", "0.6219827", "0.6176313", "0.6117705", "0.6117705", "0.6117705", "0.6117705", "0.6117705", "0.6117705", "0.6117705", "0.61007607", "0.6096217", "0.60745347", "0.60663223", "0.60663223", "0.6063096", "0.6033626", "0.6030661", "0.6002087", "0.5987225", "0.5987225", "0.5970227", "0.5969409", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5956716", "0.5931462", "0.5922726", "0.5919749", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.59020084", "0.5879185", "0.586704", "0.585249", "0.5838603", "0.5833667", "0.5788966", "0.5788966", "0.5779055", "0.5776268", "0.5771026", "0.57695717", "0.5753653", "0.5723977", "0.5723901", "0.5711733", "0.569598", "0.568028", "0.5659107", "0.56448984", "0.5629633", "0.5625937", "0.561372", "0.5596805", "0.5579148", "0.556807", "0.5562583", "0.5560726", "0.5540813", "0.5527313", "0.55215013", "0.55149764", "0.5511598", "0.550713", "0.55048674", "0.55048674", "0.55004644", "0.5499924", "0.54946667", "0.5489878" ]
0.0
-1
Make a form builder.
protected function form() { $form = new Form(new Payment); $form->text('user.nickname', __('用户'))->disable(); // $form->number('app_id', __('App id')); $form->decimal('price', __('金额')); $form->text('transaction_id', __('三方订单号')); $form->text('out_trade_no', __('平台订单号'))->disable(); $form->radio('type', __('订单类型'))->options(['20' => '商城订单']); $form->radio('status', __('状态'))->options(['0' => '未支付', '1' => '已支付'])->default('0'); // $form->text('other', __('Other')); $form->datetime('payment_at', __('支付时间'))->default(date('Y-m-d H:i:s')); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function form_builder()\n {\n // ToDo run checks when form is being created, please.\n// if(!empty($this->check())):\n// throw new ValidationError(checks_html_output($this->check()));\n//\n// endif;\n\n return new form\\ModelForm($this, $this->_field_values());\n }", "private function createForm()\n\t{\n\t\t$builder = $this->getService('form')->create();\n\t\t$builder->setValidatorService($this->getService('validator'));\n\t\t$builder->setFormatter(new BasicFormFormatter());\n\t\t$builder->setDesigner(new DoctrineDesigner($this->getDoctrine(), 'Entity\\User',array('location')));\n\n\t\t$builder->getField('location')->setRequired(true);\n\t\t$builder->submit($this->getRequest());\n\n\t\treturn $builder;\n\t}", "public function setFormFieldBuilder(FormFieldBuilder $form_field_builder): Form;", "public function setFormBuilder(FormBuilder $form_builder): Form;", "public function getFormFieldBuilder(): FormFieldBuilder;", "protected function form()\n {\n $form = new Form(new Banner);\n\n $form->text('title', 'Title');\n $form->image('image', 'Image')->rules('required')->move('images/banners');\n $form->switch('status', 'Published')->default(1);\n\n $form->footer(function ($footer) {\n // disable `View` checkbox\n $footer->disableViewCheck();\n\n // disable `Continue editing` checkbox\n $footer->disableEditingCheck();\n\n // disable `Continue Creating` checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Activity);\n\n $form->text('log_name', 'Log name');\n $form->textarea('description', 'Description');\n $form->number('subject_id', 'Subject id');\n $form->text('subject_type', 'Subject type');\n $form->number('causer_id', 'Causer id');\n $form->text('causer_type', 'Causer type');\n $form->text('properties', 'Properties');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('log_name', __('Log name'));\n $form->text('description', __('Description'));\n $form->number('subject_id', __('Subject id'));\n $form->text('subject_type', __('Subject type'));\n $form->number('causer_id', __('Causer id'));\n $form->text('causer_type', __('Causer type'));\n $form->textarea('properties', __('Properties'));\n\n return $form;\n }", "public function getFormBuilder()\n {\n $this->formOptions['data_class'] = $this->getClass();\n\n $this->formOptions['allow_extra_fields'] = true;\n $this->formOptions['validation_groups'] = false;\n $this->formOptions['error_bubbling'] = false;\n\n $formBuilder = $this->getFormContractor()->getFormBuilder(\n $this->getUniqid(),\n $this->formOptions\n );\n\n $this->defineFormBuilder($formBuilder);\n\n return $formBuilder;\n }", "protected function form()\n {\n $form = new Form(new Book());\n\n $form->select('author_id', __('Author id'))\n ->options(collect(Author::all())->mapWithKeys(function ($v){\n return [$v->id => $v->name];\n }));\n\n $form->text('title', __('Title'));\n $form->textarea('description', __('Description'));\n $form->text('year', __('Year'));\n\n return $form;\n }", "function store_form($model = null, $prefix = null)\n {\n return new FormBuilder($model, $prefix);\n }", "protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "public function create() {\r\n\t\r\n\t$form = new Form();\r\n\t$form->setTranslator($this->translator);\r\n\treturn $form;\r\n }", "protected function form()\n {\n $form = new Form(new GuestBook);\n\n $form->textarea('body', __('Body'));\n $form->number('user_id', __('User id'));\n $form->number('guest_id', __('Guest id'));\n $form->number('guest_book_id', __('Guest book id'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Gys);\n\n $form->text('name', 'Name');\n $form->text('tel', 'Tel');\n $form->textarea('file', 'File');\n $form->number('type', 'Type');\n $form->text('username', 'Username');\n $form->password('password', 'Password');\n $form->number('status', 'Status');\n // 在表单提交前调用\n $form->saving(function (Form $form) {\n if ($form->password && $form->model()->password != $form->password) {\n $form->password = bcrypt($form->password);\n }\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new BorrowComment);\n\n $form->text('shared_book_name', __('Shared book name'));\n $form->text('student_name', __('Student name'));\n $form->image('student_avatar', __('Student avatar'));\n $form->textarea('content', __('Content'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new LotteryCode());\n\n $form->text('code', __('Code'));\n $form->number('batch_num', __('Batch num'));\n $form->text('prizes_name', __('Prizes name'));\n $form->datetime('valid_period', __('Valid period'))->default(date('Y-m-d H:i:s'));\n $form->datetime('prizes_time', __('Prizes time'))->default(date('Y-m-d H:i:s'));\n $form->text('operator', __('Operator'));\n $form->switch('award_status', __('Award status'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new BoxOrder);\n\n\n return $form;\n }", "protected function createForm()\n {\n if (!$this->form) {\n $this->form = new \\Gems_Form(array('class' => 'form-horizontal', 'role' => 'form'));\n $this->mailElements->setForm($this->form);\n }\n return $this->form;\n }", "protected function form()\n {\n $form = new Form(new Goodss);\n $form->switch('is_enable','状态')->options([\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'default'],\n ]);\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n //$footer->disableReset();\n\n // 去掉`提交`按钮\n //$footer->disableSubmit();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "public function builder(FormInterface $form)\n {\n return $this->dispatch(new GetStandardFormBuilder($form));\n }", "protected function form()\n {\n $form = new Form(new Blog());\n\n $form->text('title', __('Title'));\n $form->text('sub_title', __('Sub title'));\n $form->text('tag', __('Tag'));\n $form->textarea('body', __('Body'));\n $form->text('posted_by', __('Posted by'));\n $form->datetime('posted_at', __('Posted at'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Cate());\n\n $form->text('name', __('Name'));\n $form->url('link', __('Link'));\n $form->text('thumb', __('Thumb'));\n $form->switch('status', __('Status'));\n $form->number('sort', __('Sort'));\n $form->datetime('createtime', __('Createtime'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Barang());\n\n $form->text('nama', __('Nama'));\n $form->currency('harga', __('Harga Beli'))->symbol('Rp');\n $form->currency('harga_jual', __('Harga Jual'))->symbol('Rp');\n $form->select('satuan_id', __('Satuan id'))->options(\n Satuan::get()->pluck('nama', 'id')\n );\n $form->number('jumlah_unit', __('Jumlah Unit'));\n $form->select('parent_id', 'Parent Barang')->options(\n Barang::where('satuan_id', 1)->get()->pluck('nama', 'id')\n );\n $form->currency('b_pengiriman', __('Pengiriman'))->symbol('Rp');\n $form->currency('b_keamanan', __('Keamanan'))->symbol('Rp');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Formulario());\n\n $form->text('name', 'Nombre')\n ->required()\n ->creationRules(['required', \"unique:formularios\"])\n ->updateRules(['required', \"unique:formularios,name,{{id}}\"]);\n $form->text('description', 'Descripción');\n\n $fields = Field::all()->pluck('name', 'id')->toArray();\n $form->multipleSelect('fields', 'Campos')->options($fields);\n\n $forms = Formulario::all()->pluck('name', 'id')->toArray();\n $form->select('go_to_formulario', 'Continuar a formulario')->options($forms);\n\n $form->divider('Quiénes tienen acceso a este Formulario?');\n\n $permissions = Permission::all()->pluck('name', 'id')->toArray();\n $form->multipleSelect('permissions', 'Permisos')->options($permissions);\n\n $roles = Role::all()->pluck('name', 'id')->toArray();\n $form->multipleSelect('roles', 'Roles')->options($roles);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Config);\n\n $form->text('key', '配置项')->readOnly();\n\n $form->text('value', '值');\n\n $form->text('desc', '描述');\n\n $form->tools(function(Form\\Tools $tools) {\n $tools->disableView();\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new User());\n\n $form->mobile('phone', __('手机号'));\n $form->text('uname', __('姓名'));\n $form->text('wechat', __('微信号'));\n $form->text('phonenumber', __('联系电话'));\n $form->text('position', __('岗位'));\n $form->text('company', __('公司'));\n $form->switch('role', __('角色'));\n $form->switch('state', __('核实状态'));\n $form->datetime('create_date', __('创建时间'))->default(date('Y-m-d H:i:s'));\n // $form->text('openid', __('Openid'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new CompanyCulture());\n\n $form->text('name', '企业名称')->rules('required');\n $form->text('en_name', '企业名称(en)')->rules('required');\n $form->image('image_url', '图片')->rules('required|image');\n $form->editor('content', '内容')->rules('required');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`列表`按钮\n $tools->disableList();\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "private function makeform() {\n\tglobal $qqi;\n\t\n\t$form=new llform($this,'form');\n\t$form->addFieldset('d','');\n\t$form->addControl('d',new ll_listbox($form,'users','Users'));\n\t$form->addControl('d',new ll_button($form,'allusers','Select All','button'));\n\t$form->addControl('d',new ll_listbox($form,'functions','Functions'));\n\t$form->addControl('d',new ll_button($form,'allfunctions','Select All','button'));\n\t$rg=new ll_radiogroup($form,'showby');\n\t\t$rg->addOption('byusers','Rows of Users');\n\t\t$rg->addOption('byfunctions','Rows of Functions');\n\t\t$rg->setValue('byfunctions');\n\t$form->addControl('d',$rg);\t\n\t$form->addControl('d',new ll_button($form,'update','Update Display','button'));\n\treturn $form;\n}", "protected function form()\n {\n $form = new Form(new SiteHelp);\n\n $form->select('site_help_category_id', __('site-help::help.site_help_category_id'))\n ->options(SiteHelpCategory::pluck('name', 'id'));\n $form->text('title', __('site-help::help.title'));\n $form->number('useful', __('site-help::help.useful'))->default(0);\n $form->textarea('desc', __('site-help::help.desc'));\n $form->image('thumbnail', __('site-help::help.thumbnail'))\n ->removable()\n ->uniqueName()\n ->move('site-help');\n $form->UEditor('content', __('site-help::help.content'));\n $form->select('status', __('site-help::help.status.label'))\n ->default(1)\n ->options(__('site-help::help.status.value'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Site);\n\n $form->select('category_id', '分类')->options(SiteCategory::selectOptions(null, ''))->rules('required');\n $form->text('title', '标题')->attribute('autocomplete', 'off')->rules('required|max:50');\n $form->image('thumb', '图标')->resize(120, 120)->uniqueName();\n $form->text('describe', '描述')->attribute('autocomplete', 'off')->rules('required|max:300');\n $form->url('url', '地址')->attribute('autocomplete', 'off')->rules('required|max:250');\n $this->disableFormFooter($form);\n return $form;\n }", "public static function builder() {\n\t\treturn new Builder();\n\t}", "protected function form()\n {\n $form = new Form(new Code());\n\n $form->mobile('phone', __('Phone'));\n $form->number('code', __('Code'));\n $form->ip('ip', __('IP'));\n\n return $form;\n }", "public function builder()\n\t{\n\t\t$builder = new Builder($this->request);\n\t\treturn $builder;\n\t}", "protected function form()\n {\n $form = new Form(new Terrace());\n\n $form->image('image', __('平台图片'))->rules('required', ['required' => '平台图片不能为空']);\n $form->text('name', __('平台名称'))->rules('required', ['required' => '平台名称不能为空']);\n $form->text('path', __('外链'))->rules('required', ['required' => '平台外链不能为空']);\n $form->text('notice_info', __('提示语'))->rules('required', ['required' => '平台提示语不能为空']);\n $form->radio('status','状态')->options(['1' => '未推荐', '2'=> '已推荐'])->default(1);\n\n return $form;\n }", "public function buildForm()\n {\n }", "protected function form()\n {\n $this->opt();\n $form = new Form(new ComDep);\n\n $form->text('alias', 'Alias');\n $form->text('name', 'Name');\n $form->select('company_id', 'Company')->options($this->optcom);\n $form->select('id_com_dep_admin', 'Company department admin')->options($this->optcomdep);\n $form->select('service_type_id', 'Service type')->options($this->optsertype);\n $form->textarea('info', 'Info');\n $form->textarea('info_for_vp_admin', 'Info for vp admin');\n $form->text('address', 'Address');\n $form->textarea('info_station', 'Info station');\n $form->text('telephone', 'Telephone');\n $form->text('e_mail', 'E mail');\n $form->text('class', 'Class');$form->saving(function (Form $form) {\n $form->model()->id_admin_add=Admin::user()->id;\n });\n\n return $form;\n }", "abstract function builder_form(): string;", "public function toForm(){\n return $this->form_builder()->form();\n }", "public function build() { $this->form_built = TRUE; return $this; }", "public function getFormBuilder()\n {\n return $this['form.factory'];\n }", "protected function form()\n {\n $form = new Form(new Order);\n\n\n\n return $form;\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "protected function form()\n {\n $form = new Form(new Cases);\n\n $form->select('cate_id', '分类')->options('/admin/api/getcasecate');\n $form->select('algw_id', '顾问')->options('/admin/api/getgw');\n $form->text('title', '标题');\n $form->text('keywords', 'SEO关键字');\n $form->text('description', 'SEO描述');\n $form->text('desc', '副标题');\n $form->text('author', '来源');\n $form->radio('is_tj', '推荐')->options([0=>'否',1=>'是']);\n $form->image('thumb', '缩略图')->uniqueName();\n $form->editor('data', '详情');\n\n\n return $form;\n }", "public static function builder();", "protected function form()\n {\n $form = new Form(new WechatUser);\n\n $form->text('nick_name', __('昵称'));\n $form->text('name', __('用户名'));\n $form->password('password', __('密码'));\n $form->mobile('mobile', __('手机号'));\n $form->text('mini_program_open_id', __('OpenId'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Goods);\n\n $form->text('title', trans('admin.title'))->required()->rules('required');\n $form->text('slogan', trans('admin.slogan'))->required()->rules('required');\n $form->text('name', trans('admin.name'))->required()->rules('required');\n $form->decimal('price', trans('admin.price'))->required()->rules('required');\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n return $form;\n }", "public function createForm();", "public function createForm();", "protected function form()\n {\n $form = new Form(new BuSong);\n\n// $form->number('serialid', __('Serialid'));\n $form->text('svrkey', __('svrkey'));\n $form->text('songname', __('歌名'));\n $form->text('singer', __('歌星'));\n $form->select('langtype', __('语种'))->options([0=>'国语',1=>'粤语',2=>'英语',3=>'台语',4=>'日语',5=>'韩语',6=>'不详']);\n $form->text('remarks', __('备注'));\n $form->datetime('createdate', __('创建时间'))->default(date('Y-m-d H:i:s'));\n $form->select('ischeck', __('是否检查'))->options([0=>'否',1=>'是']);\n $form->select('buState', __('状态'))->options([0=>'新增',1=>'处理中',2=>'完成',3=>'歌曲信息出错',4=>'取消无法处理',5=>'已上传',6=>'彻底删除']);\n $form->text('musicdbpk', __('musicdbpk'));\n $form->text('optionRemarks', __('操作日志'));\n\n return $form;\n }", "protected function form()\n {\n return Form::make(new Liuchengku(), function (Form $form) {\n\t\t\t$form->display('id');\n\t\t\t$form->text('brand','品牌名称')->required();\n\t\t\t$form->tab('加盟流程', function (Form $form) {\n\t\t\t\t $form->textarea('jmlc','加盟流程')->rows(12);\n\t\t\t\t /* $form->editor('jmlc','加盟流程')->options([\n\t\t\t\t\t//'toolbar' => ['undo redo | styleselect | bold italic | link image',],\n\t\t\t\t\t'toolbar' => [],\n\t\t\t\t]); */\n\t\t\t\t})->tab('加盟支持', function (Form $form) {\n\t\t\t\t $form->editor('jmzc','加盟支持');\n\t\t\t\t})->tab('加盟优势', function (Form $form) {\n\t\t\t\t $form->editor('jmys','加盟优势');\n\t\t\t\t});\n //$form->text('type');\n //$form->text('retype');\n\t\t\t//$form->text('is_make');\n\t\t\t//$form->text('user_id');\n $form->hidden('user_id');\n\t\t\t$form->hidden('is_make');\n\t\t\t$form->display('created_at');\n $form->display('updated_at');\n $form->saving(function (Form $form) {\n if ($form->isCreating()) {\n $form->user_id=Admin::user()->id;\n\t\t\t\t\t$form->is_make=1;\n\t\t\t\t\t}\n });\n });\n }", "abstract public function createForm();", "abstract public function createForm();", "protected function form()\n {\n $form = new Form(new Direction());\n\n $form->text('name', __(trans('hhx.name')));\n $form->text('intro', __(trans('hhx.intro')));\n $form->image('Img', __(trans('hhx.img')))->move('daily/direction')->uniqueName();\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.status'));;\n $form->number('order_num', __(trans('hhx.order_num')));\n $form->hidden('all_num', __(trans('hhx.all_num')))->default(0.00);\n $form->decimal('stock', __(trans('hhx.stock')));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Engine());\n\n $form->text('name', __('Name'))\n ->required();\n $form->select('power_station_id', __('Power station'))\n ->options(PowerStation::all()->pluck('name', 'id'))\n ->required();\n $form->image('photo', __('Photo'));\n $form->textarea('details', __('Details'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Dictionary());\n $form->disableViewCheck();\n $form->disableEditingCheck();\n $form->disableCreatingCheck();\n\n\n $form->select('type', __('Type'))->options(Dictionary::TYPES);\n $form->text('option', __('Title'))->required();\n $form->text('slug', __('Slug'))->rules('nullable|regex:/(\\w\\d\\_)*/', [\n 'regex' => 'Только латинские буквы и знаки подчеркивания',\n ]);\n $form->text('alternative', __('Alternative'));\n $form->switch('approved', __('Approved'))->default(1);\n $form->number('sort', __('Sort'));\n\n $form->saving(function (Form $form) {\n if ($form->slug === null) {\n $form->slug = Str::slug($form->option);\n }\n });\n return $form;\n }", "protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }", "protected function form()\n {\n $form = new Form(new Usertype());\n\n $form->text('usertype', '类型名称')->rules('required|max:10');\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableList();\n $tools->disableDelete();\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Category);\n\n $form->text('name', 'Имя');\n\n $form->textarea('text');\n\n $form->switch('status', 'Статус')->states([\n 'on' => ['value' => '1', 'text' => 'Публиковать', 'color' => 'success'],\n 'off' => ['value' => '0', 'text' => 'Не публиковать', 'color' => 'danger'],\n ]);\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Member);\n\n $form->text('open_id', 'Open id');\n $form->text('wx_open_id', 'Wx open id');\n $form->text('access_token', 'Access token');\n $form->number('expires', 'Expires');\n $form->text('refresh_token', 'Refresh token');\n $form->text('unionid', 'Unionid');\n $form->text('nickname', 'Nickname');\n $form->switch('subscribe', 'Subscribe');\n $form->switch('sex', 'Sex');\n $form->text('headimgurl', 'Headimgurl');\n $form->switch('disablle', 'Disablle');\n $form->number('time', 'Time');\n $form->mobile('phone', 'Phone');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Enseignant());\n\n $form->text('matricule', __('Matricule'));\n $form->text('nom', __('Nom'));\n $form->text('postnom', __('Postnom'));\n $form->text('prenom', __('Prenom'));\n $form->text('sexe', __('Sexe'));\n $form->text('grade', __('Grade'));\n $form->text('fonction', __('Fonction'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new News);\n\n $form->text('title', '题目');\n // $form->number('category_id', '分类');\n $form->select('category_id','分类')->options('/api/admin_categories');\n // $form->textarea('content', 'Content');\n $form->ueditor('content','新闻内容')->rules('required');\n // $form->text('thumbnail', '封面图');\n $form->image('thumbnail', '封面图')->move('public/uploads/thunbnails');\n $form->number('status', '状态');\n $form->number('read_count', '阅读次数');\n\n return $form;\n }", "public function createBuilder();", "protected function form()\n {\n $form = new Form(new Good);\n $form->text('name', __('名称'))->rules('required');\n $form->decimal('amount', __('价格'))->default(0.00)->rules('required');\n $form->text('unit', __('单位'))->rules('required');\n $form->image('list_img', __('缩略图(320*320)'))->creationRules('required');\n $form->hasMany('goodsimgs', __('轮播图(640*640)'),function(Form\\NestedForm $form){\n $form->image('img',__('轮播图'))->creationRules('required');\n });\n $form->kindeditor('describe', __('描述'));\n // 去掉`查看`checkbox\n $form->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $form->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $form->disableCreatingCheck();\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Order());\n\n $form->switch('paid', __('Paid'));\n $form->datetime('reservation_expires', __('Reservation expires'))->default(date('Y-m-d H:i:s'));\n $form->decimal('price', __('Price'));\n\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableView();\n });\n\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Customer);\n\n $form->text('code', '客户编号');\n $form->text('name', '客户名称');\n// $form->text('openid', '客户openid');\n $form->text('contactor', '联系人');\n $form->text('tel', '联系电话');\n $form->email('email', '邮箱');\n $form->text('address', '地址');\n $form->decimal('receivables', '应收账款数字')->default(0.00);\n $form->text('fax', '传真');\n $form->switch('is_delete', '是否删除');\n\n return $form;\n }", "static public function builder(): Builder\n {\n return new Builder;\n }", "protected function makeFormCreator()\n {\n if ($this->isTestMode()) {\n return null;\n }\n\n if (empty($this->formConfiguration)) {\n throw new BadMethodCallException(\n 'Please define the form configuration to use via $this->setFormConfiguration().', 1333293139\n );\n }\n\n \\tx_rnbase::load(\\tx_mkforms_forms_Factory::class);\n $form = \\tx_mkforms_forms_Factory::createForm(null);\n\n /**\n * Configuration instance for plugin data. Necessary for LABEL translation.\n *\n * @var \\tx_rnbase_configurations $pluginConfiguration\n */\n $pluginConfiguration = \\tx_rnbase::makeInstance(tx_rnbase_configurations::class);\n $pluginConfiguration->init($this->conf, $this->cObj, 'mkforms', 'mkforms');\n\n // Initialize the form from TypoScript data and provide configuration for the plugin.\n $form->initFromTs(\n $this, $this->formConfiguration,\n ($this->getObjectUid() > 0) ? $this->getObjectUid() : false,\n $pluginConfiguration, 'form.'\n );\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Specialization);\n\n $form->text('full_name', 'Полное найменование')->rules('required|max:255');\n $form->text('short_name', 'Краткое найменование')->rules('required|max:255');\n $form->text('code', 'Код специальности')->rules('nullable|max:100');\n $form->select('cathedra_id', 'Кафедра')->options(Cathedra::all()->pluck('name', 'id'))\n ->rules('required|numeric|exists:cathedras,id');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Good);\n\n $form->hidden('group_id')->value(session('group_id'));\n $form->text('name', __('Наименование'));\n $form->text('size', __('Объем/кол-во'));\n $form->decimal('price', __('Цена'))->default(0);\n $form->image('file', 'Фото');\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Project());\n $form->text('name', '项目名称')->rules('required')->required();\n $form->url('url', '项目地址')->rules('required')->required();\n $form->text('username', '账号');\n $form->text('password', '密码');\n $status = [\n 'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],\n 'off' => ['value' => 2, 'text' => '禁用', 'color' => 'danger'],\n ];\n $form->switch('status', '状态')->states($status)->default(1);\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Sections());\n\n $form->text('name', __('Nazwa'));\n $form->text('pageId', __('ID sekcji (w sensie HTML)'));\n $form->textarea('content', __('Zawartość'));\n $form->textarea('style', __('Style(CSS'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Order);\n\n $form->text('no', 'No');\n $form->number('user_id', 'User id');\n $form->textarea('address', 'Address');\n $form->decimal('total_amount', 'Total amount');\n $form->textarea('remark', 'Remark');\n $form->datetime('paid_at', 'Paid at')->default(date('Y-m-d H:i:s'));\n $form->text('payment_method', 'Payment method');\n $form->text('payment_no', 'Payment no');\n $form->text('refund_status', 'Refund status')->default('pending');\n $form->text('refund_no', 'Refund no');\n $form->switch('closed', 'Closed');\n $form->switch('reviewed', 'Reviewed');\n $form->text('ship_status', 'Ship status')->default('pending');\n $form->textarea('ship_data', 'Ship data');\n $form->textarea('extra', 'Extra');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new TagModel);\n\n $form->text('tag_name', 'Tag name');\n $form->number('tag_id', 'Tag id');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new GoodsModel);\n\n $form->select('cid', __('分类'))->options(CategoryModel::selectOptions());\n $form->text('goods_name', __('Goods name'));\n $form->image('goods_img', __('Goods img'));\n $form->textarea('content', __('Content'));\n $form->number('goods_pricing', __('Goods pricing'));\n $form->number('goods_price', __('Goods price'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Boarding()); \n \n $form->select('pet_id',__('Pet Name'))->options(Pet::all()->pluck('name','id'))->rules('required');\n $form->select('reservation_id',__('Reservation'))->options(Reservation::all()->pluck('date','id'))->rules('required');\n $form->select('cage_id',__('Available Cages'))->options(Cage::get()->where(\"availability\",\"Available\")->pluck('id','id'))->rules('required');\n $form->datetime('end_date', __('End date'))->default(date('Y-m-d H:i:s'))->rules('required');\n \n return $form; \n }", "protected function form()\n {\n $form = new Form(new UsersOpenclose);\n\n $form->text('srvkey', __('srvkey'));\n $form->text('KtvBoxid', __('机器码'));\n $form->datetime('opendate', __('开房时间'))->default(date('Y-m-d H:i:s'));\n $form->datetime('closedate', __('关房时间'))->default(date('Y-m-d H:i:s'));\n $form->select('feesmode', __('收费模式'))->options([0=>'非扫码收费',1=>'扫码收费']);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Member());\n\n $form->text('open_id', __('微信openid'));\n $form->image('head', __('头像'));\n $form->text('nickname', __('昵称'));\n $form->mobile('mobile', __('手机号码'));\n $form->text('email', __('邮箱'));\n $form->text('name', __('姓名'));\n $form->text('weixin', __('微信号'));\n $form->text('qq', __('qq'));\n $form->text('city', __('所在城市'));\n $form->text('yidudian', __('易读点'));\n $form->text('integral', __('积分'));\n $form->text('balance', __('余额'));\n $states = [\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '冻结', 'color' => 'danger'],\n ];\n $form->switch('status', '是否使用')->states($states);\n return $form;\n }", "protected function form()\n {\n $form = new Form(new RequestForConfirmation());\n\n $form->switch('status', __('Status'));\n $form->text('comment', __('Comment'));\n $form->select('user_id', __('User id'))->options(User::all()->pluck('name', 'id'))->required();\n $form->select('project_id', __('Project id'))->options(Project::all()->pluck('project_name', 'id'))->required();\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Movie());\n\n $form->text('title', __('名字'));\n $form->number('director', __('导演'));\n $form->text('describe', __('简介'));\n $form->number('rate', __('评价'));\n $form->switch('released', __('是否上映'));\n $form->datetime('release_at', __('发行时间'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "public function create(): Form\n {\n $form = new Form();\n \n return $form;\n }", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->select('company_id', '公司名称')->options(Company::getSelectOptions());\n $form->text('project_name', '项目名称');\n $form->image('project_photo', '项目图片')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->url('link_url', '项目链接');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Platform());\n\n $form->text('platform_number', __('Platform number'))\n ->creationRules(['required', 'max:30', 'unique:platforms'])\n ->updateRules(['required', 'max:30']);\n $form->text('platform_name', __('Platform name'))\n ->creationRules(['required', 'max:30', 'unique:platforms'])\n ->updateRules(['required', 'max:30']);\n\n $form->footer(function ($footer){\n $footer->disableEditingCheck();\n });\n\n return $form;\n }", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "protected function form()\n {\n $form = new Form(new User);\n\n// $form->number('role_id', 'Role id');\n $form->text('name', 'Name');\n// $form->email('email', 'Email');\n// $form->image('avatar', 'Avatar')->default('users/default.png');\n// $form->password('password', 'Password');\n// $form->text('remember_token', 'Remember token');\n// $form->textarea('settings', 'Settings');\n $form->text('username', 'Username');\n// $form->text('access_token', 'Access token');\n// $form->text('no_hp', 'No hp');\n// $form->number('location_id', 'Location id');\n// $form->switch('gender', 'Gender')->default(1);\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Carousel);\n\n $form->select('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->options(CarouselCategory::all()->pluck('name', 'id'));\n $form->text('title', __('carousel::carousel.title'));\n $form->text('url', __('carousel::carousel.url'));\n $form->image('img_src', __('carousel::carousel.img_src'))\n ->removable()\n ->uniqueName()\n ->move('carousel');\n $form->text('alt', __('carousel::carousel.alt'));\n $form->textarea('remark', __('carousel::carousel.remark'));\n $form->select('status', __('carousel::carousel.status.label'))\n ->default(1)\n ->options(__('carousel::carousel.status.value'));\n $form->datetime('start_time', __('carousel::carousel.start_time'))\n ->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('carousel::carousel.end_time'))\n ->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Setting());\n\n $form->decimal('member_fee', __('会员年费'))->required();\n $form->decimal('task_rate', __('任务佣金抽成比例'))->required()->help('将扣除对应比例,比例范围0-1');\n $form->tools(function (Form\\Tools $tools) {\n\n // 去掉`列表`按钮\n $tools->disableList();\n\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n $footer->disableReset();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n //保存后回调\n $form->saved(function (Form $form) {\n $success = new MessageBag([\n 'title' => '提示',\n 'message' => '保存成功',\n ]);\n\n return back()->with(compact('success'));\n });\n return $form;\n }", "protected function form()\n {\n return new Form(new Attention);\n }", "protected function form()\n {\n $form = new Form(new Purchase());\n if ($form->isCreating()) {\n $form->select('consumer_id', \"客户\")->options(Consumer::all()->pluck('full_name', 'id'))->required();\n $form->select('house_id', \"购买房源\")->options(House::purchasable()->pluck('readable_name', 'id'))->required();\n }\n $form->datetime('started_at', \"生效日期\");\n $form->datetime('ended_at', \"结束日期\");\n $form->select('sell_type', \"出售方式\")->options(Purchase::$type)->required();\n $form->currency('price', \"成交价格\")->symbol('¥')->required();\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Drug);\n\n $form->text('street_name', '«Уличное» название');\n $form->text('city', 'Город');\n $form->text('active_substance', 'Активное вещество');\n $form->text('symbol', 'Символ');\n $form->text('state', 'Состояние');\n $form->text('color', 'Цвет');\n $form->text('inscription', 'Надпись');\n $form->text('shape', 'Форма');\n $form->text('weight', 'Вес таблетки');\n $form->text('weight_active', 'Вес действующего вещества');\n $form->text('description', 'Описание');\n $form->text('negative_effect', 'Негативный эффект');\n $form->switch('confirm', 'Подтверждение');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Room);\n\n if ($form->isEditing())\n $form->display('id', 'ID');\n\n $form->text('name', 'Nama');\n $form->select('room_type_id', 'Tipe Ruangan')->options(function ($id) {\n return RoomType::all()->pluck('name', 'id');\n });\n $form->slider('max_people', 'Maksimal Orang')->options([\n 'min' => 1,\n 'max' => 100,\n 'from' => 20,\n 'postfix' => ' orang'\n ]);\n $form->radio('status', 'Status')->options(RoomStatus::asSelectArray())->stacked();\n $form->textarea('notes', 'Catatan');\n\n if ($form->isEditing()) {\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n }\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new User());\n\n $form->text('name', __('Name'));\n $form->email('email', __('Email'));\n $form->datetime('email_verified_at', __('Email verified at'))->default(date('Y-m-d H:i:s'));\n $form->password('password', __('Password'));\n $form->text('remember_token', __('Remember token'));\n $form->decimal('point', __('Point'))->default(0.000);\n $form->switch('status', __('field.status'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new WechatEvent);\n\n $form->text('title', '事件标题')->help('起说明性作用');\n $form->text('key', 'Key')->default(md5(time()));\n $form->select('event', '事件类型')->options(WechatEvent::EVENTLIST);\n $form->text('method', '执行方法')->help('namespace\\\\class@method');\n $form->select('wechat_message_id', '消息')->options(WechatMessage::select('id', 'title')->pluck('title', 'id'));\n\n return $form;\n }", "public function builder()\n {\n return new Builder($this);\n }", "protected function form()\n {\n $form = new Form(new ThemePoster());\n\n $form->select('domain_id', __('domain_id'))->options(DomainConfig::getDomainMap())->rules('required');\n $form->radio('type', __('type'))->options(ThemePoster::getTypeMap())->when(1, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Product::getCategoryMap()->toArray()))->rules('required');\n\n })->when(2, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Article::getCategoryMap()))->rules('required');\n\n });\n $form->text('title', __('title'))->rules('required');\n $form->text('alt', __('alt'))->rules('required');\n $form->image('site', '图片尺寸 1600*300')\n ->uniqueName()\n ->rules('required|max:150')->resize(1600, 300);\n $form->url('link', __('link'));\n $form->switch('is_show', __('is_show'));\n\n return $form;\n }", "public function getBuilder();", "protected function form()\n {\n return Form::make(new Linkman(), function (Form $form) {\n $form->display('id');\n $form->text('name');\n $form->text('mobile')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('gender');\n $form->text('birthday')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('province_id');\n $form->text('city_id');\n $form->text('area_id');\n $form->text('address')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('description');\n $form->text('nickname')->saving(function ($value) {\n return (string) $value;\n });\n \n $form->display('created_at');\n $form->display('updated_at');\n });\n }", "function buildForm(){\n\t\t# menampilkan form\n\t}", "protected function form()\n {\n\n $form = new Form(new Goods);\n\n //分类树形\n $cateTree = getTree(Category::all()->where('is_show',1)->toArray());\n $cate_map = [];\n foreach ($cateTree as $key => $value) {\n $cate_map[$value['id']] = str_repeat('&#12288;&#12288;',$value['level']).$value['title'];\n }\n\n $form->display('id', 'ID');\n $form->select('cate_id', '分类')->rules('required')->options($cate_map);\n $form->text('name', '商品')->rules('required')->attribute(['autocomplete' => 'off']);\n $form->textarea('remark', '备注');\n $states = [\n 'on' => ['value' => 1, 'text' => '是', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '否', 'color' => 'danger'],\n ];\n $form->switch('is_valid',trans('admin.is_show'))->states($states)->default(1);\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n $form->hidden('operated_admin_id')->value(Admin::user()->id);\n $form->hidden('hos_id')->value(session('hos_id'));\n\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Posts);\n\n $form->text('title', 'Title');\n $form->text('content', 'Content');\n $form->text('video_url', 'Video url');\n $form->switch('status', '审核状态')->states( [ \n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'primary'],\n 'on' => ['value' => 1, 'text' => '通过', 'color' => 'default']\n ]);\n $form->number('content_type', 'Content type');\n $form->number('member_id', 'Member id');\n return $form;\n }" ]
[ "0.7879594", "0.7565762", "0.75185436", "0.73564214", "0.7287918", "0.7232044", "0.7194646", "0.71785986", "0.7157999", "0.7133095", "0.7074416", "0.7062337", "0.7057251", "0.70530677", "0.7030334", "0.7013398", "0.7013392", "0.700392", "0.6994234", "0.6989912", "0.69835144", "0.69762033", "0.6969788", "0.69647014", "0.6960803", "0.6935731", "0.6933645", "0.693018", "0.6929853", "0.6922171", "0.6899249", "0.6898999", "0.6896955", "0.6884745", "0.6883799", "0.68799394", "0.68773663", "0.6858968", "0.68572146", "0.6849476", "0.68494356", "0.68457323", "0.683979", "0.6838948", "0.68381685", "0.6837478", "0.68369275", "0.6835372", "0.6829178", "0.6829178", "0.6827735", "0.6824148", "0.6814151", "0.6814151", "0.68126297", "0.68100345", "0.6799133", "0.6796184", "0.6796183", "0.679273", "0.6789645", "0.67891073", "0.67802215", "0.6777215", "0.67713845", "0.67656654", "0.67652607", "0.6762471", "0.6762306", "0.6757059", "0.67485", "0.6748214", "0.67443055", "0.67347735", "0.67322046", "0.6728608", "0.67255265", "0.67190623", "0.6717706", "0.6717264", "0.6716446", "0.6714048", "0.67092955", "0.67060614", "0.67057306", "0.66996336", "0.66883796", "0.66845274", "0.66823155", "0.6681058", "0.66770256", "0.6673304", "0.66728455", "0.6672371", "0.6667153", "0.66663986", "0.66527224", "0.66501147", "0.6644649", "0.66419464", "0.6638926" ]
0.0
-1
sometimes the first time gets the url without an extension
function get_url_redirected($url) { $url_list = array(); $url_list[] = $url; $ch = curl_init(); if (false === $ch) { curl_close($ch); throw new Exception("Bad request url in get_url: $url", 1); } for ($redirects = 0; follow_redirects($ch, $url_list); ++$redirects) {} $url = end($url_list); curl_close($ch); return $url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findExtensionUrl($ex, $url)\n{\n $find = strpos($url, $ex);\n if ($find !== false) {\n $val = substr($url, $find, strlen($ex));\n return $val;\n } //XEM LAI\n return '';\n}", "function emr_get_match_url($url) {\n\t$url = emr_remove_scheme($url);\n\t$url = emr_maybe_remove_query_string($url);\n\t$url = emr_remove_size_from_filename($url, true); // and extension is removed.\n\t$url = emr_remove_domain_from_filename($url);\n\treturn $url;\n}", "private static function loadUrl(){\n\n $uri = $_SERVER['REQUEST_URI'];\n\n if (ENCRYPTURL == '1')\n $uri = CR::decrypt($uri);\n\n BASEDIR == '/' || $uri = str_replace(BASEDIR,'', $uri);\n $uri = explode('/', $uri);\n\n array_walk($uri, function(&$item){\n strpos($item, '?') == false ||\n $item = substr($item, 0, strpos($item, '?'));\n });\n\n return $uri;\n }", "static function check_url($clean) {\n $count = SQL::current()->count(\"extensions\", array(\"clean\" => $clean));\n return (!$count or empty($clean)) ? $clean : $clean.\"-\".($count + 1) ;\n }", "function OnGetDownloadURL($url){\n\t// remove that code on not Synology system\n\treturn str_replace('/volume1/web', '', $url);\n}", "function get_main_url($url){\r\n $parts = parse_url($url);\r\n $url = $parts[\"scheme\"] .\"://\".$parts[\"host\"];\r\n return $url;\r\n}", "private function normalizeExtension()\n {\n $explodedUri = WingedLib::explodePath(static::$uri);\n $dir = WingedLib::normalizePath();\n $beforeConcatDir = WingedLib::normalizePath();\n if ($explodedUri) {\n foreach ($explodedUri as $key => $uriPart) {\n $dir .= $uriPart;\n $dir = WingedLib::normalizePath($dir);\n if (is_directory(WingedLib::clearPath(DOCUMENT_ROOT . $dir) . '/')) {\n unset($explodedUri[$key]);\n $beforeConcatDir = $dir;\n }\n }\n static::$parent = $beforeConcatDir;\n $beforeConcatDir = WingedLib::clearPath($beforeConcatDir);\n\n static::$parentUri = WingedLib::clearPath(WingedLib::clearPath(str_replace($beforeConcatDir, '', static::$uri)));\n if (!static::$parentUri) {\n static::$parentUri = './';\n } else {\n static::$parentUri = './' . static::$parentUri . '/';\n }\n\n if (static::$uri != static::$parentUri) {\n $explodedUri = WingedLib::explodePath(static::$parentUri);\n }\n\n static::$httpsParent = static::$https . $beforeConcatDir . '/';\n static::$httpParent = static::$http . $beforeConcatDir . '/';\n static::$protocolParent = static::$protocol . $beforeConcatDir . '/';\n\n if (static::$freeGet != '') {\n static::$fullUrlProvider = static::$protocol . WingedLib::clearPath(static::$pureUri) . '?' . static::$freeGet;\n } else {\n static::$fullUrlProvider = static::$protocol . WingedLib::clearPath(static::$pureUri);\n }\n if (count7($explodedUri) == 0) {\n static::$controllerName = 'IndexController';\n static::$controllerAction = 'actionIndex';\n static::$isIndex = true;\n } else {\n $explodedUri = array_values($explodedUri);\n $page = $explodedUri[0];\n unset($explodedUri[0]);\n $uriParameters = [];\n foreach ($explodedUri as $key => $value) {\n array_push($uriParameters, $value);\n }\n static::$controllerName = Formater::camelCaseClass($page) . 'Controller';\n if (count($uriParameters) > 0) {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($uriParameters[0]);\n } else {\n static::$controllerAction = 'actionIndex';\n }\n static::$isIndex = true;\n static::$uriParameters = $uriParameters;\n }\n } else {\n static::$parentUri = './';\n static::$httpsParent = static::$https;\n static::$httpParent = static::$http;\n static::$protocolParent = static::$protocol;\n if (static::$freeGet != '') {\n static::$fullUrlProvider = static::$protocol . WingedLib::clearPath(static::$pureUri) . '?' . static::$freeGet;\n } else {\n static::$fullUrlProvider = static::$protocol . WingedLib::clearPath(static::$pureUri);\n }\n static::$isIndex = true;\n static::$controllerName = 'IndexController';\n static::$controllerAction = 'actionIndex';\n static::$parent = './';\n }\n return $this;\n }", "function getModifyUrl($init_url)\n {\n $pos = strrpos($init_url,\".html\");\n if($pos) {\n $modify_url = substr($init_url,0,$pos);\n return $modify_url;\n } else {\n return $init_url;\n }\n }", "function get_url()\n {\n }", "static function eliminarExtensionArchivo($url) {\n $nombre = explode(\"/\", $url);\n end($nombre);\n $nombre = explode(\".\", pos($nombre));\n reset($nombre);\n return (isset($nombre[1])) ? str_replace(\".\" . $nombre[1], \"\", $url) : null;\n }", "private function getLastURL() {\n\t\tif (!isset($_SERVER['REQUEST_URI'])) {\n\t\t\t$serverrequri = $_SERVER['PHP_SELF'];\n\t\t} else {\n\t\t\t$serverrequri = $_SERVER['REQUEST_URI'];\n\t\t}\n\n\t\t$slcurrentPageName=str_replace('?&no_cache=1', '', $serverrequri);\n\t\t$slcurrentPageName=str_replace('?no_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('&no_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('?&purge_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('?purge_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('&purge_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('?&L=0', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('&L=0', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('?L=0', '', $slcurrentPageName);\n\t\treturn $slcurrentPageName;\n\t}", "function allowed_extensions($url) {\n\n\t}", "function get_requested_file($url)\n{\n if( strpos($url,'?wdf_route=') === false )\n return parse_url($url,PHP_URL_PATH);\n \n parse_str(array_last(explode(\"?\",$url,2)),$res);\n return $res['wdf_route'];\n}", "function get_context($url) {\n $url = substr($url,strpos($url,'://')+3);\n if (substr($url,0,4) == 'www.')\n $url = substr($url,4);\n if (strpos($url,'/') !== false)\n $url = substr($url,0,strpos($url,'/'));\n if (strrpos($url,'.') === false)\n throw new Exception ('Invalid URL');\n else\n $url = substr($url,0,strrpos($url,'.'));\n if (strlen($url) > 9)\n return substr($url,0,9);\n else\n return $url;\n}", "function wp_guess_url()\n {\n }", "static function filtrarUrl($url) {\n if (strpos($url, \"?\") !== false) {\n $parts = explode(\"?\", $url);\n return $parts[0];\n } else\n return $url;\n }", "protected function ___url() {\n\t\treturn $this->pagefiles->url . $this->basename;\n\t}", "function wfRequestExtension() {\n\t/// @todo FIXME: this sort of dupes some code in WebRequest::getRequestUrl()\n\tif ( isset( $_SERVER['REQUEST_URI'] ) ) {\n\t\t// Strip the query string...\n\t\tlist( $path ) = explode( '?', $_SERVER['REQUEST_URI'], 2 );\n\t} elseif ( isset( $_SERVER['SCRIPT_NAME'] ) ) {\n\t\t// Probably IIS. QUERY_STRING appears separately.\n\t\t$path = $_SERVER['SCRIPT_NAME'];\n\t} else {\n\t\t// Can't get the path from the server? :(\n\t\treturn '';\n\t}\n\n\t$period = strrpos( $path, '.' );\n\tif ( $period !== false ) {\n\t\treturn strtolower( substr( $path, $period ) );\n\t}\n\treturn '';\n}", "function getContentUrl($url){\n return $url[1];\n\t}", "abstract public function get_url_read();", "function GetPrewURI() /*added 16_05*/\n\t\t{\n\t\tif($this->history[count($this->history)-1])\n\t\t\t$ret = $this->history[count($this->history)-1];\n\t\telse\n\t\t\t$ret = $_SERVER['SERVER_NAME'];\n//\t\treturn $this->history[count($this->history)-1]; \n\t\treturn $ret;\n\t\t}", "function getImageUrl($url)\r\n {\r\n if (substr_count($url, 'http://') or substr_count($url, 'https://')) {\r\n //\r\n } else {\r\n $page = $this->currentUrl;\r\n if ($this->baseHrefs[$page]) {\r\n $page = rtrim($this->baseHrefs[$page], '/');\r\n }\r\n else {\r\n $page = dirname($page);\r\n }\r\n if (!substr_count($url, '/')) return $page . '/' . $url;\r\n $page = 'http://' . parse_url($page, PHP_URL_HOST);\r\n $url = $page . '/' . ltrim($url, '/');\r\n }\r\n $url = html_entity_decode($url);\r\n $url = str_replace(' ', '%20', $url);\r\n return $url;\r\n }", "function url($url, $mode) {\n\tglobal $gfe_url, $nice_url, $root_filename, $sort_by, $sort_order;\n\t$temp_url = '';\n\t$temp_url_nice = '';\n\t$GET_sortby = trim($_GET['by']);\n\t$GET_sortorder = trim($_GET['order']);\n\t$url = urldecode($url);\n\t$url = urlencode($url);\n\t$url = str_replace('%2F', '/', $url);\n\tswitch($mode) {\n\t\tcase 'dir':\n\t\t\tif($url == 'home') {\n\t\t\t\t$temp_url = $gfe_url.'/'.$root_filename;\n\t\t\t\t$temp_url_nice = $gfe_url.'/';\n\t\t\t} else {\n\t\t\t\t$temp_url = \"$gfe_url/$root_filename?dir=$url\";\n\t\t\t\t$temp_url_nice = \"$gfe_url/browse/$url/\";\n\t\t\t}\n\t\t\tif(!empty($GET_sortby)) {\n\t\t\t\tif(strpos($temp_url, '?') === false) {\n\t\t\t\t\t$temp_url .= \"?by=$sort_by&amp;order=$GET_sortorder\";\n\t\t\t\t} else {\n\t\t\t\t\t$temp_url .= \"&amp;by=$sort_by&amp;order=$GET_sortorder\";\n\t\t\t\t}\n\t\t\t\t$temp_url_nice .= \"sortby/$sort_by/sortorder/$GET_sortorder/\";\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'file':\n\t\t\t$temp_url = \"$gfe_url/view.php?file=$url\";\n\t\t\t$temp_url_nice = \"$gfe_url/viewing/$url/\";\n\t\t\tbreak;\n\t\tcase 'download';\n\t\t\t$temp_url = \"$gfe_url/view.php?file=$url&amp;dl=1\";\n\t\t\t$temp_url_nice = \"$gfe_url/download/$url/\";\n\t\t\tbreak;\n\t}\n\tif($nice_url) {\n\t\treturn $temp_url_nice;\n\t} else {\n\t\treturn $temp_url;\n\t}\n}", "function url_to_filename($url_full)\n{\n require_code('urls2');\n return _url_to_filename($url_full);\n}", "private function _getUrl()\n\t{\n\t\t$url = isset($_GET['url']) ? $_GET['url'] : null;\n\t\t$url = rtrim($url, '/');\n\t\t$url = filter_var($url, FILTER_SANITIZE_URL);\n\t\t$this->_url = explode('/', $url);\n\t}", "private function _getUrl()\n\t{\n\t\t$url = isset($_GET['url']) ? $_GET['url'] : null;\n\t\t$url = rtrim($url, '/');\n\t\t$url = filter_var($url, FILTER_SANITIZE_URL);\n\t\t$this->_url = explode('/', $url);\n\t}", "function getUrl();", "function getSuffixPath() {\r\n\t$url = $_SERVER['REQUEST_URI']; // \"/some/app/script.php/cid/c1/seg/1234-init.mp4\r\n\t$idx = strpos($url, \".php/\", 0);\r\n\tif($idx===false) return \"\";\r\n\t$url = substr($url, $idx+1); // script.php/cid/c1/seg/1234-init.mp4\r\n\t$path= substr($url, strpos($url, \"/\",0)+1); // cid/c1/seg/1234-init.mp4\r\n\treturn $path;\r\n}", "function url_parts($url) {\n if (!preg_match('/^(?P<protocol_domain>(?P<protocol>https?\\:\\/+)(?P<domain>([^\\/\\W]|[\\.\\-])+))(?P<request_uri>(?P<pathname>(?P<path>\\/(.+\\/)?)?(?P<file>[^\\?\\#]+?)?)?(?P<query_string>\\?[^\\#]*)?)(\\#(?P<hash>.*))?$/',$url,$url_parts)) {\n echo debug_backtrace();\n throw new Exception(\"Invalid url: $url\");\n }\n return $url_parts;\n}", "function GetFileUrl($url)\r\n{\r\n $parts = parse_url($url);\r\n return trim(preg_replace( '/[^\\w.]/', '_', substr(\"{$parts['host']}/{$parts['path']}\", 0, 50)), '_');\r\n}", "public function getUrl(){\n\t \treturn $this->dirname.'/'.$this->filename.'.'.$this->extension;\n\t }", "public function testUrlError() {\n\t\t$this->Helper->url('nope.js');\n\t}", "abstract public function get_url_update();", "public function onBeforeGet($url){}", "public abstract function getURL();", "function _ccweb_getHost($url) { \r\n\t$s = $url;\r\n\tif (cstring_contains($s, \"://\")) { $s=cstring_getPartAfter($s, \"://\"); }\r\n\tif (cstring_contains($s, \"/\")) { $s=cstring_getPartBefore($s, \"/\"); }\t\r\n\treturn $s;\r\n}", "public function getURL ();", "function _url($path){\n echo getFullUrl($path);\n}", "abstract public function getUrl();", "function turl_ffull_url()\n{\n\t//$GLOBALS[\"content\"].=$_SERVER[\"SERVER_PORT\"];\n\t\n\tif ($_SERVER[\"SERVER_PORT\"]==443)\n\t{\n\t\t$full_url=\"https://\".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n\t}\n\telse\n\t{\n\t\t//$full_url=\"http://\".$_SERVER['HTTP_HOST'].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER['REQUEST_URI'];\n\t\t$full_url=\"http://\".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n\t}\n\t\n\t//$GLOBALS[\"content\"].=$full_url;\n\t\n\tpj_deb_flog3(__LINE__, __FILE__, $full_url, \"tuti\");\n\t\n\treturn $full_url;\n}", "function getFilenameFromUrl($url) {\n $path = parseUrl($url);\n $parts = explode('/', $path['path']);\n $filename = end($parts);\n return $filename;\n}", "function urlComplete(){\n$url=\"http://\".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\nreturn $url;\n}", "private function parseExternURL($url){\n\t\tif (!preg_match('@^(?:https?|ftp)://@i', $url)){\n\t\t\t$url = \"http://\" . $url;\n\t\t}\n\t\treturn $url;\n\t}", "public function getExtReference($url);", "function matchUrl( $url ) {\n\t\t$urlPattern = '/'.str_replace($this->urlPattern, '', $url);\n\t\t$aUrl = pathinfo( str_replace($this->urlPattern, '', $urlPattern) );\n\t\tif ( in_array($aUrl['filename'], Array('rss2', 'atom')) and $aUrl['extension'] == 'xml') {\n\t\t\treturn $aUrl;\n\t\t}\n\t\treturn Array();\n }", "abstract public function getUrl(string $suffix): string;", "public function getURL();", "public function getURL();", "public function get_url();", "public function getFirstPageUrl();", "function decoupe_url($t) {\n//\treturn($t);\n\t$z = strrpos($t, '/');\n\tif ($z != '') {\n\t\t$t = substr($t, $z+1, strlen($t));\n\t\t// RECHERCHE DU DERNIER ?\n\t\t$z = strrpos($t, '?');\n\t\tif ($z != '') {\n\t\t\treturn(substr($t, 0,$z));\n\t\t} else {\n\t\t\treturn($t);\n\t\t}\n\t} else {\n\t\treturn($t);\n\t}\n}", "function get_requested_url() {\n\n $requested_url = $_SERVER['REQUEST_URI'];\n $requested_url = str_replace(get_homeurl(), '', $requested_url);\n //$requested_url = ltrim($requested_url, get_homeurl());\n $requested_url = ltrim($requested_url, '/');\n $requested_url = rtrim($requested_url, '.php');\n $requested_url = rtrim($requested_url, '/');\n\n return $requested_url;\n}", "static function filename2url($filename) {\n\t\t$slashPos = -1;\n\t\twhile(($slashPos = strpos($filename, \"/\", $slashPos+1)) !== false) {\n\t\t\tif(substr($filename, 0, $slashPos) == substr($_SERVER['SCRIPT_FILENAME'],0,$slashPos)) {\n\t\t\t\t$commonLength = $slashPos;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$urlBase = substr($_SERVER['PHP_SELF'], 0, -(strlen($_SERVER['SCRIPT_FILENAME']) - $commonLength));\n\t\t$url = $urlBase . substr($filename, $commonLength);\n\t\t$protocol = $_SERVER['HTTPS'] ? \"https\" : \"http\";\n\t\treturn \"$protocol://\". $_SERVER['HTTP_HOST'] . $url;\n\n\t\t// Count the number of extra folders the script is in.\n\t\t// $prefix = str_repeat(\"../\", substr_count(substr($_SERVER[SCRIPT_FILENAME],$commonBaseLength)));\n\t}", "function yt_clean_url( $url ) {\n\t\tif ( '' == $url )\n\t\t\treturn;\n\t\t\t\n\t\t$url = preg_replace('/\\?.*/', '', $url);\n\t\t\n\t\treturn $url;\n\t \n\t}", "function add_http_if_no_protocol($url)\n {\n if(mb_substr($url,0,7,CHARSET) != 'http://' && mb_substr($url,0,8,CHARSET) != 'https://' && mb_substr($url,0,6,CHARSET) != 'ftp://' && mb_substr($url,0,9,CHARSET) != 'gopher://' && mb_substr($url,0,7,CHARSET) != 'news://')\n {\n $url = 'http://'.$url;\n }\n return $url;\n }", "function helperCheckForWrongUrl() {\n\t\t$status = array();\n\n\t\tif ($GLOBALS['TSFE']->config['config']['baseURL'] != '' || $GLOBALS['TSFE']->config['config']['absRefPrefix']) {\n\t\t\t$currentDomain = t3lib_div::getIndpEnv('TYPO3_HOST_ONLY');\n\t\t\t$linkDomain = $this->pi_getPageLink($GLOBALS['TSFE']->id);\n\n\t\t\tif ($linkDomain != '' && strpos($linkDomain, $currentDomain) === false) {\n\t\t\t\t$status['current']\t= $currentDomain;\n\t\t\t\t$status['link']\t\t\t= $linkDomain;\n\t\t\t}\n\t\t}\n\n\t\treturn $status;\n\t}", "function shUrlDecodeFull($url)\n{\n\t// tracker id: 22767\n\t// Need to check that the URI is fully decoded in case of multiple-encoded attack vectors.\n\t$halt = 0;\n\twhile (true)\n\t{\n\t\t$last = $url;\n\t\t$url = rawurldecode($url);\n\n\t\t// Check whether the last decode is equal to the first.\n\t\tif ($url == $last)\n\t\t{\n\t\t\t// Break out of the while if the URI is stable.\n\t\t\tbreak;\n\t\t}\n\t\telse if (++$halt > 10)\n\t\t{\n\t\t\t// Runaway check. URI has been seriously compromised.\n\t\t\tif (!headers_sent())\n\t\t\t{\n\t\t\t\theader('HTTP/1.0 403 FORBIDDEN');\n\t\t\t\techo 'Forbidden access';\n\t\t\t}\n\t\t\tjexit();\n\t\t}\n\t}\n\n\treturn $url;\n}", "protected function _getFileName($url) {\n \n $elements = split('/', $url); \n $filename = $elements[count($elements) - 1];\n\n return substr($filename, 0);\n }", "public function guessExtension();", "private function getUrl()\n {\n //echo $_GET['url'];\n if(isset($_GET['url']))\n {\n $url=rtrim($_GET['url'],'/');\n $url=filter_var($url,FILTER_SANITIZE_URL);\n $url=explode('/',$url);\n return $url;\n }\n }", "private function filterUrl($url){\n\t\t\n\t\t// Get the global config\n\t\tglobal $CrawlerConfig;\n\t\t\n\t\t// Make sure the URL isn't \"#\"\n\t\tif(substr($url, 0, 1) == \"#\") return false;\n\t\t\n\t\tif(substr($url, 0, 2) == \"//\") $url = \"http:\".$url;\n\t\t\n\t\t// If it's already valid, nothing else needs to be done\n\t\tif(filter_var($url, FILTER_VALIDATE_URL)) return $url;\n\t\t\n\t\t// If it's a partial path, generate full path\n\t\tif(substr($url, 0, 1) == \"/\"){\n\t\t\t\n\t\t\t// Glue pieces together\n\t\t\t$turl = $CrawlerConfig['BASE_URL'].$url;\n\t\t\t\n\t\t\t// If it worked, return it\n\t\t\tif(filter_var($turl, FILTER_VALIDATE_URL)) return $turl;\n\t\t}\n\t\t\n\t\t// Temporary URL var\n\t\t$turl = rtrim($this->current_location,\"/\").\"/\".ltrim($url,\"/\");\n\t\t\n\t\t// Try one more time\n\t\tif(filter_var($turl, FILTER_VALIDATE_URL)) return $turl;\n\t\t\n\t\treturn false;\n\t}", "protected function initCurrentUrl() {}", "protected function initCurrentUrl() {}", "function test_common_get_path_by_url() {\n\t\t$thing = \\site_url('tmp.php');\n\t\t$result = \\common_get_path_by_url($thing);\n\t\t$this->assertNotEquals(false, $result);\n\t\t$this->assertEquals(0, \\strpos($thing, \\ABSPATH));\n\t}", "public function testUrlGenerationWithExtensionInCurrentRequest(): void\n {\n Router::extensions('rss');\n $routes = Router::createRouteBuilder('/');\n $routes->fallbacks('InflectedRoute');\n $request = new ServerRequest([\n 'params' => ['plugin' => null, 'controller' => 'Tasks', 'action' => 'index', '_ext' => 'rss'],\n ]);\n Router::setRequest($request);\n\n $result = Router::url([\n 'controller' => 'Tasks',\n 'action' => 'view',\n 1,\n ]);\n $expected = '/tasks/view/1';\n $this->assertSame($expected, $result);\n\n $result = Router::url([\n 'controller' => 'Tasks',\n 'action' => 'view',\n 1,\n '_ext' => 'json',\n ]);\n $expected = '/tasks/view/1.json';\n $this->assertSame($expected, $result);\n }", "function _tryToGetUrlPart( $offset ) {\n\n $_tmp['path'] = explode( \"/\", $this->_getPathUrl());\n if (! empty( $_tmp['path'][$offset] )) {\n return $_tmp['path'][$offset];\n }\n }", "function script_loader_filter ($src) {\n if (FALSE === strpos ($src, 'ajax.googleapis.com')) {\n\treturn $src;\n }\n\n $new_src = explode('?', $src);\n return $new_src[0];\n\n}", "function stripFormat($urlPart){\n\t\t$posOfDot=strpos($urlPart,\".\");\n\t\tif($posOfDot===FALSE)\n\t\t\treturn $urlPart;\n\t\telse{\n\t\t\treturn substr($urlPart,0,$posOfDot);\n\t\t}\n\t}", "function _drush_patchfile_is_url($url) {\n return parse_url($url, PHP_URL_SCHEME) !== NULL;\n}", "function acf_strip_protocol($url)\n{\n}", "function get_url($index = '')\n{\n /**\n * $_GET['url'] merupakan URL atau pretty url yang di set\n * atau dirapikan pada file .htaccess, jadi penulisannya yang di set\n * menggunakan htaccess adalah index.php?url=xyz sebagai default\n * maka dari itu bisa memanggil $_get['url']\n */\n if (isset($_GET['url'])) {\n /**\n * Merapikan url menggukan method rtrim untuk menhapus / dibagian akhir url\n * \tmengamankan url dari variabel aneh dengan method Filter_var \n * memecar URL menjadi array dengan method explode setiap bertemu string atau karakter /\n */ \n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n if ($index !== '') {\n return $url[$index];\n } else {\n return $url;\n }\n }else{\n \n $url = trim($_SERVER[\"REQUEST_URI\"], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n if ($index !== '') {\n return $url[$index];\n unset($url[0]);\n } else {\n return $url;\n }\n }\n}", "protected function getUrl(){\n\n\t\t//retornando a url aonde o usuario está\n\t\treturn parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n\n\t}", "function getExtension() ;", "final public static function getUrl()\n {\n\n $url = explode('/', $_GET['url']);\n\n $pos = array_search('index.php', $url);\n\n if($pos === 0){\n unset($url[$pos]);\n }\n\n $url = self::orderUrl($url);\n\n return $url;\n }", "function get_domain_name_only($url){\r\n $match = preg_match(\"/(.*:\\/\\/)\\w{0,}(.*)\\.(.*)/\",$url,$patterns);\r\n $patterns[2] = str_replace(\".\",\"\",$patterns[2]);\r\n return $patterns[2];\r\n}", "private function full($url = NULL)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$headers = get_headers($url,1);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// Some kind of error\n\t\t\t// Abandon and return original url\n\t\t\tKohana::$log->add(Log::ERROR, Kohana_Exception::text($e));\n\t\t\treturn $url;\n\t\t}\n\n\t\tif (empty($headers))\n\t\t{\n\t\t\treturn $url;\n\t\t}\n\n\t\tif ( ! isset($headers['Location']))\n\t\t{\n\t\t\treturn $url;\n\t\t}\n\t\t$url = $headers['Location'];\n\t\t\n\t\t// If an Array is returned for redirects\n\t\t// Return the last item in the array\n\t\treturn is_array($url)? end($url) : $url;\n\t}", "function getFullPath($url) {\n\t$fp = $_SERVER[\"SERVER_PORT\"] == \"443\" ? \"https://\" : \"http://\";\n\t$fp .= $_SERVER[\"HTTP_HOST\"];\n\t$dir = dirname($_SERVER[\"PHP_SELF\"]);\n\tif ($dir != \"/\")\n\t\t$fp .= $dir;\n\t$fp .= \"/\" . $url;\n\treturn $fp;\n}", "function vUrl( $url )\r\n\t\t{\r\n\t\t return filter_var( $url, FILTER_VALIDATE_URL );\r\n\t\t \r\n\t\t}", "function test_common_get_url_by_path() {\n\t\t$thing = \\trailingslashit(\\ABSPATH) . 'tmp.php';\n\t\t$result = \\common_get_url_by_path($thing);\n\t\t$this->assertNotEquals(false, $result);\n\t\t$this->assertEquals(0, \\strpos($thing, \\site_url()));\n\t}", "function get_effective_url()\n\t{\n\t\t//最后一个有效的url地址\n\t\treturn curl_getinfo($this->ch, CURLINFO_EFFECTIVE_URL);\n\t}", "function emr_remove_domain_from_filename($url) {\n\t$url = str_replace(emr_remove_scheme(get_bloginfo('url')), '', $url);\n\treturn $url;\n\t}", "public function url(): string;", "function is_url_real ($url_to_shorten)\n{\n $test_flag = true;\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url_to_shorten);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n $response = curl_exec($ch);\n if( curl_getinfo($ch, CURLINFO_HTTP_CODE) == '404' ||\n FALSE == $response )\n {\n dumper($response);\n $test_flag = false;\n }\n curl_close($ch);\n return $test_flag;\n}", "private function _getUrl()\r\n {\r\n $url = filter_input(INPUT_GET, 'url');\r\n $url = rtrim($url, '/');\r\n $url = filter_var($url,FILTER_SANITIZE_URL);\r\n $this->_url = explode('/', $url);\r\n }", "function url($url){\n $url=ereg_replace(\"[&?]+$\", \"\", $url);\n \n $url .= ( strpos($url, \"?\") != false ? \"&\" : \"?\" ).urlencode($this->name).\"=\".$this->id;\n \n return $url;\n }", "function get_file_url($file, $nocache = false) {\n if($file = find_file($file)) {\n $url = str_replace(FILES_PATH,FILES_URL,$file);\n } else {\n return false;\n }\n if($nocache) {\n $url .= '?revision='.md5_file($file);\n }\n return $url;\n}", "public function ___httpUrl() {\n\t\t$page = $this->pagefiles->getPage();\n\t\t$url = substr($page->httpUrl(), 0, -1 * strlen($page->url())); \n\t\treturn $url . $this->url(); \n\t}", "function url_exist($url)\r\n\t\t{\r\n\t\t\r\n\t\t}", "function setBaseDomain($full_url) {\n $urlParts = parse_url($full_url);\n //add case for localhost\n // print_r($urlParts);\n $host=$urlParts['host'];\n if($host==\"localhost\") {\n \n $this->base_domain = $host;\n }\n else {\n $hostParts = explode('.', $urlParts['host']);\n $hostParts = array_reverse($hostParts);\n // $host = $hostParts[1] . '.' . $hostParts[0]; with final extension\n if (($hostParts[1])!== null) {\n $host = $hostParts[1];\n $this->base_domain = $host;\n }\n }\n\n }", "function block_web_extension($str)\n\t{\n\t\treturn ( ! preg_match(\"/(https?:\\/\\/)([\\w*-]+)\\.([\\w*.-]*)([\\w*]{2,3})(.+)(\\.(as[ap]?x?|php|[ps]?html?|cgi|jsp|cfm|pl|pm)\\b|\\/\\B)/\", $str)) ? FALSE : TRUE;\n\t}", "function file_extension($filename)\n\t\t{\n\t\t\t$fileparts = explode(\".\", $filename);\n\t\t\t$more_check = strpos(strtolower(end($fileparts)), '?');\n\t\t\tif ($more_check != false) {\n\t\t\t\t\n\t\t\t\treturn substr(strtolower(end($fileparts)),0, $more_check );\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\treturn strtolower(end($fileparts));\n\t\t}\n\t\t}", "function cl_wp_get_attachment_url($url) {\n if ( defined('FBRWEB_OFFLOAD_HOST') && ($rep = constant('FBRWEB_OFFLOAD_HOST')) ) {\n return str_replace( '//' . $_SERVER['HTTP_HOST'], '//' . $rep, $url);\n }\n return $url;\n}", "protected function getUrl($file){\n\t\n\t\t//if there is no file, return an empty string\n\t\tif(empty($file)) return $file;\n\t\n\t\t//test if the files is a url, as one migt send it that way\n\t\t$parts = parse_url($file);\n\t\t$is_url = is_array($parts) && isset($parts['scheme']);\n\t\n\t\t//if this is not a url, create one for it\n\t\tif(!$is_url)\n\t\t{\n\t\t\t//as we can't control what if the developers\n\t\t\t//will take care of the HTTP / HTTPS matching,\n\t\t\t$url = $this->createUrl($file);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url = $file;\n\t\t}\n\t\n\t\t//do it here. the problem is loading an insecure object over a secure page, so check for this situation\n\t\t\n\t\tif( (isset($_SERVER['HTTPS']) && !strcasecmp($_SERVER['HTTPS'],'on')) && //the page is a secure one\n\t\tSyC::startsWith($url,'http://') //the created url is an insecure one, adjust it\n\t\t)\n\t\t{\n\t\t\t$url = \"https://\".substr($url, 7);\n\t\t}\n\t\t\n\t\treturn $url;\n\t}", "protected function _getUrlSuffix()\n\t{\n\t\treturn self::getUrlSuffix();\n\t\treturn trim(Mage::getStoreConfig('landingpage/seo/url_suffix'));\n\t}", "private function script_url($matches){\r\n\t\tif(strpos($matches[1],'.png')!==false || strpos($matches[1],'.jpg')!==false || strpos($matches[1],'.webp')!==false){\r\n\t\t\treturn str_replace($matches[1], whole_url($matches[1], $this->base_url), $matches[0]);\r\n\t\t}\r\n\r\n\t\treturn str_replace($matches[1], proxify_url($matches[1], $this->base_url), $matches[0]);\r\n\t}", "public function get_url()\n {\n }", "function get_final_url($url){\n\t\t$redirects = get_all_redirects($url);\n\t\tif (count($redirects)>0){\n\t\t\treturn array_pop($redirects);\n\t\t} else {\n\t\t\treturn $url;\n\t\t}\n\t}", "function om_http2local ($url) {\n\n\tif($_SERVER['DOCUMENT_ROOT']) {\n\t\tif(stripos($url, 'http://'.$_SERVER['HTTP_HOST']) === 0) {\n\t\t\t$url_=$_SERVER['DOCUMENT_ROOT'].substr($url,strlen('http://'.$_SERVER['HTTP_HOST']));\n\t\t\tif(file_exists($url_))\n\t\t\t\t$url=$url_;\n\t\t} elseif(stripos($url, 'https://'.$_SERVER['HTTP_HOST']) === 0) {\n\t\t\t$url_=$_SERVER['DOCUMENT_ROOT'].substr($url,strlen('https://'.$_SERVER['HTTP_HOST']));\n\t\t\tif(file_exists($url_))\n\t\t\t\t$url=$url_;\n\t\t} elseif(substr($url,0,1) == '/') {\n\t\t\t$url_=$_SERVER['DOCUMENT_ROOT'].$url;\n\t\t\tif(file_exists($url_))\n\t\t\t\t$url=$url_;\n\t\t}\n\t}\n\t\n\treturn $url;\n\n}", "function get_path($url) {\n preg_match('/^([^?]+)(\\?path.*?)?(&content.*)?$/', $url, $matches);\n if (isset($matches[2])) {\n\t\tparse_str(substr($matches[2], 1), $path);\n\t\t$parse_path = preg_split(\"/[-]+/\", $path['path']);\n\t} else {\n\t\t$parse_path[0] = '';\n\t\t$parse_path[1] = '';\n\t\t$parse_path[2] = '';\n\t\t$parse_path[3] = '';\n\t}\n return $parse_path;\n}", "function url(){\n\treturn Globals::URL_SYNC_CHECK;\t\n}", "function getFilename($url, $path)\n{\n # ex: response-content-disposition=attachment%3B%20filename%3D%22AdobeStock_112670342.jpeg%\n $query_re = '/filename.+?(AdobeStock_\\d+\\.\\w+)(?:%|\\'|\")/';\n if (preg_match($query_re, $url, $matches) && $matches[1] !== null) {\n $name = $matches[1];\n } else {\n # strip leading slash if exists\n if (strpos($path, '/') === 0) {\n $name = substr($path, 1);\n } else {\n $name = $path;\n }\n };\n return $name;\n}" ]
[ "0.7116409", "0.68165964", "0.62764996", "0.6197907", "0.6180456", "0.6134118", "0.61173147", "0.6072377", "0.6055833", "0.60483056", "0.60159105", "0.6004705", "0.59911215", "0.5986902", "0.59839755", "0.5971367", "0.5949636", "0.5935105", "0.59051144", "0.5895684", "0.5891471", "0.58863777", "0.5886343", "0.5882858", "0.5854871", "0.5854871", "0.58545536", "0.5845508", "0.5845046", "0.5840941", "0.5827055", "0.58200943", "0.58187675", "0.58157873", "0.58069056", "0.5784424", "0.5780149", "0.57736343", "0.57685757", "0.5768419", "0.5757528", "0.5752762", "0.5751164", "0.57469463", "0.5744568", "0.57397413", "0.57392526", "0.57392526", "0.57367706", "0.57307535", "0.57172406", "0.56994087", "0.5686356", "0.56856006", "0.5664441", "0.56551135", "0.5651535", "0.56438076", "0.56435686", "0.5641585", "0.5641488", "0.5638725", "0.5638725", "0.563379", "0.5630572", "0.56279236", "0.56266695", "0.56236446", "0.56132466", "0.56011367", "0.559607", "0.5595486", "0.55911005", "0.5589991", "0.5585241", "0.5583722", "0.5579975", "0.5575357", "0.55586344", "0.55580276", "0.5553876", "0.55467767", "0.55433226", "0.5541914", "0.5540635", "0.5539709", "0.5539594", "0.5535521", "0.5532469", "0.5532444", "0.5532385", "0.552902", "0.5518954", "0.5515613", "0.5512529", "0.55119884", "0.5509497", "0.55066353", "0.5505206", "0.55032915", "0.5502261" ]
0.0
-1
take the last url in the array, if it redirects, add new url to array.
function follow_redirects(&$ch, &$url_array) { if (!is_array($url_array)) { throw new Exception('follow_redirects array required', 1); } $last_url = end($url_array); if (false === $last_url) { throw new Exception('follow_redirects empty array', 1); } $options = array( CURLOPT_URL => $last_url, CURLOPT_CONNECTTIMEOUT => 120, //CURLOPT_COOKIEFILE => $this->cookie_jar_path, /* make sure you provide FULL PATH to cookie files*/ CURLOPT_FOLLOWLOCATION => false, // We want to just get redirect url but not to follow it. CURLOPT_HEADER => true, // We'll parse redirect url from header. CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 120, CURLOPT_NOBODY => true, //exclude the body from the output ); $allswell = curl_setopt_array($ch, $options); if (false === $allswell) { throw new Exception('follow_redirects failed to set curl options', 1); } $response = curl_exec($ch); preg_match_all('/^Location:(.*)$/mi', $response, $matches); if (empty($matches[1])) { $redirected = false; } else { $redirected = true; $url_array[] = trim($matches[1][0]); // append the url redirected to to the array } return $redirected; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_all_redirects($url){\n\t\t$redirects = array();\n\t\twhile ($newurl = get_redirect_url($url)){\n\t\t\tif (in_array($newurl, $redirects)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$redirects[] = $newurl;\n\t\t\t$url = $newurl;\n\t\t}\n\t\treturn $redirects;\n\t}", "function get_all_redirects($url){\n\t$redirects = array();\n\twhile ($newurl = get_redirect_url($url)){\n\t\tif (in_array($newurl, $redirects)){\n\t\t\tbreak;\n\t\t}\n\t\t$redirects[] = $newurl;\n\t\t$url = $newurl;\n\t}\n\treturn $redirects;\n}", "function get_final_url($url){\n\t\t$redirects = get_all_redirects($url);\n\t\tif (count($redirects)>0){\n\t\t\treturn array_pop($redirects);\n\t\t} else {\n\t\t\treturn $url;\n\t\t}\n\t}", "function get_final_url($url){\n\t$redirects = get_all_redirects($url);\n\tif (count($redirects)>0){\n\t\treturn array_pop($redirects);\n\t} else {\n\t\treturn $url;\n\t}\n}", "static function get_all_redirects($url)\n\t\t{\n\t\t\t$redirects = array();\n\t\t\twhile ($newurl = CUtils::get_redirect_url($url))\n\t\t\t{\n\t\t\t\tif (in_array($newurl, $redirects))\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$redirects[] = $newurl;\n\t\t\t\t$url = $newurl;\n\t\t\t}\n\t\t\treturn $redirects;\n\t\t}", "static function get_final_url($url)\n\t\t{\n\t\t\t$redirects = CUtils::get_all_redirects($url);\n\t\t\tif (count($redirects)>0)\n\t\t\t{\n\t\t\t\treturn array_pop($redirects);\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\treturn $url;\n\t\t\t}\n\t\t}", "private function enrich_additional_urls(array $urls): array {\n return f\\unique(f\\concat(\n $urls,\n $this->fetch_password_protected_posts(),\n $this->fetch_yoast_noindex_posts()\n ));\n }", "function vip_substr_redirects( $vip_redirects_array = array(), $append_old_uri = false ) {\n\tif ( empty( $vip_redirects_array ) )\n\t\treturn;\n\n\t// Don't do anything for the homepage\n\tif ( '/' == $_SERVER['REQUEST_URI'] )\n\t\treturn;\n\n\tforeach ( $vip_redirects_array as $old_path => $new_url ) {\n\t\tif ( substr( $_SERVER['REQUEST_URI'], 0, strlen( $old_path ) ) == $old_path ) {\n\t\t\tif ( $append_old_uri )\n\t\t\t\t$new_url .= str_replace( $old_path, '', $_SERVER['REQUEST_URI'] );\n\t\t\twp_redirect( $new_url, 301 );\n\t\t\texit();\n\t\t}\n\t}\n}", "function _getRedirectionURLs() {\n // old method was unreliable.\n // use 0 = path constructor lookup\n // use 1 = itemid constructor lookup\n\n $url_creat_method = 0;\n $menu =& JApplication::getMenu('site');\n $redirectURLs = array();\n\n $redirectURLs['old_membership_itemid'] = $this->params->get('redirect_old_membership');\n $redirectURLs['old_membership_item'] = $menu->getItem( $redirectURLs['old_membership_itemid'] );\n $redirectURLs['old_membership'] = JRoute::_($redirectURLs['old_membership_item']->link\n .'&Itemid='\n .$redirectURLs['old_membership_itemid'], FALSE);\n\n $redirectURLs['bad_password_itemid'] = $this->params->get('redirect_bad_password');\n $redirectURLs['bad_password_item'] = $menu->getItem( $redirectURLs['bad_password_itemid'] );\n $redirectURLs['bad_password'] = JRoute::_($redirectURLs['bad_password_item']->link\n .'&Itemid='\n .$redirectURLs['bad_password_itemid'], FALSE);\n\n $redirectURLs['no_match_itemid'] = $this->params->get('redirect_no_match');\n $redirectURLs['no_match_item'] = $menu->getItem( $redirectURLs['no_match_itemid'] );\n $redirectURLs['no_match'] = JRoute::_($redirectURLs['no_match_item']->link\n .'&Itemid='\n .$redirectURLs['no_match_itemid'], FALSE);\n\n //determine how expired redirection will be handled\n $redirectURLs['expired_method'] = $this->params->get('expired_method');\n $redirectURLs['expired_itemid'] = $this->params->get('redirect_expired_menu');\n $redirectURLs['expired_item'] = $menu->getItem( $redirectURLs['expired_itemid'] );\n $redirectURLs['expired'] = JRoute::_($redirectURLs['expired_item']->link\n .'&Itemid='\n .$redirectURLs['expired_itemid'], FALSE);\n $redirectURLs['expired_contribpageid'] = $this->params->get('redirect_expired_contribpage');\n $redirectURLs['expired_contribpage'] = 'index.php?option=com_civicrm&task=civicrm/contribute/transact&reset=1&id='\n .$redirectURLs['expired_contribpageid'];\n\n return $redirectURLs;\n }", "function get_url_redirected($url)\n{\n $url_list = array();\n $url_list[] = $url;\n\n $ch = curl_init();\n if (false === $ch) {\n curl_close($ch);\n throw new Exception(\"Bad request url in get_url: $url\", 1);\n }\n\n for ($redirects = 0; follow_redirects($ch, $url_list); ++$redirects) {}\n $url = end($url_list);\n\n curl_close($ch);\n\n return $url;\n}", "function get_internal_links($array){\r\n $result = array();\r\n $count = count($array);\r\n for($i=0;$i<$count;$i++){\r\n if(!empty($array[$i])){ \r\n if(strpos($array[$i],\"www\",0) === false){\r\n if(strpos($array[$i],\"http\",0) === false){ \r\n array_push($result,$array[$i]);\r\n }\r\n }\r\n }\r\n }\r\n return $result;\r\n}", "private function enrich_additional_urls(array $urls): array\n {\n return f\\unique(\n f\\concat(\n $urls,\n $this->fetch_password_protected_posts(),\n $this->fetch_yoast_noindex_posts()\n )\n );\n }", "public function getRedirects();", "public function getLastPageUrl();", "protected function pushUrl(\\SplFixedArray $url)\n {\n $sitemap = $this->getSitemap();\n while (!$this->pushUrlToSitemap($sitemap, $url)) {\n $this->addSitemap();\n $sitemap = $this->getSitemap();\n }\n }", "function updateUlrsList($newUrl) {\n $urlFile = env('PBS_KIOSK_DIR').'/urls.list';\n $contents = file_get_contents($urlFile);\n $parsedLines = preg_split(\"/\\r?\\n|\\r/\", $contents);\n // Check if exists already\n $found = false;\n $rVal = 'notadded';\n foreach( $parsedLines as $rurl ) {\n if( trim($newUrl) == trim($rurl) ) $found = true;\n }\n if(!$found) {\n $contents .= \"\\r\\n\".$newUrl;\n if (file_put_contents($urlFile, $contents)) $rVal = 'added';\n }\n return response()->json($rVal);\n }", "public function getRedirect_urls()\r\n {\r\n return $this->redirect_urls;\r\n }", "public function addUrl() {\r\n\t\t$current = $this->params['url']['url'];\r\n\t\t$accept = array('show', 'admin_show', 'admin_index');\r\n\t\tif(in_array($this->action, $accept)) {\r\n\t\t\tif ($this->Session->read('history.current') != $current){\r\n\t\t\t\t//$this->Session->write('history.previous', $this->Session->read('history.current'))->write('history.current', $current);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function autoRedirectToLastPage()\n {\n if($this->urlQueryStringName === NULL)\n {\n self::$registry->error->reportError('The Url Query String for Pagination is not defined yet, You can do it by using initURLQueryStringName() method.', __LINE__, __METHOD__, true);\n return 0;\n }\n \n if($this->currentPageNumber() > $this->totalPages)\n {\n $pageQueryStringNamePosition = array_search($this->urlQueryStringName, $this->URLQueryString);\n $this->URLQueryString[++$pageQueryStringNamePosition] = $this->totalPages;\n $finalQueryString = implode('/', $this->URLQueryString);\n self::$registry->request->go(null, null, $finalQueryString);\n }\n return;\n }", "public function badRedirectProvider() {\n $badUrls = $this->badUrlProvider();\n $badRedirects = array();\n foreach($badUrls as $name => $badUrl) {\n $urlParts = parse_url(array_shift($badUrl));\n unset($urlParts['scheme']);\n\n // The redir.xpoc.pro tool is provided by sp1d3R in the HackerOne Bug Bounty program\n // If it goes away, we'll need some other way to easily generate a redirect to an internal URL\n $badRedirects[$name] = array(\"http://redir.xpoc.pro/\".implode($urlParts), array_shift($badUrl));\n }\n return $badRedirects;\n }", "public function getRedirectUrls()\r\n {\r\n return $this->redirect_urls;\r\n }", "public function cache_unmatched_redirects( $url, $wp, $redirects ) {\n\t\tif ( $this->matched ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->cache_redirects( $url, $this->matched, $redirects );\n\t}", "function check_url($url) {\r\n $http_codes = array();\r\n $urls = array();\r\n while (TRUE) {\r\n // Initialise curl and get the header\r\n $ch = curl_init($url);\r\n curl_setopt($ch, CURLOPT_HEADER, true);\r\n curl_setopt($ch, CURLOPT_NOBODY, true);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);\r\n curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\r\n $content = curl_exec($ch);\r\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n \r\n // Add urls and http codes to the arrays\r\n array_push($urls, $url);\r\n array_push($http_codes, $http_code);\r\n \r\n if ( is_redirect_http_code($http_code) ) {\r\n // Check for redirects, if found, follow the redirected URL\r\n if ( preg_match('/(?<=Location: )[^ \\s]*/i', $content, $matches) ) {\r\n $url = $matches[0];\r\n continue;\r\n }\r\n }\r\n \r\n // We can't do anything else\r\n break;\r\n }\r\n \r\n // Contains all the http_codes and urls encountered\r\n $ret['http_codes'] = $http_codes;\r\n $ret['urls'] = $urls;\r\n // For easy access, contains the last http_code and url encountered\r\n $ret['http_code'] = $http_code;\r\n $ret['url'] = $url;\r\n return $ret;\r\n}", "function _url_final_redirect( $url ) {\n\t\treturn IMFORZA_Utils::url_final_redirect( $url );\n\t}", "public function getFinalUrls()\n {\n return $this->final_urls;\n }", "function addRedirectorForUsers()\n{\n global $modSettings, $user_profile;\n\n if (empty($modSettings['redirector_enabled']) || empty($user_profile)) {\n return;\n }\n\n foreach (array_keys($user_profile) as $user_id) {\n if (!empty($user_profile[$user_id]['website_url'])) {\n $user_profile[$user_id]['website_url'] = getRedirectorUrl($user_profile[$user_id]['website_url']);\n }\n }\n}", "private function rewriteToAbsoluteUrls(array $navigation): array {\n\t\tforeach ($navigation as &$entry) {\n\t\t\tif (0 !== strpos($entry['href'], $this->urlGenerator->getBaseUrl())) {\n\t\t\t\t$entry['href'] = $this->urlGenerator->getAbsoluteURL($entry['href']);\n\t\t\t}\n\t\t\tif (0 !== strpos($entry['icon'], $this->urlGenerator->getBaseUrl())) {\n\t\t\t\t$entry['icon'] = $this->urlGenerator->getAbsoluteURL($entry['icon']);\n\t\t\t}\n\t\t}\n\t\treturn $navigation;\n\t}", "private function getUrls() {\n\t\t// reassign the array because of a php bug (solved later with php 5.2.x @see: http://bugs.php.net/39449)\n\t\t$arr = $this->formData;\n\n\t\t// build bas URL for replacement variables\n\t\t$protocol\t= 'http'\n . ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ? 's' : '' )\n . '://';\n\t\t$url\t\t= $_SERVER['HTTP_HOST'] . dirname( $_SERVER['PHP_SELF'] ) . '/';\n $url = str_replace( '//', '/', $url ); // some server add 2 /\n $url = $protocol . $url . 'index.php?route=payment/directebanking/';\n\n\t\tif( $this->_param['successUrlStd'] ) {\n\t\t\t$arr['user_variable_0'] = $url . 'success'\n\t\t\t. '&transaction=-TRANSACTION-&security_criteria=-SECURITY_CRITERIA-'\n\t\t\t. '&order_id=-USER_VARIABLE_3-&pid=-PROJECT_ID-';\n\t\t}else{\n\t\t\tif( $this->_param['successUrl'] ) {\n\t\t\t\t$arr['user_variable_0'] = $this->_param['successUrl'];\n\t\t\t}\n\t\t}\n\n\t\tif( $this->_param['cancelUrlStd'] ) {\n\t\t\t$arr['user_variable_1'] = $url . 'cancel'\n\t\t\t. '&transaction=-TRANSACTION-&order_id=-USER_VARIABLE_3-&pid=-PROJECT_ID-';\n\t\t}else{\n\t\t\tif( $this->_param['cancelUrl'] ) {\n\t\t\t\t$arr['user_variable_1'] = $this->_param['cancelUrl'];\n\t\t\t}\n\t\t}\n\n\t\t// and reassign again\n\t\t$this->formData = $arr;\n\n\t\tunset( $arr );\n\t}", "private function addUrlToHistory(string $url): void\n {\n $this->session->pushItemToSessionItemArray(\"url-history\", $url, 5);\n }", "public function merge(array $urlRewritesArray)\n {\n foreach ($urlRewritesArray as $urlRewrite) {\n $key = $urlRewrite->getRequestPath() . self::SEPARATOR . $urlRewrite->getStoreId();\n if ($key !== self::SEPARATOR) {\n $this->data[$key] = $urlRewrite;\n } else {\n $this->data[] = $urlRewrite;\n }\n }\n }", "public function gridSetPagesUrlLast($url = ''){\n if(!empty($url)){\n $this->setVar('PAGES_URL_LAST', $url);\n $this->setVar('LAST_PAGE_TAG', __('Last page'));\n }\n }", "public function get_redirects()\n\t{\n\t\treturn $this->db->get($this->_table['redirects'])->result();\n\t}", "function isURLExistingInLinkArry($url){\r\n foreach($this->link_arry as $link){\r\n if($link->getURL()==$url){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "function urls($data)\r\n{\r\n $result = array();\r\n if (is_array($data)) {\r\n if (isset($data['href']))\r\n $result[] = $data['href']; else\r\n foreach ($data as $d)\r\n if (is_array($d))\r\n $result[] = $d['href']; else\r\n $result[] = $d;\r\n } else $result[] = $data;\r\n\r\n // Make URLs full\r\n $result2 = array();\r\n global $last_url, $last_base;\r\n $last_domain = substr($last_url, 0, strpos($last_url, '/', 10));\r\n if ($p = strpos($last_url,'?'))\r\n $last_php = substr($last_url,0,$p);\r\n else $last_php = $last_url;\r\n\r\n foreach ($result as $url) {\r\n $url = trim($url);\r\n if (!$url)\r\n continue;\r\n $url = str_replace('./','',$url);\r\n if (substr($url,0,2)=='//') $url = 'http:'.$url;\r\n if (strpos($url, '://') === false)\r\n if ($url[0] == '/')\r\n $url = $last_domain . $url;\r\n elseif ($url[0] == '?') $url = $last_php . $url;\r\n else $url = $last_base . $url;\r\n // Check for right donor\r\n //if (strpos(domain($url),$GLOBALS['instruction']['host'])===false) continue;\r\n $result2[] = $url;\r\n }\r\n $r = $result2;\r\n\r\n if (DEV)\r\n xlogc('urls', $r, $data);\r\n\r\n return $r;\r\n}", "private function full($url = NULL)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$headers = get_headers($url,1);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// Some kind of error\n\t\t\t// Abandon and return original url\n\t\t\tKohana::$log->add(Log::ERROR, Kohana_Exception::text($e));\n\t\t\treturn $url;\n\t\t}\n\n\t\tif (empty($headers))\n\t\t{\n\t\t\treturn $url;\n\t\t}\n\n\t\tif ( ! isset($headers['Location']))\n\t\t{\n\t\t\treturn $url;\n\t\t}\n\t\t$url = $headers['Location'];\n\t\t\n\t\t// If an Array is returned for redirects\n\t\t// Return the last item in the array\n\t\treturn is_array($url)? end($url) : $url;\n\t}", "protected function completeAllUrls(&$rows) {\n foreach ($rows as &$row) {\n $row['url'] = $this->completeUrl($row['url']);\n }\n }", "public static function mergeLocationsUrls(array $locationWithUrls): array\n {\n try {\n $urls = [];\n\n foreach ($locationWithUrls as $location) {\n array_push($urls, $location['image']);\n }\n return $urls;\n } catch (\\PDOException $exception) {\n die('Erreur : ' . $exception->getMessage());\n }\n }", "public static function url_final_redirect( $url ) {\n\t\t\t$ch = curl_init( $url );\n\t\t\tcurl_setopt( $ch, CURLOPT_NOBODY, 1 );\n\t\t\tcurl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 ); // Follow redirects.\n\t\t\tcurl_setopt( $ch, CURLOPT_AUTOREFERER, 1 ); // Set referer on redirect.\n\t\t\tcurl_exec( $ch );\n\t\t\t$target = curl_getinfo( $ch, CURLINFO_EFFECTIVE_URL );\n\t\t\tcurl_close( $ch );\n\n\t\t\tif ( $target ) {\n\t\t\t\treturn $target;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "function update_refurls()\n{\n\tglobal $database;\n\n\t// IF URL IS NOT EMPTY\n\t$referring_url = $_SERVER[\"HTTP_REFERER\"];\n\tif(strpos(strtolower($referring_url), strtolower($_SERVER[\"HTTP_HOST\"])) !== FALSE) { return; }\n\n\tif( $referring_url )\n {\n\t // IS URL ALREADY IN DATABASE? IF YES, ADD TO HITS. IF NO, ADD NEW ROW\n\t $referring_url = str_replace(\"http://www.\", \"http://\", $referring_url);\n\t $database->database_query(\"\n INSERT INTO se_statrefs\n (statref_hits, statref_url)\n VALUES\n ('1', '{$referring_url}')\n\t\t\tON DUPLICATE KEY UPDATE\n statref_hits=statref_hits+1\n \");\n \n\t // IF 1000 ROWS REACHED, DELETE ONE TO MAKE ROOM\n\t $refurl_totalrows = $database->database_num_rows($database->database_query(\"SELECT statref_id FROM se_statrefs\"));\n \n\t if( $refurl_totalrows > 1000 )\n $database->database_query(\"DELETE FROM se_statrefs WHERE statref_hits='1' ORDER BY statref_id ASC LIMIT 1\");\n\t}\n}", "function curl_exec_follow($ch, &$maxredirect = null) {\n // us as a bot and don't let us do our job\n $user_agent = \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)\".\n \" Gecko/20041107 Firefox/1.0\";\n curl_setopt($ch, CURLOPT_USERAGENT, $user_agent );\n $mr = $maxredirect === null ? 5 : intval($maxredirect);\n {\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);\n if ($mr > 0) {\n $original_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);\n $newurl = $original_url;\n $rch = curl_copy_handle($ch);\n curl_setopt($rch, CURLOPT_HEADER, true);\n curl_setopt($rch, CURLOPT_NOBODY, true);\n curl_setopt($rch, CURLOPT_FORBID_REUSE, false);\n do {\n curl_setopt($rch, CURLOPT_URL, $newurl);\n $header = curl_exec($rch);\n if (curl_errno($rch)) {\n $code = 0;\n } else {\n $code = curl_getinfo($rch, CURLINFO_HTTP_CODE);\n if ($code == 301 || $code == 302) {\n preg_match('/Location:(.*?)\\n/i', $header, $matches);\n $newurl = trim(array_pop($matches));\n // if no scheme is present then the new url is a\n // relative path and thus needs some extra care\n if(!preg_match(\"/^https?:/i\", $newurl)){\n $newurl = $original_url . $newurl;\n } \n } else {\n $code = 0;\n }\n }\n } while ($code && --$mr);\n curl_close($rch);\n if (!$mr) {\n if ($maxredirect === null)\n trigger_error('Too many redirects.', E_USER_WARNING);\n else\n $maxredirect = 0;\n return false;\n }\n curl_setopt($ch, CURLOPT_URL, $newurl);\n }\n }\n return curl_exec($ch);\n}", "abstract public function get_url_update();", "public function setLinksFoundArray()\n { \n $cnt = count($this->links_found_url_descriptors);\n for ($x=0; $x<$cnt; $x++)\n {\n $UrlDescriptor = $this->links_found_url_descriptors[$x];\n \n // Convert $UrlDescriptor-object to an array\n $object_vars = get_object_vars($UrlDescriptor);\n \n $this->links_found[] = $object_vars;\n }\n }", "private function isRefresh($lastUrl): bool\n\t{\n\t\treturn $lastUrl == $_SERVER['HTTP_REFERER'];\n\t}", "public function getNextLocation($requestHttps) {\n $url=$this->statusLocation!=''?$this->statusLocation:$this->resultLocation;\n if ($requestHttps && Strings::startsWith(Strings::lower($url),'http:')){\n $url='https:'.Strings::substring($url,5);\n }\n return $url;\n }", "final public function assertLastRequestUrl($url)\n {\n $this->assertNotEmpty($this->history);\n $this->assertEquals($url, end($this->history)['request']->getUri());\n }", "public function addSiteLinks()\n {\n foreach ($this->getSiteLinks() as $item) {\n $this->addArray($item);\n }\n }", "public function download_url_redirect( array $downloads ) : array {\n\t\t// Array of file names to redirect instead of protect.\n\t\t$downloads_to_redirect = array( 'Chart', 'Bible Timeline with World History' );\n\n\t\tforeach ( $downloads as $key => $download ) {\n\t\t\tif ( in_array( $download['download_name'], $downloads_to_redirect, true ) ) {\n\t\t\t\t$downloads[ $key ]['download_url'] = $download['file']['file'];\n\t\t\t}\n\t\t}\n\n\t\treturn $downloads;\n\t}", "public static function should_redirect_urls_provider() {\n $badurl1 = new \\moodle_url('/');\n $badparam1 = $badurl1->out();\n $badurl2 = new \\moodle_url('admin/tool/mfa/auth.php');\n $badparam2 = $badurl2->out();\n return [\n ['/', 'http://test.server', true],\n ['/admin/tool/mfa/action.php', 'http://test.server', true],\n ['/admin/tool/mfa/factor/totp/settings.php', 'http://test.server', true],\n ['/', 'http://test.server', true, ['url' => $badparam1]],\n ['/', 'http://test.server', true, ['url' => $badparam2]],\n ['/admin/tool/mfa/auth.php', 'http://test.server', false],\n ['/admin/tool/mfa/auth.php', 'http://test.server/parent/directory', false],\n ['/admin/tool/mfa/action.php', 'http://test.server/parent/directory', true],\n ['/', 'http://test.server/parent/directory', true, ['url' => $badparam1]],\n ['/', 'http://test.server/parent/directory', true, ['url' => $badparam2]],\n ['/admin/tool/securityquestions/set_responses.php', 'http://test.server', false],\n ['/admin/tool/securityquestions/set_responses.php', 'http://test.server', false, ['delete' => 1]],\n ['/admin/tool/securityquestions/randompage.php', 'http://test.server', true, ['delete' => 1]],\n ];\n }", "function curl_exec_follow(/*resource*/ $ch, /*int*/ &$maxredirect = null) {\n\t$mr = $maxredirect === null ? 5 : intval($maxredirect);\n\tif (ini_get('open_basedir') == '' && ini_get('safe_mode' == 'Off')) {\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, $mr > 0);\n\t\tcurl_setopt($ch, CURLOPT_MAXREDIRS, $mr);\n\t} else {\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);\n\t\tif ($mr > 0) {\n\t\t\t$newurl = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);\n\n\t\t\t$rch = curl_copy_handle($ch);\n\t\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Owncloud Bookmark Crawl\");\n\t\t\tcurl_setopt($rch, CURLOPT_HEADER, true);\n\t\t\tcurl_setopt($rch, CURLOPT_NOBODY, true);\n\t\t\tcurl_setopt($rch, CURLOPT_FORBID_REUSE, false);\n\t\t\tcurl_setopt($rch, CURLOPT_RETURNTRANSFER, true);\n\t\t\tdo {\n\t\t\t\tcurl_setopt($rch, CURLOPT_URL, $newurl);\n\t\t\t\t$header = curl_exec($rch);\n\t\t\t\tif (curl_errno($rch)) {\n\t\t\t\t\t$code = 0;\n\t\t\t\t} else {\n\t\t\t\t\t$code = curl_getinfo($rch, CURLINFO_HTTP_CODE);\n\t\t\t\t\tif ($code == 301 || $code == 302) {\n\t\t\t\t\t\tpreg_match('/Location:(.*?)\\n/', $header, $matches);\n\t\t\t\t\t\t$newurl = trim(array_pop($matches));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$code = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while ($code && --$mr);\n\t\t\tcurl_close($rch);\n\t\t\tif (!$mr) {\n\t\t\t\tif ($maxredirect === null) {\n\t\t\t\t\tOCP\\Util::writeLog(\n\t\t\t\t\t\t'bookmark',\n\t\t\t\t\t\t'Too many redirects. When following redirects, libcurl hit the maximum amount on bookmark',\n\t\t\t\t\t\tOCP\\Util::ERROR);\n\t\t\t\t} else {\n\t\t\t\t\t$maxredirect = 0;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $newurl);\n\t\t}\n\t}\n\treturn curl_exec($ch);\n}", "public function setRedirectArray(array $param) {\n $this->redirect = $param;\n return;\n }", "function curl_exec_follow($ch, &$maxredirect = null) {\n // us as a bot and don't let us do our job\n $user_agent = \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)\".\n \" Gecko/20041107 Firefox/1.0\";\n curl_setopt($ch, CURLOPT_USERAGENT, $user_agent );\n\n $mr = $maxredirect === null ? 5 : intval($maxredirect);\n\n if (ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off') {\n\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $mr > 0);\n curl_setopt($ch, CURLOPT_MAXREDIRS, $mr);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n } else {\n \n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);\n\n if ($mr > 0)\n {\n $original_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);\n $newurl = $original_url;\n \n $rch = curl_copy_handle($ch);\n \n curl_setopt($rch, CURLOPT_HEADER, true);\n curl_setopt($rch, CURLOPT_NOBODY, true);\n curl_setopt($rch, CURLOPT_FORBID_REUSE, false);\n do\n {\n curl_setopt($rch, CURLOPT_URL, $newurl);\n $header = curl_exec($rch);\n if (curl_errno($rch)) {\n $code = 0;\n } else {\n $code = curl_getinfo($rch, CURLINFO_HTTP_CODE);\n if ($code == 301 || $code == 302) {\n preg_match('/Location:(.*?)\\n/', $header, $matches);\n $newurl = trim(array_pop($matches));\n \n // if no scheme is present then the new url is a\n // relative path and thus needs some extra care\n if(!preg_match(\"/^https?:/i\", $newurl)){\n $newurl = $original_url . $newurl;\n } \n } else {\n $code = 0;\n }\n }\n } while ($code && --$mr);\n \n curl_close($rch);\n \n if (!$mr)\n {\n if ($maxredirect === null)\n trigger_error('Too many redirects.', E_USER_WARNING);\n else\n $maxredirect = 0;\n \n return false;\n }\n curl_setopt($ch, CURLOPT_URL, $newurl);\n }\n }\n return curl_exec($ch);\n}", "public function prep_url_array($array,$unset = 0){\n for($i = 0; $i < $unset; $i++){\n unset($array[$i]);\n }\n return implode($array, '/');\n }", "public function addUrls($urlsArray)\n {\n if (!is_array($urlsArray)) {\n throw new \\InvalidArgumentException(\n 'Array as argument should be given.'\n );\n }\n foreach ($urlsArray as $url) {\n $this->addUrl(\n isset($url[0]) ? $url[0] : null,\n isset($url[1]) ? $url[1] : null,\n isset($url[2]) ? $url[2] : null,\n isset($url[3]) ? $url[3] : null\n );\n }\n }", "public function getNextPageUrl();", "public function getNextPageUrl();", "function approvelink($url) {\r\n\t\tif(empty($url)) {return;}\r\n\t\tarray_push($_SESSION['allowed_navs'], $url);\r\n\t\treturn;\r\n\t}", "protected function urlToArray(&$item)\n {\n $parse_url = parse_url($item['url']);\n\n if ($parse_url) {\n $path = $parse_url['path'];\n $params = [];\n\n # Set Url\n $item['url'] = [$path];\n\n if (!empty($parse_url['query'])) {\n $query = $parse_url['query'];\n $queries = explode('&', $query);\n\n foreach ($queries as $key => $value) {\n $split_equal = explode('=', $value);\n $params += [$split_equal[0] => $split_equal[1]];\n }\n\n $item['url'] += $params;\n }\n }\n }", "protected function preUpdate(&$entity) {\n $entityFromDb = ManagerHolder::get($this->managerName)->getById($entity['id'], 'page_url');\n if ($entityFromDb['page_url'] != $entity['page_url']) {\n $redirectData = array('old_url' => $entityFromDb['page_url'],\n 'new_url' => $entity['page_url']);\n // Check if we already have a redirect from current old url or eternal cycle\n $checkWhereArray = array(array('old_url' => $redirectData['old_url']),\n array('old_url' => $redirectData['new_url'],\n 'new_url' => $redirectData['old_url']));\n foreach ($checkWhereArray as $where) {\n $redirectUrl = ManagerHolder::get('RedirectUrl')->getOneWhere($where, 'e.*');\n if (!empty($redirectUrl)) {\n ManagerHolder::get('RedirectUrl')->deleteById($redirectUrl['id']);\n }\n }\n ManagerHolder::get('RedirectUrl')->insert($redirectData);\n }\n }", "abstract protected function getRedirectUrl(): Url;", "public function getLastuploaddate() {}", "private function getNextNotCrawledUrl(): ?Url\n {\n return $this->search->urls()\n ->notCrawled()\n ->first();\n }", "protected function getRedirectToListAppend()\r\n\t{\r\n\t\t$append = parent::getRedirectToListAppend();\r\n\r\n\t\tforeach ($this->allow_url_params as $param):\r\n\t\t\tif (JRequest::getVar($param))\r\n\t\t\t{\r\n\t\t\t\t$append .= \"&{$param}=\" . JRequest::getVar($param);\r\n\t\t\t}\r\n\t\tendforeach;\r\n\r\n\t\treturn $append;\r\n\t}", "public static function curl_exec_follow($ch, &$maxredirect = null) {\n // us as a bot and don't let us do our job\n $user_agent = \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)\".\n \" Gecko/20041107 Firefox/1.0\";\n curl_setopt($ch, CURLOPT_USERAGENT, $user_agent );\n\n $mr = $maxredirect === null ? 5 : intval($maxredirect);\n\n if (filter_var(ini_get('open_basedir'), FILTER_VALIDATE_BOOLEAN) === false\n && filter_var(ini_get('safe_mode'), FILTER_VALIDATE_BOOLEAN) === false\n ) {\n\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $mr > 0);\n curl_setopt($ch, CURLOPT_MAXREDIRS, $mr);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n } else {\n\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);\n\n if ($mr > 0)\n {\n $original_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);\n $newurl = $original_url;\n\n $rch = curl_copy_handle($ch);\n\n curl_setopt($rch, CURLOPT_HEADER, true);\n curl_setopt($rch, CURLOPT_NOBODY, true);\n curl_setopt($rch, CURLOPT_FORBID_REUSE, false);\n do\n {\n curl_setopt($rch, CURLOPT_URL, $newurl);\n $header = curl_exec($rch);\n if (curl_errno($rch)) {\n $code = 0;\n } else {\n $code = curl_getinfo($rch, CURLINFO_HTTP_CODE);\n if ($code == 301 || $code == 302) {\n preg_match('/Location:(.*?)\\n/i', $header, $matches);\n $newurl = trim(array_pop($matches));\n\n // if no scheme is present then the new url is a\n // relative path and thus needs some extra care\n if(!preg_match(\"/^https?:/i\", $newurl)){\n $newurl = $original_url . $newurl;\n }\n } else {\n $code = 0;\n }\n }\n } while ($code && --$mr);\n\n curl_close($rch);\n\n if (!$mr)\n {\n if ($maxredirect === null)\n trigger_error('Too many redirects.', E_USER_WARNING);\n else\n $maxredirect = 0;\n\n return false;\n }\n curl_setopt($ch, CURLOPT_URL, $newurl);\n }\n }\n return curl_exec($ch);\n }", "public function visited($url){\n if(!isset($this->visited)) $this->visited = array();\n if(array_search($url, $this->visited) !== false) return true;\n $this->visited[] = $url;\n return false;\n }", "protected function pushUrlToSitemap(\\SimpleXMLElement $sitemap,\n \\SplFixedArray $url\n ) {\n if ($sitemap->count() >= static::MAX_URLS_PER_SITEMAP) {\n return false;\n }\n $row = $sitemap->addChild('url');\n $row->addChild(\n 'loc',\n htmlspecialchars(\n $url[static::URL_PARAM_LOC],\n ENT_QUOTES,\n 'UTF-8'\n )\n );\n if (\n isset($url[static::URL_PARAM_LASTMOD])\n && !is_null($url[static::URL_PARAM_LASTMOD])\n ) {\n $row->addChild('lastmod', $url[static::URL_PARAM_LASTMOD]);\n }\n if (\n isset($url[static::URL_PARAM_CHANGEFREQ])\n && !is_null($url[static::URL_PARAM_CHANGEFREQ])\n ) {\n $row->addChild('changefreq', $url[static::URL_PARAM_CHANGEFREQ]);\n }\n if (\n isset($url[static::URL_PARAM_PRIORITY])\n && !is_null($url[static::URL_PARAM_PRIORITY])\n ) {\n $row->addChild('priority', $url[static::URL_PARAM_PRIORITY]);\n }\n// if (strlen($sitemap->asXML()) > static::MAX_SITEMAP_SIZE) {\n// unset($sitemap->url[$sitemap->count() - 1]);\n// return false;\n// }\n return true;\n }", "public function getRedirections(){\n return $this->_redirections;\n }", "public function init() {\n\t\tif ( $this->matched ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$request = new Red_Url_Request( Redirection_Request::get_request_url() );\n\n\t\t// Make sure we don't try and redirect something essential\n\t\tif ( $request->is_valid() && ! $request->is_protected_url() ) {\n\t\t\tdo_action( 'redirection_first', $request->get_decoded_url(), $this );\n\n\t\t\t// Get all redirects that match the URL\n\t\t\t$redirects = Red_Item::get_for_url( $request->get_decoded_url() );\n\n\t\t\t// Redirects will be ordered by position. Run through the list until one fires\n\t\t\tforeach ( (array) $redirects as $item ) {\n\t\t\t\t$action = $item->get_match( $request->get_decoded_url(), $request->get_original_url() );\n\n\t\t\t\tif ( $action ) {\n\t\t\t\t\t$this->matched = $item;\n\n\t\t\t\t\tdo_action( 'redirection_matched', $request->get_decoded_url(), $item, $redirects );\n\n\t\t\t\t\t$action->run();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// We will only get here if there is no match (check $this->matched) or the action does not result in redirecting away\n\t\t\tdo_action( 'redirection_last', $request->get_decoded_url(), $this, $redirects );\n\n\t\t\tif ( ! $this->matched ) {\n\t\t\t\t// Keep them for later\n\t\t\t\t$this->redirects = $redirects;\n\t\t\t}\n\t\t}\n\t}", "protected function updateHistory() {\n self::$history[] = time();\n\n if ( 30 === count( self::$history ) ) {\n if ( reset( self::$history ) >= (time() - 30) ) {\n sleep( 2 );\n }\n\n array_shift( self::$history );\n }\n }", "public function addUrl(SiteMapEntryObject $siteMapEntryObject){\n array_push($this->urls, $siteMapEntryObject);\n }", "protected function updateBrokenLinks() {}", "protected function updateHistory()\n {\n self::$history[] = time();\n if(30 === count(self::$history))\n {\n if(reset(self::$history) >= (time() - 30))\n {\n sleep(2);\n }\n array_shift(self::$history);\n }\n }", "private static function checkPush($array,$i){\r\n\t\tif(isset($_GET[$i]) && !empty($_GET[$i])){\r\n\t\t\tif(strpos($_GET[$i],\"..\")===false){\r\n\t\t\t\tarray_push($array, $_GET[$i]);\r\n\t\t\t\treturn $array;\r\n\t\t\t}else{\r\n\t\t\t\tNotification::Error('Using \"..\" is not allowed.');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function initializeRedirectUrlHandlers() {}", "public function setRedirectUrl($url);", "protected function do_302($url) {\n $this->do_redirect($url, 302);\n }", "function wpmu_admin_redirect_add_updated_param($url = '')\n {\n }", "function spider($url)\n {\n global $http_urls;\n $url_array = array();\n\n //判断url是否有效,这个方法效率太低,不能用\n /*$array = get_headers($url,1); \n if(preg_match('/200/',$array[0])){ \n echo \"<pre/>\";\n print_r($array);\n }\n else\n {\n echo \"无效url资源!\";\n }*/\n $first_content = file_get_contents($url);\n $second_content = file_get_contents($url);\n \n $first_pattern = \"/^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$/\";\n $second_pattern = \"/http:\\/\\/[a-zA-Z0-9\\.]+/\";\n \n preg_match_all($first_pattern, $first_content, $first_match);\n preg_match_all($second_pattern, $second_content, $second_match);\n \n $result1 = array_unique($first_match[0]);\n $result2 = array_unique($second_match[0]);\n \n $final_urls = array_merge($result1, $result2);\n \n //print_r($final_urls);\n \n for($n = 0; $n < count($final_urls); $n++)\n {\n //echo $final_urls[$i].\"<br/>\";\n if(@file_get_contents($final_urls[$n])) $http_urls[] = $final_urls[$n];\n //spider($final_urls[$i]);\n }\n //print_r($http_urls);\n //spider($final_urls[0]);\n //parser($url);\n }", "function array_last($array, $callback, $default = null)\n\t{\n\t\treturn array_first(array_reverse($array), $callback, $default);\n\t}", "protected function addURLInfo($pURL)\n {\n $this->mNumURLs++;\n if ( count($this->mCurrentSitemap) >= self::MAX_URLS_PER_SITEMAP)\n {\n $this->writeSitemap();\n $this->mCurrentSitemap = array();\n }\n $this->mCurrentSitemap[] = $pURL;\n }", "function consolidateRelatedURIs($persArray){\n\t\t \n\t\t if(is_array($persArray)){\n\t\t\t\t$newPersArray = array();\n\t\t\t\t$doneURIs = array();\n\t\t\t\tforeach($persArray as $uriKey => $person){\n\t\t\t\t\t $doneRelURIs = array();\n\t\t\t\t\t $uriEx = explode(\"/\",$uriKey);\n\t\t\t\t\t $personUUID = $uriEx[count($uriEx) -1];\n\t\t\t\t\t $actName = $person[\"name\"];\n\t\t\t\t\t $actCount = $person[\"count\"];\n\t\t\t\t\t $linkedPersonURIs = $this->getLinkedPerson($personUUID);\n\t\t\t\t\t \n\t\t\t\t\t if(isset($person[\"rel\"]) || is_array($linkedPersonURIs)){\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(!isset($person[\"rel\"]) && is_array($linkedPersonURIs)){\n\t\t\t\t\t\t\t\t$person[\"rel\"] = $linkedPersonURIs;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(is_array($person[\"rel\"])){\n\t\t\t\t\t\t\t\t$maxCount = $actCount;\n\t\t\t\t\t\t\t\tforeach($person[\"rel\"] as $relURI){\n\t\t\t\t\t\t\t\t\t if(array_key_exists($relURI, $persArray) && !in_array($relURI, $doneURIs)){\n\t\t\t\t\t\t\t\t\t\t $relCount = $persArray[$relURI][\"count\"];\n\t\t\t\t\t\t\t\t\t\t if($relCount > $maxCount){\n\t\t\t\t\t\t\t\t\t\t\t\t$doneURIs[] = $uriKey;\n\t\t\t\t\t\t\t\t\t\t\t\t$uriKey = $relURI;\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t $actCount = $actCount + $relCount;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t $doneRelURIs[] = $relURI;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t if(!in_array($uriKey, $doneURIs)){\n\t\t\t\t\t\t $doneURIs[] = $uriKey;\n\t\t\t\t\t\t $newPersArray[$uriKey] = array(\"name\" => $actName, \"count\" => $actCount);\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t foreach($doneRelURIs as $doneRel){\n\t\t\t\t\t\t if(!in_array($doneRel, $doneURIs)){\n\t\t\t\t\t\t\t\t$doneURIs[] = $doneRel;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t }\n\t\t else{\n\t\t\t\t$newPersArray = $persArray;\n\t\t }\n\t\t \n\t\t \n\t\t return $newPersArray;\n\t\t //return $persArray;\n\t }", "function HookResourceconnectAllGenerateurl($url)\n\t{\n\tglobal $baseurl,$baseurl_short,$pagename,$resourceconnect_fullredir_pages;\n\t\n\tif (!in_array($pagename,$resourceconnect_fullredir_pages)) {return $url;} # Only fire for certain pages as needed.\n\t\n\t# Trim off the short base URL if it's been set.\n\tif (substr($url,0,strlen($baseurl_short))==$baseurl_short) {$url=substr($url,strlen($baseurl_short));}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\treturn ($baseurl . \"/\" . $url);\n\t}", "public function cache_redirects( $url, $matched_redirect, $redirects ) {\n\t\t$cache = Redirect_Cache::init();\n\t\t$cache->set( $url, $matched_redirect, $redirects );\n\t}", "public function validateRedirectUrlClearsUrlDataProvider() {}", "public function LastLink()\n {\n return HTTP::setGetVar(\n $this->getPaginationGetVar(),\n ($this->TotalPages() - 1) * $this->getPageLength(),\n ($this->request instanceof HTTPRequest) ? $this->request->getURL(true) : null\n );\n }", "public function purgeInvalidUrls();", "function store_all_links($owner_id,$base_url,$link_array){\n\t//database configuration\n\trequire 'database/snippet_links_db.php';\n\tfor($count=0;$count<count($link_array);$count++){\n\t\t$webpage_address = $link_array[$count];\n if(!check_if_link_is_added($webpage_address)){\n\t\t//store link into database\n\t\t$sql = \"INSERT INTO snippet_links(webpage_id,owner_id,parent_website,webpage_address,date_added)\n\t\t VALUES(NULL,'$owner_id','$base_url','$webpage_address',NOW())\";\n\t\t$result = mysqli_query($connection,$sql);\n\t\tif(!$result){\n\t\t}\n\t\telse{\n\t\t}\n }\n}\n\t//close the connection\n\tmysqli_close($connection);\n}", "private function recursiveFetch($url)\n\t{\n\t\t$ret = [];\n\t\t$i = 1;\n\t\tdo {\n\t\t\t// Add page numbers past page 1\n\t\t\tif ($i > 1)\n\t\t\t\t$url = $url . \"&page=$i\";\n\n\t\t\t// Make request\n\t\t\t$response = Requests::get($url);\n\n\t\t\t// Get response headers\n\t\t\t$header = $response->headers['link'];\n\n\t\t\tif ($response->status_code == 200)\n\t\t\t{\n\t\t\t\t// Decode response body\n\t\t\t\t$json = json_decode($response->body);\n\n\t\t\t\tif ( ! is_array($json))\n\t\t\t\t\tApp::abort(500, 'JSON not an array');\n\t\t\t\t// Join with previous responses\n\t\t\t\t$ret = array_merge($ret, $json);\n\t\t\t}\n\n\t\t\t$i++;\n\t\t// If last page link is included in header, continue to fetch next page\n\t\t} while (preg_match('/rel=\"last\"/', $header) === 1);\n\n\t\treturn $ret;\n\t}", "function array_last($array, $callback, $default = null)\n {\n return Arr::last($array, $callback, $default);\n }", "function addRedirectorAction(&$actionArray = [])\n{\n $actionArray['go'] = ['Mod-Redirector.php', 'showRedirectorPage'];\n}", "protected function getBatchRedirectUrl(): string\n {\n // default url\n $result = ['plugin' => $this->plugin, 'controller' => $this->name, 'action' => 'index'];\n\n $currentUrl = $this->request->getEnv('HTTP_ORIGIN') . $this->request->getRequestTarget();\n // if referer does not match current url, redirect to referer (delete action)\n if (false === strpos($this->referer(), $currentUrl)) {\n $result = $this->referer();\n }\n\n // use batch redirect url if provided (edit action)\n if ($this->request->getData('batch.redirect_url')) {\n $result = $this->request->getData('batch.redirect_url');\n }\n\n return Router::url($result);\n }", "function thinkup_extract_urls_filter ( $tu_post ) {\n\n $regex = '/[a-z]+:\\/\\/[a-z0-9-_]+\\.[a-z0-9-_@:~%&\\?\\+#\\/.=]+[^:\\.,\\)\\s*$]/i';\n\n if ( preg_match_all($regex, $tu_post->wp_post->post_content, $matches) ) {\n\n $tu_post->links = array_merge($tu_post->links, $matches[0]);\n\n }\n\n return $tu_post;\n\n}", "protected function _appendUrlRewritesToData($data)\n {\n\n $categoryIds = array_keys($data);\n $categories = Mage::getResourceModel('catalog/category_collection')\n ->setStoreId(Mage::app()->getStore()->getId())\n ->addIdFilter($categoryIds)\n ->addUrlRewriteToResult();\n\n foreach ($categories as $currentCategory) {\n $data[$currentCategory->getId()]['category_url'] = $currentCategory->getUrl();\n }\n\n return $data;\n }", "public function implodeArrayForUrlDataProvider() {}", "private function processURLtoArray($url) {\n #If the request isn't set then no url parameters have been used\n if (is_null($url)) {\n $this->exceptionWithResponseCode(400,$this->genericExceptionMessages[\"URLFormat\"]);\n }\n\n #Split the request into seperate parts, with the slash as a seperator\n #Note that apache will collapse multiple /'s into a single /)\n $requestArray = explode(\"/\",$url);\n\n #We should probably ignore trailing slashes, which will generate an empty array element\n #Using strlen so that '0' is not removed\n $requestArray = array_filter($requestArray, 'strlen');\n\n #The request url should have either 4 or 5 elements\n if(!in_array(count($requestArray),array(4,5))){\n $this->exceptionWithResponseCode(400,\n \"Request URL has the wrong number of elements. \" . $this->genericExceptionMessages[\"URLFormat\"]\n );\n }\n\n return $requestArray;\n }", "function helperCheckForWrongUrl() {\n\t\t$status = array();\n\n\t\tif ($GLOBALS['TSFE']->config['config']['baseURL'] != '' || $GLOBALS['TSFE']->config['config']['absRefPrefix']) {\n\t\t\t$currentDomain = t3lib_div::getIndpEnv('TYPO3_HOST_ONLY');\n\t\t\t$linkDomain = $this->pi_getPageLink($GLOBALS['TSFE']->id);\n\n\t\t\tif ($linkDomain != '' && strpos($linkDomain, $currentDomain) === false) {\n\t\t\t\t$status['current']\t= $currentDomain;\n\t\t\t\t$status['link']\t\t\t= $linkDomain;\n\t\t\t}\n\t\t}\n\n\t\treturn $status;\n\t}", "function AddLink()\n\t\t{\n\t\t\t$n=count($this->links)+1;\n\t\t\t$this->links[$n]=array(0,0);\n\t\t\treturn $n;\n\t\t}", "function get_remote_headers($url)\n{\n $parsed = parse_url($url);\n $host = $parsed[\"host\"];\n $fp = @fsockopen($host, 80, $errno, $errstr, 20);\n if(!$fp) return false;\n else {\n @fputs($fp, \"HEAD $url HTTP/1.1\\r\\n\");\n @fputs($fp, \"HOST: $host\\r\\n\");\n @fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n $headers = \"\";\n while(!@feof($fp))$headers .= @fgets ($fp, 128);\n }\n @fclose ($fp);\n $return = false;\n $arr_headers = explode(\"\\n\", $headers);\n foreach($arr_headers as $header) {\n // follow redirect\n $s = 'Location: ';\n if(substr(strtolower ($header), 0, strlen($s)) == strtolower($s)) {\n $url = trim(substr($header, strlen($s)));\n return get_remote_headers($url);\n }\n }\n return $arr_headers;\n}", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();" ]
[ "0.6817782", "0.6788585", "0.6553639", "0.64773464", "0.6474658", "0.6323355", "0.5697639", "0.5685583", "0.56749237", "0.5674817", "0.567464", "0.56344", "0.562474", "0.5550014", "0.5494907", "0.5417785", "0.5391177", "0.5363547", "0.53582066", "0.5355926", "0.5291076", "0.5284368", "0.5263161", "0.52084595", "0.5169703", "0.5157351", "0.51345676", "0.5125607", "0.5115931", "0.51116717", "0.5094447", "0.5079944", "0.5078674", "0.50777113", "0.5066487", "0.5035139", "0.5004215", "0.500408", "0.49850896", "0.49844193", "0.498262", "0.49591374", "0.49398416", "0.49349025", "0.49336857", "0.49311072", "0.49308866", "0.49088794", "0.49084923", "0.49047226", "0.48775837", "0.48664105", "0.4856856", "0.48461872", "0.48461872", "0.48357674", "0.4805167", "0.47859326", "0.47837242", "0.4771856", "0.47716013", "0.47494495", "0.47483057", "0.47404465", "0.47275424", "0.47264874", "0.47203368", "0.47186315", "0.4714154", "0.4704523", "0.47011694", "0.47006536", "0.46895948", "0.46880218", "0.46868843", "0.46864572", "0.4666124", "0.46649525", "0.46584818", "0.46575984", "0.46564174", "0.4655147", "0.46526337", "0.46491158", "0.46426666", "0.46344498", "0.46234214", "0.46207806", "0.4619017", "0.46119165", "0.4609139", "0.45984238", "0.4595912", "0.45925325", "0.45820022", "0.4576522", "0.45754325", "0.45733315", "0.45733315", "0.45733315" ]
0.64468145
5
make a directory at the given path
function image_to_iiif_s3_mkdir($path, $group) { if (!is_dir($path)) { if (false === mkdir($path, 0775, true)) { throw new Exception("Can't create directory : $path", 1); } chgrp($path, $group); clearstatcache(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function mkDir($path);", "function make_dir($path) {\n\t\t$subdir = \"\";\n\t\t$arrPath = explode('/', $path);\n\t\tforeach ($arrPath as $dir) {\n\t\t\t$subdir .= \"$dir\" . '/';\n\t\t\tif (!file_exists($subdir)) {\n\t\t\t\tmkdir($subdir);\n\t\t\t\tchmod($subdir, 0777);\n\t\t\t}\n\t\t}\n\t}", "protected function makeDirectory($path)\r\n {\r\n if (!is_dir(dirname($path))) {\r\n mkdir(dirname($path), 0777, true);\r\n }\r\n }", "protected function makeDirectory($path)\r\n {\r\n if (!is_dir(dirname($path))) {\r\n mkdir(dirname($path), 0777, true);\r\n }\r\n }", "protected static function makeDir($path) {\n\t\tif (!file_exists($path)) {\n\t\t\tmkdir($path, 0777, true);\n\t\t}\n\t}", "protected static function makeDir($path) {\n\t\tif (!file_exists($path)) {\n\t\t\tmkdir($path, 0777, true);\n\t\t}\n\t}", "protected function makeDirectory($path)\n {\n if (!is_dir(dirname($path))) {\n mkdir(dirname($path), 0777, true);\n }\n }", "protected function makeDirectory($path)\n {\n\n if ( ! $this->files->isDirectory(dirname($path)))\n {\n $this->files->makeDirectory(dirname($path), 0777, true, true);\n }\n }", "protected function makeDirectory($path)\n {\n if (!$this->files->isDirectory(dirname($path))) {\n $this->files->makeDirectory(dirname($path), 0777, true, true);\n }\n }", "protected function makeDirectory($path)\n {\n if (!$this->files->isDirectory(dirname($path))) {\n $this->files->makeDirectory(dirname($path), 0777, true, true);\n }\n }", "protected function makeDirectory($path)\n {\n if (!$this->files->isDirectory(dirname($path))) {\n $this->files->makeDirectory(dirname($path), 0777, true, true);\n }\n }", "public function makeDirectory($path)\n {\n if (! $this->files->isDirectory(dirname($path))) {\n $this->files->makeDirectory(dirname($path), 0777, true, true);\n }\n\n return $path;\n }", "protected function makeDirectory($path)\n {\n if (! $this->files->isDirectory(dirname($path))) {\n $this->files->makeDirectory(dirname($path), 0777, true, true);\n }\n }", "protected function makeDirectory($path)\n {\n if (!$this->files->exists($path)) {\n if (!$this->files->isDirectory($path)) {\n $this->files->makeDirectory($path, 0755, true, true);\n }\n }\n }", "protected function makeDirectory($path)\n {\n if (!$this->filesystem->isDirectory(dirname($path))) {\n $this->filesystem->makeDirectory(dirname($path), 0777, true, true);\n }\n }", "public function createDirectory($path) {\n\n $parentPath = dirname($path);\n if ($parentPath=='.') $parentPath='/';\n $parent = $this->getNodeForPath($parentPath);\n $parent->createDirectory(basename($path));\n\n }", "protected function makeDirectory($path)\n {\n if (! $this->files->isDirectory(dirname($path))) {\n $this->files->makeDirectory(dirname($path), 0777, true, true);\n }\n\n return $path;\n }", "protected function makeDirectory($path)\n {\n if (! $this->files->isDirectory(dirname($path))) {\n $this->files->makeDirectory(dirname($path), 0777, true, true);\n }\n\n return $path;\n }", "protected function makeDirectory(string $path): string\n {\n if (!$this->files->isDirectory($path)) {\n $this->files->makeDirectory($path, 0777, true, true);\n }\n\n return $path;\n }", "protected function makeDirectory(string $path): string\n {\n if (! $this->files->isDirectory($path)) {\n $this->files->makeDirectory($path, 0777, true, true);\n }\n return $path;\n }", "protected function makeDirectory($path)\n {\n $files = resolve(BaseFilesystem::class);\n\n if(!$files->isDirectory(dirname($path))) {\n $files->makeDirectory(dirname($path), 0755, true, true);\n }\n }", "public static function makeDir($path){\n $path = public_path() . $path . date(\"Y\") . date(\"m\") . \"/\";\n if(!file_exists($path)){//不存在则建立 \n $mk=@mkdir($path,0777, true); //权限 \n if(!$mk){\n echo \"No access for mkdir $path\";die();\n }\n @chmod($path,0777); \n } \n return $path; \n \n }", "private function make_path($path){\n\t\t\t// Test if path extist\n\t\t\tif(is_dir($path) || file_exists($path))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Create it\n\t\t\t\tmkdir($path, 0777, true);\n\t\t\t}\n\t}", "function path_dir ($path) {\r\n\t$path = PATH_PROGRAM.$path.'/';\r\n\tmk_dir($path);\r\n\treturn $path;\r\n}", "public static function createDirectory ($path) {\n\t\t\\clearstatcache(true, $path);\n\t\tif (!\\is_dir($path)) {\n\t\t\t\\mkdir($path, 493, true);\n\t\t}\n\t}", "public function mkDir($path)\n {\n // Try get into this dir, maybe it already there\n if (!@ftp_chdir($this->handle, $path)) {\n // Create dir\n ftp_mkdir($this->handle, $path);\n // Change rights\n ftp_chmod($this->handle, 0755, $path);\n // Go to it\n ftp_chdir($this->handle, $path);\n }\n }", "public function makeDirectory($path, $mode = 0755, $isRecursive = true);", "protected function createDirectory($path)\n {\n if (! File::exists($path)) {\n File::makeDirectory($path, 0755, true);\n }\n }", "public function makeDir($path)\n {\n if (! is_dir($path)) {\n return mkdir($path, 0777, true);\n }\n\n return false;\n }", "private function mkpath($path){\n $dirs=array();\n $path=preg_replace('/(\\/){2,}|(\\\\\\){1,}/','/',$path);\n $dirs=explode(\"/\",$path);\n $path=\"\";\n foreach ($dirs as $element){\n $path.=$element.\"/\";\n if(!is_dir($path)){ \n if(!mkdir($path)){ \n return false; \n }\n } \n }\n }", "function create_dirs($path)\n{\n if (!is_dir($path))\n {\n $directory_path = \"\";\n $directories = explode(\"/\",$path);\n array_pop($directories);\n \n foreach($directories as $directory)\n {\n $directory_path .= $directory.\"/\";\n if (!is_dir($directory_path))\n {\n mkdir($directory_path);\n chmod($directory_path, 0777);\n }\n }\n }\n}", "private function createDir($path)\n {\n if (!is_dir($path)) {\n if (!mkdir($path, self::CHMOD, true)) {\n throw new Exception('unable to create path '.$path);\n }\n }\n }", "private function createDir($path)\n {\n if (!is_dir($path)) {\n $success = mkdir($path, 0775, true);\n if (!$success) {\n throw new \\Exception(\"Cannot create folder {$path}. Check file system permissions.\");\n }\n }\n }", "public static function makeDir(string $path): string\n {\n $path = static::normalizePath($path);\n if (!file_exists($path)) {\n mkdir($path, recursive: true)\n || throw new CannotCreateDirectoryException(\"cannot create output directory: $path\");\n }\n if (!is_writable($path)) {\n throw new DirectoryIsNotWriteableException(\"output directory permissions are not valid: $path\");\n }\n return $path;\n }", "public static function generatepath( $path )\n {\n if (!is_dir($path))\n mkdir( $path , 0775, true);\n }", "private static function createDirectory($path)\n {\n $success = true;\n\n if (! is_dir($path))\n $success = mkdir($path, 0700, true);\n\n if ($success === false)\n throw new RuntimeException(\"Could not create $path\");\n }", "public static function createPath( $path )\r\n {\r\n $dirArray = array();\r\n $baseDir = '';\r\n\r\n while ($path != '.' && $path != '..' ) \r\n {\r\n if ( file_exists($path) ) \r\n {\r\n $baseDir = $path;\r\n break; \r\n }\r\n\r\n $dirArray[] = basename($path); //basename part\r\n $path = dirname($path); \r\n }\r\n\r\n for ( $i = count($dirArray) - 1; $i >= 0; $i-- )\r\n {\r\n if ( strpos($dirArray[$i], '.') !== FALSE ) \r\n {\r\n break;\r\n }\r\n\r\n @mkdir( $baseDir . '/' . $dirArray[$i] );\r\n $baseDir = $baseDir . '/' .$dirArray[$i];\r\n }\r\n }", "function createpath($path)\n{\n\t\t$exp=explode(\"/\",$path);\n\t\t\t\t$way='';\n\t\t\t\tforeach($exp as $n)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$way.=$n;\n\t\t\t\t\t\t@mkdir($way, 0777);\n\t\t\t\t\t\t@chmod($way, 0777);\n\t\t\t\t\t$way.='/';\n\t\t\t\t\t\t\n\t\t\t\t}\n}", "function fud_mkdir($path)\n{\n\t$dirs = array();\n\twhile (!is_dir($path)) {\n\t\t$dirs[] = $path;\n\t\t$path = dirname($path);\n\t\tif (!$path || $path == '/') {\n\t\t\tbreak;\n\t\t}\n\t}\n\tforeach (array_reverse($dirs) as $dir) {\n\t\tif (!mkdir($dir, 0755)) {\n\t\t\tfe('Failed to create \"'. $dir .'\" directory.');\t\n\t\t}\n\t}\n}", "public function mkdir($path)\n {\n \n }", "function create_dir($dir_path){\r\n die( __FILE__ . ' : ' . __LINE__ );\r\n }", "public function mkdir($path)\n {\n return FileHelper::mkdir($path);\n }", "public function makeDir($dirs, $mode = 0777);", "protected function createCacheDirectory($path)\n {\n $this->fileSystem->makeDirectory(dirname($path), 0777, true, true);\n }", "public function create($path)\n {\n return $this->fs->cloud()->createDir($path);\n }", "static public function mkdir($path) {\n\t\treturn self::$defaultInstance->mkdir($path);\n\t}", "function createDirectory($name, $path=ModuleCreator::PATH_MODULE_ROOT) \n {\n // create base directory\n/* $directoryName = $path.$name;\n if ( !file_exists( $directoryName ) ) {\n mkdir( $directoryName, ModuleCreator::DIR_MODE );\n }\n $this->values[ ModuleCreator::KEY_PATH_MODULE_ROOT ] = $directoryName.'/';\n*/\n $directoryName = $this->values[ ModuleCreator::KEY_PATH_MODULE_ROOT ];\n if ( !file_exists( $directoryName ) ) {\n mkdir( $directoryName, ModuleCreator::DIR_MODE );\n }\n \n // create sub directories\n // objects_bl\n// $blDirectory = $directoryName.ModuleCreator::PATH_OBJECT_BL;\n// $this->values[ ModuleCreator::KEY_PATH_MODULE_BL ] = $blDirectory;\n $blDirectory = $this->values[ ModuleCreator::KEY_PATH_MODULE_BL ];\n\n if ( !file_exists( $blDirectory ) ) {\n mkdir( $blDirectory, ModuleCreator::DIR_MODE );\n }\n \n // objects_da\n $daDirectory = $directoryName.ModuleCreator::PATH_OBJECT_DA;\n if ( !file_exists( $daDirectory ) ) {\n mkdir( $daDirectory, ModuleCreator::DIR_MODE );\n }\n \n // objects_pages\n $pageDirectory = $directoryName.ModuleCreator::PATH_OBJECT_PAGES;\n if ( !file_exists( $pageDirectory ) ) {\n mkdir( $pageDirectory, ModuleCreator::DIR_MODE );\n }\n \n // templates\n $templateDirectory = $directoryName.ModuleCreator::PATH_TEMPLATES;\n if ( !file_exists( $templateDirectory ) ) {\n mkdir( $templateDirectory, ModuleCreator::DIR_MODE );\n }\n \n }", "function wpdev_mk_dir($path, $mode = 0777) {\r\n\r\n if (DIRECTORY_SEPARATOR == '/')\r\n $path=str_replace('\\\\','/',$path);\r\n else\r\n $path=str_replace('/','\\\\',$path);\r\n\r\n if ( is_dir($path) || empty($path) ) return true; // Check if directory already exists\r\n if ( is_file($path) ) return false; // Ensure a file does not already exist with the same name\r\n\r\n $dirs = explode(DIRECTORY_SEPARATOR , $path);\r\n $count = count($dirs);\r\n $path = $dirs[0];\r\n for ($i = 1; $i < $count; ++$i) {\r\n if ($dirs[$i] !=\"\") {\r\n $path .= DIRECTORY_SEPARATOR . $dirs[$i];\r\n if ( !is_dir($path) && ( strpos($_SERVER['DOCUMENT_ROOT'],$path)===false ) ) {\r\n if (!is_dir($path) && !( mkdir($path, 0777) ) ) {\r\n return false;\r\n }\r\n /*@ chmod( $path, 0777 );*/\r\n }\r\n }\r\n }\r\n return true;\r\n }", "protected function createDirectory($path)\n {\n $filesystem = App::make('files');\n if (!$filesystem->isDirectory($path)) {\n $this->comment(\"Creating directory: \".$path);\n $filesystem->makeDirectory($path, 0777, true);\n return $filesystem;\n }\n return $filesystem;\n }", "public function createDirectoy(Path $path)\n\t{\n\t\treturn $this->_createDirectory($path, false);\n\t}", "function create_dir($path, $make_writable = false) {\n if(mkdir($path)) {\n if($make_writable) {\n if(!chmod($path, 0777)) {\n return false;\n } // if\n } // if\n } else {\n return false;\n } // if\n \n return true;\n }", "public function createPath( $path ) {\n\t\tif ( !file_exists($path) || !is_dir($path) ) {\n\t\t\tif ( !mkdir( $path, 0777, true ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn $path;\n\t}", "private function makeDirectory(): void\n {\n $this->directory = $this->simulation->fileAbsolutePath('correlations/' . $this->id);\n Utils::createDirectory($this->directory);\n }", "private function recursiveCreateDirectory($path)\n {\n if ( !File::isDirectory($path) )\n {\n File::makeDirectory($path, 0755, true);\n }\n }", "public function directory(string $path)\n {\n return new self($this->path . Str::moveFromBothEnds($path, '/') . '/');\n }", "public static function mkdir($path)\n {\n // (array) Convert Traversable object to array\n if ($path instanceof Traversable) {\n $path = iterator_to_array($path, FALSE);\n }\n\n // Loop through each directory to create (convert string to array if needed)\n foreach ((array) $path as $p) {\n // Directory doesn't exist, create it now\n if ( ! is_dir($p)) {\n // [recursion] Create parent directory if needed\n static::mkdir(dirname($p));\n\n // Failed to create directory\n if ( ! @mkdir($p)) {\n throw new RuntimeException('Failed to create directory: ' . $p);\n }\n }\n }\n\n // Successful if no exceptions thrown\n return TRUE;\n }", "function mdl_create_directory_if_not_exists(string $dirname)\n{\n // Create the path directory if not exists\n if (!is_dir($dirname)) {\n mkdir($dirname, 0777, true);\n }\n}", "function create_folder($dir) {\n\t\t// explode\n\t\t$explode = explode('/', $dir);\n\t\t$url = WWW_ROOT;\n\n\t\tif(!is_dir(WWW_ROOT.$dir)) {\n\t\t\t// loop through\n\t\t\tforeach($explode as $e) {\n\t\t\t\t$url .= $e.DS;\n\t\t\t\tif(!is_dir($url)) {\n\t\t\t\t\tmkdir($url);\n\t\t\t\t\tchmod($url, 0777);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function makeDir($dir = '')\n {\n if (!is_dir($dir) && $dir !== '') {\n mkdir($dir, 0777);\n }\n }", "function create_dir($dir){\r\n\t$arr = array($dir);\r\n\twhile(true){\r\n\t\t$dir = dirname($dir);\r\n\t\tif($dir == dirname($dir)){\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t$arr[] = $dir;\r\n\t}\r\n\t$arr = array_reverse($arr);\r\n\tforeach($arr as $dir){\r\n\t\tif(!is_dir($dir)){\r\n\t\t\tmkdir($dir);\r\n\t\t}\r\n\t}\r\n}", "public function createFolder($path) {\n $this->_command->setCommand(\"mkdir -p {$path}\");\n $this->_command->run();\n\n $this->_log->log(LogLevel::info, \"'{$path}' folder created\\n\");\n }", "public function nestedMKDir($path)\n {\n //Remove document-root if found in destination\n $p = str_replace($_SERVER['DOCUMENT_ROOT'], '', $path);\n\n $p = explode('/', $p);\n\n $nPath = $_SERVER['DOCUMENT_ROOT'];\n for($i=0; $i<=count($p)-1; $i++){\n if( empty($p[$i]) ) continue;\n\n $nPath .= '/' . $p[$i];\n if( !file_exists($nPath) ) mkdir($nPath, 0777);\n }\n }", "public function getFolderOrCreate($path)\n {\n if (!file_exists($path)) {\n mkdir($path, 0777, true);\n }\n return $path;\n }", "public static function createDirectory($path)\n {\n // init\n $path\t= self::normalizePath($path);\n\n // creation (if needed)\n if (!is_dir(realPath($path))) {\n mkdir($path, 0777, true);\n }\n\n return is_dir($path);\n }", "protected function createDirectory() {}", "public function creaCarpeta($path) {\n\n $rutaActual = $this->pwd();\n \n $carpetas = explode(\"/\", $path);\n foreach ($carpetas as $key => $carpeta) {\n if (!$this->chdir($carpeta)) {\n $this->mkdir($carpeta);\n //chmod($carpeta, 0775);\n }\n }\n \n $this->chdir($rutaActual);\n }", "public function createDirectoryRecursively(Path $path)\n\t{\n\t\treturn $this->_createDirectory($path, true);\n\t}", "function MakeDir()\n{\t\t\n\t$sFileUrl = '';\n\t\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t$sFileUrl = trim($_REQUEST['file-path']);\n\t\n\t\n\t$bIsDirectoryCreate = false;\n\t$bIsDirectoryCreate = mkdir($sFileUrl, 0777, true);\n\t\n\tif($bIsDirectoryCreate === true)\n\t{\n\t\techo '<correct>correct create directory</correct>';\n\t} else\n\t{\n\t\techo '<fail>cant create directory</fail>';\n\t}\n}", "private static function _makePath($pathToMake, $mode) {\n\n\t\t$fullpath = '';\n \n\t\t/* Explode into path parts */\n\t\t$pathparts = explode('/', $pathToMake);\n \n\t\t/* Remove the end one */\n\t\tarray_pop($pathparts);\n \n\t\t/* Create recursively */\n\t\t$createpath = implode('/', $pathparts);\n\t\tmkdir($createpath, 0755, true);\n\n\t}", "protected function createDir()\n\t\t{\n\t\t\t//si no existe la carpeta la creamos\n\t\t\tif (!file_exists($this->ruta))\n\t\t\t{\n\t\t\t\tmkdir($this->ruta,0777,true);\t\n\t\t\t}\n\t\t\t\n\t\t\tif (!file_exists($this->rutaMini))\n\t\t\t{\n\t\t\t\tmkdir($this->rutaMini,0777,true);\t\t\n\t\t\t}\t\n\t\t\t\t\n\t\t}", "public function createFolderIfNotExisted($path)\n {\n if (!file_exists($path)) {\n mkdir($path);\n }\n }", "private function ensureDirectoryExists($path)\n {\n if (!file_exists($path)) {\n mkdir($path, 0775, true);\n }\n }", "function create_folder($name)\n{\n $location = Path::get_repository_path() . 'lib/content_object/';\n Filesystem::create_dir($location . $name);\n}", "public function createDirectory($name, $path)\n {\n if (Directory::exists($this->disk, $path) && Directory::notExists($name, $this->disk, $path)) {\n Directory::createDirectory($name, $this->disk, $path );\n return Directory::metaDataOf(Path::normalize($path) . $name , $this->disk);\n }\n\n throw new DirectoryAlreadyExistsException();\n }", "protected function checkAndMakeDirectory($path)\n {\n $realPath = public_path($path);\n if (!File::exists($realPath)) {\n return File::makeDirectory($realPath, 0775, true);\n }\n\n return true;\n }", "function generate_directory($id){\n $filename = \"intranet/usuarios/\" . $id . \"/uploads/\";\n if (!file_exists($filename)) {\n mkdir($filename, 0777, true);\n }\n }", "protected static function ensureDirectoryExists($path)\n {\n if(!File::isDirectory($path)) {\n File::makeDirectory($path);\n }\n }", "private function createPathIfNeeded($path)\n {\n if ( ! is_dir($path)) {\n if (false === @mkdir($path, 0777, true) && !is_dir($path)) {\n return false;\n }\n }\n\n return true;\n }", "protected function _createWriteableDir($path) {\n $io = new Varien_Io_File();\n if (!$io->isWriteable($path) && !$io->mkdir($path, 0777, true)) {\n Mage::throwException(Mage::helper('catalog')->__(\"Cannot create writeable directory '%s'.\", $path));\n }\n }", "public function createDirectory()\n {\n $bReturn = $this->exists();\n if( !$bReturn && $this->_sPath->isValid() )\n {\n $bReturn = mkdir( (string)$this->_sPath, 0770, TRUE);\n if( $bReturn )\n {\n $this->_sPath->setValue( $this->getRealPath() );\n }\n }\n return $bReturn;\n }", "public function mkdir($dir)\n {\n }", "function makeDir($UUID, $SUBDIR){\n #make a hash of the UUID\n $hash = md5($UUID);\n #specify the path to the directory to be made\n $dir = \"./\" . $SUBDIR . \"/\" . substr($hash,0,2) . \"/$hash\";\n # a if it already exits, return\n if(is_dir($dir)) { return $dir; }\n #otherwise, attempt to make it-\n if(!mkdir($dir,0777,true)){\n echo(\"Failed to create '$dir'. Function makeDir\\n\");\n return false;\n }\n else\n return $dir;\n}", "function rmkdir($path, $mode = 0755) {\n\t\t$path = rtrim(preg_replace(array(\"/\\\\\\\\/\", \"/\\/{2,}/\"), \"/\", $path), \"/\");\n\t\t$e = explode(\"/\", ltrim($path, \"/\"));\n\t\tif(substr($path, 0, 1) == \"/\") {\n\t\t\t$e[0] = \"/\".$e[0];\n\t\t}\n\t\t$c = count($e);\n\t\t$cp = $e[0];\n\t\tfor($i = 1; $i < $c; $i++) {\n\t\t\tif(!is_dir($cp) && !@mkdir($cp, $mode)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$cp .= \"/\".$e[$i];\n\t\t}\n\t\treturn @mkdir($path, $mode);\n\t}", "public function createPath($path)\n {\n $absolutePath = $this->getAbsolutePath($path);\n if (!file_exists($absolutePath)) {\n // FIXME Check return value.\n FileHelper::createDirectory($absolutePath);\n } elseif (!is_dir($absolutePath)) {\n throw new InvalidParamException($path.' is a file, cannot create folder with the same name.');\n }\n\n return $absolutePath;\n }", "function createDirectory() {\n\t$fmpImporter = new FilemakerProImporter();\n\t$fmpImporter->createDirectory();\n}", "public function createDir($dirname, Config $config)\n {\n }", "function crateFolder($path,$mode)\n\t{\n\t\tif(!is_dir($path))\n\t\t\t{\n\t\t\t\tif(!mkdir($path,$mode))\n\t\t\t\t\t{return false;}else{return true;}\n\t\t\t}\n\t\telse{return \"Found\";}\n\t}", "function rmkdir($path, $mode = 0777) {\n\t\t$path = rtrim(preg_replace(array(\"/\\\\\\\\/\", \"/\\/{2,}/\"), \"/\", $path), \"/\");\n\t\t$e = explode(\"/\", ltrim($path, \"/\"));\n\t\tif(substr($path, 0, 1) == \"/\") {\n\t\t\t$e[0] = \"/\".$e[0];\n\t\t}\n\t\t$c = count($e);\n\t\t$cp = $e[0];\n\t\tfor($i = 1; $i < $c; $i++) {\n\t\t\tif(!is_dir($cp) && !@mkdir($cp, $mode)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$cp .= \"/\".$e[$i];\n\t\t}\n\t\treturn @mkdir($path, $mode);\n\t}", "public function createDirectory($path, $permissions = 0777)\n\t{\n\t\tmkdir($path, $permissions, true);\n\t}", "public function makeDir($dir){\n\t\tif(mkdir($dir))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public function mkdirIfNotExist($path=array())\n\t{\n\t\tforeach($path as $key=>$value)\n\t\t{\n\t\t\tif(file_exists($value) && is_dir($value)){\n\t\t\t}else{\n\t\t\t\tmkdir($value,0777);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}", "public function createFromRealDirectory($realPath);", "public function createRecursiveDirFromRoot($path)\n\t{\n\t\t$fs = new Filesystem();\n\t\t$root_dir = $this->container->get(\"kernel\")->getProjectDir() . \"/\";\n\t\t$new_path = $root_dir;\n\t\t$folders = explode(\"/\", $path);\n\t\t\n\t\tforeach ($folders as $index => $folder) {\n\t\t\t$new_path .= $folder;\n\t\t\t\n\t\t\tif (!$fs->exists($new_path)) {\n\t\t\t\t$fs->mkdir($new_path);\n\t\t\t}\n\t\t\t\n\t\t\tif ($index + 1 < count($folders)) {\n\t\t\t\t$new_path .= \"/\";\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $new_path;\n\t}", "public function createServiceDirectories($path)\n\t{\n\t\tforeach ($this->directories as $directory) {\n\t\t\t$this->createDirectory($path . '/' . $directory);\n\t\t\t$this->createFile($path . '/' . $directory . '/.gitkeep');\n\t\t}\n\t}", "private function check_directory($path) {\n\t\tif (!@opendir($path)) {\n\t\t\tmkdir($path, 0755);\n\t\t} //if(!@opendir($path))\n\t\treturn;\n\t}", "function rmkdir($path, $mode = 0777) {\n\n if (!file_exists($path)) {\n $path = rtrim(preg_replace(array(\"/\\\\\\\\/\", \"/\\/{2,}/\"), \"/\", $path), \"/\");\n $e = explode(\"/\", ltrim($path, \"/\"));\n if(substr($path, 0, 1) == \"/\") {\n $e[0] = \"/\".$e[0];\n }\n $c = count($e);\n $cp = $e[0];\n for($i = 1; $i < $c; $i++) {\n if(!is_dir($cp) && !@mkdir($cp, $mode)) {\n return false;\n }\n $cp .= \"/\".$e[$i];\n }\n return @mkdir($path, $mode);\n }\n\n if (is_writable($path)) {\n return true;\n }else {\n return false;\n }\n }", "public function createDirectory(string $path): bool\n {\n if (!is_dir($path)) {\n return mkdir($path, 0755, true);\n }\n\n return true;\n }", "public function createDir($dirname, Config $config) {\n return $this->write($dirname . '/', '', $config);\n }", "protected function _createDir($dir)\r\n\t{\r\n\t\tif ( substr($dir, -1) != DIRECTORY_SEPARATOR )\r\n\t\t\t$dir .= DIRECTORY_SEPARATOR;\r\n\t\tif (!is_dir($dir))\r\n\t\t\tmkdir($dir,0744,TRUE);\r\n\t\treturn $dir;\r\n\t}", "public static function makePath($path, $chmod = 0777) {\n\t\t// directory already exists, abort\n\t\tif (file_exists($path)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// check if parent directory exists\n\t\t$parent = dirname($path);\n\t\tif ($parent != $path) {\n\t\t\t// parent directory does not exist either\n\t\t\t// we have to create the parent directory first\n\t\t\t$parent = self::addTrailingSlash($parent);\n\t\t\tif (!@file_exists($parent)) {\n\t\t\t\t// could not create parent directory either => abort\n\t\t\t\tif (!self::makePath($parent, $chmod)) {\n\t\t\t\t\treturn false;\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// well, the parent directory exists or has been created\n\t\t\t// lets create this path\n\t\t\t$oldumask = @umask(0);\n\t\t\tif (!@mkdir($path, $chmod)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t@umask($oldumask);\n\t\t\t/*if (!@chmod($path, $chmod)) {\n\t\t\t\treturn false;\n\t\t\t}*/\n\t\t\tif (IS_APACHE_MODULE || !@is_writable($path)) {\n\t\t\t\t@chmod($path, 0777);\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "private function makeDirectory(string $dir)\n {\n if (is_dir($dir)) {\n return $dir;\n }\n if (@mkdir($dir, 0775, true)) {\n return $dir;\n }\n\n return null;\n }" ]
[ "0.84454393", "0.8248378", "0.820023", "0.820023", "0.8168945", "0.8168945", "0.81027263", "0.80196637", "0.80084306", "0.80084306", "0.80084306", "0.79797786", "0.797484", "0.79512775", "0.79410523", "0.7919908", "0.7903033", "0.7903033", "0.78566176", "0.78546256", "0.784149", "0.7810424", "0.78049815", "0.7741228", "0.7725787", "0.75321245", "0.7513664", "0.7500801", "0.7479198", "0.74341047", "0.73796046", "0.7365152", "0.73375994", "0.7255343", "0.7250199", "0.7224732", "0.7208616", "0.7201138", "0.71725994", "0.7117559", "0.70753133", "0.7046755", "0.70313853", "0.702953", "0.7019403", "0.6990886", "0.6953505", "0.69394857", "0.6899955", "0.68791914", "0.68692815", "0.68473744", "0.68465513", "0.680509", "0.6805061", "0.67692876", "0.6768269", "0.67547953", "0.6717915", "0.671673", "0.67166734", "0.67000717", "0.66570896", "0.65863407", "0.6579177", "0.65731764", "0.65705156", "0.65550137", "0.65280384", "0.65171796", "0.6451944", "0.6440697", "0.64398855", "0.64047873", "0.64040506", "0.6387804", "0.6387194", "0.6380948", "0.6370523", "0.63620496", "0.6355492", "0.63436735", "0.6342762", "0.63421464", "0.6333031", "0.63324064", "0.6323515", "0.6318138", "0.6311884", "0.6309513", "0.6298737", "0.6286233", "0.6279925", "0.62609977", "0.62557405", "0.62541735", "0.62410337", "0.6231699", "0.6225059", "0.6221087", "0.6219773" ]
0.0
-1
Display confirmation page to user
function display($tpl = null) { if ($this->getLayout() == 'cart') { $this->_displayCheckoutConfirmation($tpl) ; return ; } $db = & JFactory::getDBO() ; $document = & JFactory::getDocument() ; $eventId = JRequest::getInt('event_id', 0) ; if (!$eventId) { $menus = & JSite::getMenu(); $menu = $menus->getActive(); if (is_object($menu)) { $params = new JParameter($menu->params) ; $eventId = (int)$params->get('event_id', 0) ; } } if (!EventBookingHelper::acceptRegistration($eventId)) { $mainframe = & JFactory::getApplication() ; $Itemid = JRequest::getInt('Itemid'); $url = JRoute::_('index.php?option=com_eventbooking&Itemid='.$eventId.'&Itemid='.$Itemid, false) ; $mainframe->redirect($url, JText::_('EB_ERROR_REGISTRATION')); } JRequest::setVar('event_id', $eventId) ; $sql = 'SELECT title FROM #__eb_events WHERE id='.$eventId ; $db->setQuery($sql) ; $eventTitle = $db->loadResult(); $pageTitle = JText::_('EB_EVENT_REGISTRATION_CONFIRMATION') ; $pageTitle = str_replace('[EVENT_TITLE]', $eventTitle, $pageTitle) ; $document->setTitle($pageTitle); $layout = $this->getLayout(); if ($layout == 'group') { $this->_displayGroupConfirmation($tpl); } else { $this->_displayIndividualConfirmation($tpl); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionConfirm(){\n if($this->confirm('Yakin loe..??'))\n echo \"Ok deh kaka..\";\n else\n echo \"Ga yakin diee..:p\";\n }", "public function confirm()\n {\n $task = $this->getTask();\n $link = $this->getExternalTaskLink($task);\n\n $this->response->html($this->template->render('task_external_link/remove', array(\n 'link' => $link,\n 'task' => $task,\n )));\n }", "public function confirmAction() {\n if (Zend_Auth::getInstance()->hasIdentity())\n $this->_redirect($this->getUrl());\n\n $errors = array();\n\n $action = $this->getRequest()->getParam('a');\n\n switch ($action) {\n case 'email':\n $id = $this->getRequest()->getParam('id');\n $key = $this->getRequest()->getParam('key');\n\n $result = $this->em->getRepository('Champs\\Entity\\User')->activateAccount($id, $key);\n\n if (!$result) {\n $errors['email'] = 'Error activating your account';\n }\n\n break;\n }\n\n $this->view->errors = $errors;\n $this->view->action = $action;\n }", "function confirmation() {\n\t\n\n\n}", "function confirm($message = 'Are you sure?')\n{\n\t$CI\t=& get_instance();\n $CI->output->set_header(\"Cache-Control: no-store, no-cache, must-revalidate\");\n $CI->output->set_header(\"Cache-Control: post-check=0, pre-check=0\", FALSE);\n $CI->output->set_header(\"Pragma: no-cache\");\n\t$segments = $CI->uri->segment_array();\n\t\n\tif( end($segments) != 'yes')\n\t{\n\t\t$referrer = $CI->input->server('HTTP_REFERER');\n\t\tif (empty($referrer))\n\t\t{\n\t\t\t// No user agent referrer, use the controller index\n\t\t\t$RTR =& load_class('Router');\n\t\t\t$referrer = $RTR->fetch_directory().$RTR->fetch_class();\n\t\t}\n\n\t\t$data['no_href']\t= $referrer;\n\t\t$data['yes_href']\t= implode('/', $segments).'/yes';\n\t\t$data['message']\t= $message;\n\t\t\t\t\n\t\techo $CI->template->display('content/confirmation', $data, 'general', TRUE);\n\t\texit;\n\t}\n}", "public function confirmAction()\n {\n try {\n $orderId = (int) $this->getRequest()->getParam('order_id');\n $hash = $this->getRequest()->getParam('hash');\n $this->loadValidOrder($orderId, $hash);\n\n //Load and render basic layout\n $this->loadLayout();\n\n // set page title\n $title = $this->getLayout()->getBlock('dhlonlineretoure_customer_address_edit')->getTitle();\n $this->getLayout()->getBlock('head')->setTitle($this->__($title));\n\n // set current navigation entry\n $navigationBlock = $this->getLayout()->getBlock('customer_account_navigation');\n if ($navigationBlock) {\n $navigationBlock->setActive('sales/order/history');\n }\n\n $this->renderLayout();\n } catch (Exception $e) {\n //Show error message to user\n Mage::getSingleton('core/session')->addError($e->getMessage());\n Mage::helper(\"dhlonlineretoure/data\")->log($e->getMessage());\n\n $this->_redirect('*/*/error');\n }\n }", "public function action_confirm()\n\t{\n $params = input::post();\n\n\t\t// check field\n\t\t$validation = Validation::forge();\n\t\t$validation->add_field('c_name', '企業名', 'required');\n\t\t$validation->add_field('job_detail', '仕事内容', 'required');\n if (empty($params['salary']) === false) {\n //$validation->add_field('valid_string', '給与', array('numeric'));\n $validation->add_field('salary', '給与', 'valid_string[numeric]');\n }\n if (empty($params['reception_mail']) === false) {\n $validation->add_field('reception_mail', 'メールアドレス', 'valid_emails');\n }\n if (empty($params['home_page']) === false) {\n $validation->add_field('home_page', 'ホームページ', 'valid_url');\n }\n\n\t\tif ($validation->run()) {\n Confirm::setRequest($params);\n Confirm::run($params);\n $data['disp'] = Confirm::getRequest();\n\t\t\t$data['val'] = $params;\n $data['logo_path'] = Confirm::$image_path;\n\t\t\t$this->common_view->set('content', View::forge('career/confirm', $data));\n\t\t\treturn $this->common_view;\n\t\t} else {\n $this->common_view->set_global('err_msg', $validation->show_errors(), false);\n return $this->action_add();\n\t\t}\n\t\t\n\t}", "public function confirmAction()\n {\n if (!$this->_isActive()) {\n $this->norouteAction();\n return;\n }\n\n if ($this->_expireAjax()) {\n return;\n }\n\n if ($orderData = $this->getRequest()->getPost('order')) {\n $customerComment = (isset($orderData['customer_comment']) ? $orderData['customer_comment'] : '');\n $this->getOnepage()->getQuote()->setCustomerComment($customerComment);\n }\n\n $this->loadLayout();\n $this->renderLayout();\n }", "function confirmation() {\r\n return false;\r\n }", "public function actionSendConfirmationEmail() {\n\n\t\t$userId = User::checkLogged();\n\t\t$confirmation = User::generateConfirmationCode($userId);\n\t\t$subject = \"Confirm your account on JustRegMe\";\n\t\t$bodyPath = ROOT . '/template/email/confirmation.php';\n\t\t$body = include($bodyPath); //loads HTML-body from template\n\t\t\n\t\techo User::sendEmail($userId, $subject, $body);\n\n\t}", "public function confirmAction() {\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\n\t\t$controller = Zend_Controller_Front::getInstance ()->getRequest ()->getControllerName ();\n\t\ttry {\n\t\t\tif (is_numeric ( $id )) {\n\t\t\t\t$this->view->back = \"/admin/$controller/edit/id/$id\";\n\t\t\t\t$this->view->goto = \"/admin/$controller/delete/id/$id\";\n\t\t\t\t$this->view->title = $this->translator->translate ( 'Are you sure you want to delete the invoice selected?' );\n\t\t\t\t$this->view->description = $this->translator->translate ( 'The invoice will not be longer available' );\n\t\t\t\t$record = $this->invoices->find ( $id );\n\t\t\t\t$this->view->recordselected = $record ['number'] . \" - \" . Shineisp_Commons_Utilities::formatDateOut ( $record ['invoice_date'] );\n\t\t\t} else {\n\t\t\t\t$this->_helper->redirector ( 'list', $controller, 'admin', array ('mex' => $this->translator->translate ( 'Unable to process the request at this time.' ), 'status' => 'danger' ) );\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\techo $e->getMessage ();\n\t\t}\n\t\n\t}", "public function action_confirm()\n {\n $hash = $this->request->param('hash');\n\n $model_auth = new Model_Auth();\n\n $id = $model_auth->getUserIdByHash($hash, Model_Auth::TYPE_EMAIL_CONFIRM);\n\n if (!$id) {\n $error_text = 'Ваш аккаунт уже подтвержден';\n $this->template->content = View::factory('templates/error', ['error_text' => $error_text]);\n\n return;\n }\n\n $model_auth->deleteHash($hash, Model_Auth::TYPE_EMAIL_CONFIRM);\n\n $user = new Model_User($id);\n\n if (!$user->id) {\n $error_text = 'Переданы некорректные данные';\n $this->template->content = View::factory('templates/error', ['error_text' => $error_text]);\n\n return;\n }\n\n $user->updateUser($user->id, ['isConfirmed' => 1]);\n\n $this->redirect('/user/' . $id . '?confirmed=1');\n }", "function show_confirmation() {\r\n\tshow_header();\r\n?>\r\n<div class=\"box\">\r\n\t<p class=\"success\">The database connection was established successfully.</p>\r\n\t<p class=\"success\">The database tables were created or updated successfully.</p>\r\n\t<p class=\"success\">The application configuration file was updated successfully.</div>\r\n<form method=\"get\" action=\"install.php\">\r\n<p style=\"text-align: right\">\r\n\t<input type=\"hidden\" name=\"step\" value=\"3\" />\r\n\t<input type=\"submit\" value=\"Continue &gt;&gt;\" onclick=\"javascript:return fieldsAreValid();\" />\r\n</p>\r\n</form>\r\n<?php\r\n\tshow_footer();\r\n\texit;\r\n}", "public function actionConfirm()\n\t{\n\t\tif(isset($_SESSION) && isset($_SESSION['userRegisterVal']) && $_SESSION['userRegisterVal']['email'] != '')\n\t\t{\n\t\t\t $this->layout =\"homeinner\";\n\t\t\t $modelUser=new Users;\n\t\t\t \n\t\t\t //for getting lastly saved value of Gift model\n\t\t\t $userGiftId = $_SESSION['giftId'];\n\t\t\t \n\t\t\t if(isset($userGiftId) && $userGiftId != '')\n\t\t\t {\n\t\t\t\t \n\t\t\t\t Yii::app()->user->setFlash('successmessage','You have been registered properly.. Please check your mailbox');\n\t\t\t }\n\t\t\t else \n\t\t\t {\n\t\t\t\t \n\t\t\t\t Yii::app()->user->setFlash('failuremessage','Please fill the form properly again');\n\t\t\t }\n\t\t\t //for getting lastly saved value of Gift model by current user\n\t\t $giftLastValue=Gift::model()->findByAttributes(array('id'=>$userGiftId));\n\t\t\t //for getting lastly saved value of Gift model by current user\n\t\t\t\n\t\t\t //destroying session here..\n\t session_destroy(); \n\t \n\t //create new session to keep current gift id for fbshare\n\t session_start();\n\t $_SESSION['giftId'] = $userGiftId;\n\t\n\t //render page to view page....\n\t\t\t $this->render('finalconfirmed',array(\n\t\t\t\t 'modelUser'=>$modelUser,\n\t\t\t\t 'maxIdGift'=>$userGiftId,\n\t\t\t\t 'giftLastValue'=>$giftLastValue,\n\t\t\t ));\n\t\t}\n\t\telse\n\t\t{\n\t\t \t//Redirect to home page\n\t\t\t$this->redirect('../index.php', '');\n\t\t}\n\t}", "public function actionCustomiseconfirm()\n\t{\n\t\tif(isset($_SESSION) && isset($_SESSION['userRegisterVal']) && $_SESSION['userRegisterVal']['email'] != '')\n\t\t{\n\t\t\t$this->layout =\"homeinner\";\n\t\t\t$modelUser=new Users;\n\t\t\t$modelGifts=new Gift;\n\n\t\t\t//simply redirecting to Confirm page...\n\t\t\t$this->render('customizejerseyconfirm',array(\n\t\t\t\t'modelUser'=>$modelUser,\n\t\t\t));\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Redirect to home page\n\t\t\t$this->redirect('../index.php', '');\n\t\t}\n\t}", "function confirmation(){\n\t\tglobal $wpdb;\n\n\t\t$form_id = ( isset( $_REQUEST['form_id'] ) ) ? (int) esc_html( $_REQUEST['form_id'] ) : '';\n\n\t\tif ( !isset( $_REQUEST['vfb-submit'] ) )\n\t\t\treturn;\n\n\t\tdo_action( 'vfb_confirmation', $form_id, $this->new_entry_id );\n\n\t\t// Allow custom query arguments to be appended to redirects\n\t\t$query_args = apply_filters( 'vfb_redirect_query_args', '', $form_id, $this->new_entry_id );\n\n\t\t// Get forms\n\t\t$order = sanitize_sql_orderby( 'form_id DESC' );\n\t\t$forms \t= $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $this->form_table_name WHERE form_id = %d ORDER BY $order\", $form_id ) );\n\n\t\tforeach ( $forms as $form ) :\n\n\t\t\t// If user wants this to redirect to PayPal\n\t\t\tif ( $form->form_paypal_setting ) {\n\n\t\t\t\t$paypal_data = array(\n\t\t\t\t\t'paypal_field'\t=> $form->form_paypal_field_price,\n\t\t\t\t\t'item_name'\t\t=> $form->form_paypal_item_name,\n\t\t\t\t\t'currency_code'\t=> $form->form_paypal_currency,\n\t\t\t\t\t'tax_rate'\t\t=> $form->form_paypal_tax,\n\t\t\t\t\t'shipping'\t\t=> $form->form_paypal_shipping,\n\t\t\t\t\t'business'\t\t=> $form->form_paypal_email,\n\t\t\t\t);\n\n\t\t\t\t$this->paypal_redirect( $paypal_data, $form_id );\n\t\t\t}\n\n\t\t\t// Allow templating within confirmation message\n\t\t\t$form->form_success_message = $this->templating( $form->form_success_message );\n\n\t\t\t// Apply a filter for the success message\n\t\t\t$form->form_success_message = apply_filters( 'vfb_form_success_message', $form->form_success_message, $form_id, $form->form_success_type );\n\n\t\t\t// If text, return output and format the HTML for display\n\t\t\tif ( 'text' == $form->form_success_type ) :\n\t\t\t\treturn stripslashes( html_entity_decode( wp_kses_stripslashes( $form->form_success_message ) ) );\n\t\t\t// If page, redirect to the permalink\n\t\t\telseif ( 'page' == $form->form_success_type ) :\n\t\t\t\t$page = get_permalink( $form->form_success_message );\n\t\t\t\twp_redirect( esc_url_raw( $page . $query_args ) );\n\t\t\t\texit();\n\t\t\t// If redirect, redirect to the URL\n\t\t\telseif ( 'redirect' == $form->form_success_type ) :\n\t\t\t\twp_redirect( esc_url_raw( $form->form_success_message . $query_args ) );\n\t\t\t\texit();\n\t\t\t// Display Entry with Text message prepended\n\t\t\telseif ( 'display-entry' == $form->form_success_type ) :\n\t\t\t\t// At least output the Text message\n\t\t\t\t$output = stripslashes( html_entity_decode( wp_kses_stripslashes( $form->form_success_message ) ) );\n\n\t\t\t\t// Only add entry to output if Display Entries is active\n\t\t\t\tif ( class_exists( 'VFB_Pro_Display_Entries' ) ) {\n\t\t\t\t\t$output .= vfb_display_entries( array(\n\t\t\t\t\t\t'entry_id' \t=> $this->new_entry_id,\n\t\t\t\t\t\t'echo'\t\t=> 0\n\t\t\t\t\t));\n\t\t\t\t}\n\n\t\t\t\treturn $output;\n\t\t\tendif;\n\n\t\tendforeach;\n\t}", "public function confirmation() {\n return false;\n }", "public function confirmed()\n {\n if(!Auth::check()){\n return redirect()->route('auth.registration');\n }\n\n return view('confirm');\n }", "public function actionAccept($confirmation) {\n\n\t\tUser::confirmEmail($confirmation);\n\t}", "static function confirm($title, $msg, $false_button, $true_button)\n\t{\n\t\tself::echoPageHeader();\n\t\tUserSession::formOpen();\n\t\tself::info_box(\"/img/warning.png\", $title, $msg);\n\t\techo VSPACE;\n\t\tUserSession::button($false_button, UserSession::class . \"::invokeCallBackward\", FALSE);\n\t\techo HSPACE;\n\t\tUserSession::button($true_button, UserSession::class . \"::invokeCallBackward\", TRUE);\n\t\tUserSession::formClose();\n\t\tself::echoPageFooter();\n\t}", "public function confirmAction() {\r\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\r\n\t\t$controller = Zend_Controller_Front::getInstance ()->getRequest ()->getControllerName ();\r\n\t\ttry {\r\n\t\t\tif (is_numeric ( $id )) {\r\n\t\t\t\t$this->view->back = \"/admin/$controller/edit/id/$id\";\r\n\t\t\t\t$this->view->goto = \"/admin/$controller/delete/id/$id\";\r\n\t\t\t\t$this->view->title = $this->translator->translate ( 'Are you sure you want to delete the selected record?' );\r\n\t\t\t\t$this->view->description = $this->translator->translate ( 'If you delete the selected bank information, your customers will not be able to pay you with this method of payment' );\r\n\t\r\n\t\t\t\t$record = $this->productsattributes->find ( $id )->toArray();\r\n\t\t\t\t$this->view->recordselected = $record ['code'];\r\n\t\t\t} else {\r\n\t\t\t\t$this->_helper->redirector ( 'list', $controller, 'admin', array ('mex' => $this->translator->translate ( 'Unable to process the request at this time.' ), 'status' => 'danger' ) );\r\n\t\t\t}\r\n\t\t} catch ( Exception $e ) {\r\n\t\t\techo $e->getMessage ();\r\n\t\t}\r\n\t}", "public function confirm() {\n $user_id = $_GET['id'];\n $token = $_GET['token'];\n $userConfirmed = $this->model->confirmToken($user_id, $token);\n\n if ($userConfirmed) {\n $this->model->setFlash('success', 'Votre compte a bien été validé');\n // $_SESSION['flash']['success'] = 'Votre compte a bien été validé';\n header('location:index.php?controller=security&action=formLogin');\n } else {\n $this->model->setFlash('danger', \"Ce token n'est plus valide\");\n // $_SESSION['flash']['danger'] = \"Ce token n'est plus valide\";\n header('location:index.php?controller=security&action=formRegister');\n }\n }", "function displayDeleteConfirmation()\n\t{\n\t\t$this->checkDisplayMode();\n\n\t\t// formular sent\n\t\tif ($_POST[\"form\"][\"delete\"])\n\t\t{\n\t\t\t$ini = true;\n\t\t\t$db = false;\n\t\t\t$files = false;\n\n\t\t\t/* disabled\n\t\t\tswitch ($_POST[\"form\"][\"delete\"])\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\t$ini = true;\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\t\tcase 2:\n\t\t\t\t\t$ini = true;\n\t\t\t\t\t$db = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\t$ini = true;\n\t\t\t\t\t$db = true;\n\t\t\t\t\t$files = true;\n\t\t\t\t\tbreak; \n\t\t\t}\n\t\t\t*/\n\n\t\t\t$msg = $this->setup->getClient()->delete($ini,$db,$files);\n\n\t\t\tilUtil::sendInfo($this->lng->txt(\"client_deleted\"),true);\n\t\t\tilUtil::redirect(\"setup.php\");\n\t\t}\n\n\t\t$this->tpl->setVariable(\"TXT_INFO\", $this->lng->txt(\"info_text_delete\"));\n\n\t\t// output\n\t\t$this->tpl->addBlockFile(\"SETUP_CONTENT\",\"setup_content\",\"tpl.form_delete_client.html\", \"setup\");\n\n\t\t// delete panel\n\t\t$this->tpl->setVariable(\"FORMACTION\", \"setup.php?cmd=gateway\");\n\t\t$this->tpl->setVariable(\"TXT_DELETE\", $this->lng->txt(\"delete\"));\n\t\t$this->tpl->setVariable(\"TXT_DELETE_CONFIRM\", $this->lng->txt(\"delete_confirm\"));\n\t\t$this->tpl->setVariable(\"TXT_DELETE_INFO\", $this->lng->txt(\"delete_info\"));\n\n\t\t$this->checkPanelMode();\n\t}", "function userConfirmation($data){\n\t\t$requiredData['action'] = $this->getPassword(@trim($data->action));\n\t\t$user_name_id = explode(\"#/#\",$requiredData['action']);\n\t\t$rec = $this->query(\"UPDATE `users` SET `status`=1 where `user_name` = '\".@$user_name_id[0].\"' AND `id`= \".@$user_name_id[1]);\n\t\tif($rec){\n\t\t\t$url = HTTP_HOST.\"confirm.php?action=1\";\n\t\t\techo \"<meta http-equiv=Refresh content=0;url=\".$url.\">\";\t\t\t\n\t\t\texit;\n\t\t}else{\n\t\t\t$url = HTTP_HOST.\"confirm.php?action=0\";\n\t\t\techo \"<meta http-equiv=Refresh content=0;url=\".$url.\">\";\t\t\t\n\t\t\texit;\t\t\n\t\t}\n\t}", "public function logoutConfirmAction()\n {\n // get the vars from the view\n $site = $this->view->site;\n\n // delete the cookie\n BeMaverick_Cookie::deleteUserCookie();\n\n // setup the params for redirecting to page\n $params = array(\n 'confirmPage' => 'authLogout',\n );\n\n $redirectUrl = $site->getUrl( 'home', $params );\n\n if ( $this->view->ajax ) {\n $this->view->redirectUrl = $redirectUrl;\n return $this->renderPage( 'redirect' );\n }\n\n return $this->_redirect( $redirectUrl );\n }", "function confirm()\n {\n return $this->__confirm();\n }", "function confirm()\n\t{\n\t\t$orderdetail = $this->Order_mdl->orderdetail();\n\t\t$voucher = $orderdetail['orderdetails_voucherno'];\n\t\t//---------------------------------\n\n\t\t// Second - Get session userid\n\t\t$sessiondata = $this->session->userdata('logged_in');\n\t\t$sessionid = $sessiondata['id'];\n\t\t//---------------------------------\n\n\t\t$data['orders'] = $this->Order_mdl->orderconfirm($voucher, $sessionid);\n\t\t\n\n\t\t$data['total'] = $orderdetail['orderdetails_total'];\n\t\t$data['voucher'] = $voucher;\n\n\n\t\t$data['session'] = $this->session->userdata('logged_in');\n\t\t$data['authors'] = $this->Author_mdl->list();\n\t\t$data['genres'] = $this->Genre_mdl->list();\n\n\t\t$data['innerdata'] = 'frontend/confirm';\n\n\t\t$this->load->view('include/frontendtemplate',$data);\n\n\n\t}", "protected function confirmTemplateSwitch()\n\t{\n\t\tinclude_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';\n\t\t$this->ctrl->setReturn($this,'perm');\n\t\t$this->ctrl->setCmdClass('ildidactictemplategui');\n\t\t$dtpl_gui = new ilDidacticTemplateGUI($this->gui_obj);\n\t\t$this->ctrl->forwardCommand($dtpl_gui,'confirmTemplateSwitch');\n\t}", "static function confirm_account() {\n \n # hash GET param exists\n if ($hash = data('hash')) {\n \n $hash = confirm_account($hash);\n\n if ($hash === -3)\n flash('Algo ocorreu errado. Tente novamente mais tarde..', 'error');\n else if ($hash === true)\n flash('Conta Confirmada! Agora você já pode se conectar.');\n }\n\n go('/');\n }", "public function thank_you_page()\r\n {\r\n if ($this->instructions) {\r\n return $this->displayPaymentApprovalInstructions();\r\n }\r\n }", "public function confirmUpdateSettings() {\n\t\techo '<div class=\"alert successful\"><span class=\"btnclose\">&times;</span><strong>Vos identifiants ont bien été mis à jour !</strong></div>';\n\t}", "public function displayConfirmation($message)\n {\n $this->initializeTemplateMessages();\n $this->templateConfirms[] = $message;\n\n return ' ';\n }", "function prompt ($template_file, $url, $message, $options = array(1 => 'Yes', 0 => 'No'), $parameter_name = 'confirm')\n{\n\tglobal $template;\n\n\t// Has confirmation page been displayed and confirmed already?\n\tif (isset($_REQUEST[$parameter_name]))\n\t{\n\t\treturn $_REQUEST[$parameter_name];\n\t}\n\t\n\t// Build choices to send to template\n\t$choices = array();\n\tforeach ($options as $value => $option_label)\n\t{\n\t\t$option_url = build_url($url, $_POST + $_GET + array($parameter_name => $value));\n\t\t$choices[] = array('u_choice' => $option_url, 'label' => $option_label);\n\t}\n\t\n\t// Send all variables to template and output\n\t$template->set_tpl_var('choices', $choices);\n\t$template->set_tpl_var('message', $message);\n\t$template->set_tpl_var('page_title', 'Please Confirm');\n\t$template->set_file('main', $template_file);\n\t$template->output('main');\n\texit;\n}", "public function confirmDestroy(){\n\t\tif(Auth::check()){\n\t\t\treturn view('user.confirm_destroy');\n\t\t}else{\n\t\t\treturn redirect('/login')->with('error','Please log in to perform this action');\n\t\t}\n\t}", "public function confirmed()\n {\n \n $this->alert('success', 'Hello World!', [\n 'position' => 'top-end', \n 'timer' => 3000, \n 'toast' => true, \n 'text' => '', \n 'confirmButtonText' => 'Ok', \n 'cancelButtonText' => 'Cancel', \n 'showCancelButton' => true, \n 'showConfirmButton' => true, \n ]);\n }", "public function confirmed()\n {\n \n $this->alert('success', 'Hello World!', [\n 'position' => 'top-end', \n 'timer' => 3000, \n 'toast' => true, \n 'text' => '', \n 'confirmButtonText' => 'Ok', \n 'cancelButtonText' => 'Cancel', \n 'showCancelButton' => true, \n 'showConfirmButton' => true, \n ]);\n }", "protected function confirmDelete() {\n\t}", "function ConfirmUser(){\r\n if(empty($_GET['code'])||strlen($_GET['code'])<=10){\r\n $this->HandleError(\"Please provide the confirm code\");\r\n return false;\r\n }\r\n $user_rec = array();\r\n if(!$this->UpdateDBRecForConfirmation($user_rec)){\r\n return false;\r\n }\r\n \r\n $this->SendUserWelcomeEmail($user_rec);\r\n \r\n $this->SendAdminIntimationOnRegComplete($user_rec);\r\n \r\n return true;\r\n }", "public function confirm(Request $request, Response $response, array $args): void\n {\n $this->ci->view->render($response, 'FormGenerator/confirm.html.twig', $request->getQueryParams());\n }", "function confirmation_redirect() {\n if (!SwpmFbForm::is_form_submitted() || $this->form->is_fatal() || !$this->form->is_valid()) {\n return;\n }\n\n global $wpdb;\n\n $form_id = ( isset($_REQUEST['form_id']) ) ? (int) esc_html($_REQUEST['form_id']) : '';\n\n // Get forms\n $order = sanitize_sql_orderby('form_id DESC');\n $forms = $wpdb->get_results($wpdb->prepare(\"SELECT * FROM $this->form_table_name WHERE form_id = %d ORDER BY $order\", $form_id));\n\n foreach ($forms as $form) :\n // If text, return output and format the HTML for display\n if ('page' == $form->form_success_type) {\n $page = get_permalink($form->form_success_message);\n wp_redirect($page);\n exit();\n }\n // If redirect, redirect to the URL\n elseif ('redirect' == $form->form_success_type) {\n wp_redirect(esc_url($form->form_success_message));\n exit();\n }\n\n endforeach;\n }", "public function getConfirmUrl() {\n\t\treturn $this->getEmailActionLink('email/emailConfirm');\n\t}", "public function actionConfirm($id, $code)\n {\n $user = $this->finder->findUserById($id);\n\n if ($user === null || $this->module->enableConfirmation == false) {\n throw new NotFoundHttpException;\n }\n\n $user->attemptConfirmation($code);\n\n return $this->render('/message', [\n 'title' => \\Yii::t('user', 'Account confirmation'),\n 'module' => $this->module,\n ]);\n }", "public function confirm() {\n\t\t\t\n\t\t\t$this->status = 'confirmed';\n\t\t\t$this->save();\n\t\t}", "function confirmation_delete(){\n\t\t\tif($this->check_session->user_session() && $this->check_session->get_level()==100){\n\t\t\t\tif($this->uri->segment(3)!='99'){ //jika bukan user pusat\n\t\t\t\t\t$data['url']\t\t= site_url('rsa_tambah_em/exec_delete/'.$this->uri->segment(3));\n\t\t\t\t\t$data['message']\t= \"Apakah anda yakin akan menghapus data ini ( kode : \".$this->uri->segment(3).\") ?\";\n\t\t\t\t\t$this->load->view('confirmation_',$data);\n\t\t\t\t}else{ //jika user pusat\n\t\t\t\t\t$data['class']\t = 'option box';\n\t\t\t\t\t$data['class_btn']\t = 'ya';\n\t\t\t\t\t$data['message'] = 'Unit pusat tidak diijinkan untuk dihapus';\n\t\t\t\t\t$this->load->view('messagebox_',$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tshow_404('page');\n\t\t\t}\n\t\t}", "public static function confirmation_center () \n { \n $html = null;\n\n load::view( 'admin/confirmation/center' );\n $html .= confirmation_center::form();\n\n return $html;\n }", "public function subscription_confirm()\n {\n $model = & $this->getModel('jms');\n $model->subscriptionConfirm();\n\n\n // $this->setRedirect('index.php?option=com_jms&task=jms.subscription_confirm&payment_method=iwl_paypal');\n }", "public function contactConfirm()\n {\n return view('contact.contactConfirm');\n }", "function confirm()\n\t\t{\n\t\t\tif (is_object($this->Gateway)) {\n\t\t\t\treturn $this->Gateway->confirm($this);\n\t\t\t}\n\t\t}", "public function confirm_delete($id)\n\t{\n\t\treturn_view('view.confirm_delete.php', $id);\n\t}", "public function confirmedAction()\n {\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $address = $user->getAddress();\n $city = $user->getCity();\n $geocodeAddress = $address . \",\" . $city;\n $geo = $this->container->get('simon_user.geocoder');\n $coord = $geo->geocode($geocodeAddress);\n $geometry = new Geometry();\n $geometry->setLat($coord[0]);\n $geometry->setLng($coord[1]);\n $geometry->setUser($user);\n $em->persist($geometry);\n $em->flush();\n return $this->render('@FOSUser/Registration/confirmed.html.twig', array(\n 'user' => $user,\n 'targetUrl' => $this->getTargetUrlFromSession(),\n ));\n }", "public function destroy()\n {\n //build a \"are you sure you want to delete\" popup/page\n\n //get user id from session\n //userid->delete\n //direct to page\n }", "public function confirm($confirmation)\n {\n $entry = Entry::where('confirmation', $confirmation)->first();\n\n if ($entry) {\n \n $entry->confirmation = null;\n $entry->save();\n\n return View::make('entry.confirm');\n }\n\n return Redirect::route('entry.index')\n ->withMessage(\"Sorry, the entry could not be confirmed.\");\n }", "function confirm_page(){\n $this->load->view('include/header.inc');\n $this->load->view('pages/register_complete.php' );\n $this->load->view('include/footer.inc');\n }", "public function showDeleteMessageAction()\n {\n Flash::addMessage('Your account will be deleted in the next few days by the webmaster.', Flash::INFO);\n\n $this->redirect('/');\n }", "protected function confirm_edit()\n\t{\n\t\t$msg = 'Successfully modified Booth ' . $this->fields['BoothNum'];\n\t\treturn '<font color = green>' . $msg . '</font><br>';\n\n\t}", "public function confirmationAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERUPDATE);\n \t$userId = $this->getRequest()->getParam('userId');\n $activationKey = $this->getRequest()->getParam(self::ACTIVATION_KEY_PARAMNAME);\n\n $user = $this->_getUserFromIdAndKey($userId, $activationKey);\n\n if(!$user){\n // No such user\n Globals::getLogger()->registrationError(\"Account activation: user retrieval failed - userId=$userId, key=$activationKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::ACTIVATION_FAILED));\n }\n\n $user->clearCache();\n $user = $this->_getUserFromIdAndKey($userId, $activationKey);\n\n if($user->{User::COLUMN_STATUS} == User::STATUS_PENDING){\n $user->{User::COLUMN_STATUS} = User::STATUS_MEMBER;\n $user->date = date('Y-m-d H:i:s');\n $id = $user->save();\n if($id !== $userId){\n Globals::getLogger()->registrationError(\"Account activation: user save failed - userId=$userId, key=$activationKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::ACTIVATION_FAILED));\n }\n\n $this->view->success = true;\n $this->view->alreadyDone = false;\n \t$this->_savePendingUserIdentity($userId);\n } else {\n $this->view->success = false;\n $this->view->alreadyDone = true;\n }\n }", "public function displayOrderConfirmation()\n\t{\n\t\tif (Validate::isUnsignedId($this->id_order))\n\t\t{\n\t\t\t$params = array();\n\t\t\t$order = new Order($this->id_order);\n\t\t\t$currency = new Currency($order->id_currency);\n\n\t\t\tif (Validate::isLoadedObject($order))\n\t\t\t{\n\t\t\t\t$params['total_to_pay'] = $order->getOrdersTotalPaid();\n\t\t\t\t$params['currency'] = $currency->sign;\n\t\t\t\t$params['objOrder'] = $order;\n\t\t\t\t$params['currencyObj'] = $currency;\n\n\t\t\t\treturn Hook::exec('displayOrderConfirmation', $params);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function actionIndex() {\n\n\t\t$userId = User::checkLogged();\n\t\t$user = User::getUserById($userId);\n\n\t\tif ($user['confirmation'] == \"\") {\n\t\t\t$this->actionSendConfirmationEmail();\n\t\t}\n\n\t\t$confirmed = ($user['confirmation'] == \"confirmed\"); // sets confirmed email flag\n\n\t\t$pageTitle = $userName = User::getUserName($userId);\n\t\trequire_once(ROOT . \"/views/account/index.php\");\n\t\treturn true;\n\t}", "public function get_confirm($user_id=0, $confirmation_code=0) {\n \n // If not information was provider, show the confirmation form\n if($user_id==0) {\n return View::make('login.confirm'); \n } else {\n // Confirm the account\n $user = User::where('id', '=', $user_id)\n ->where('confirmation_code', '=', $confirmation_code)\n ->first();\n\n if(is_null($user)) {\n return View::make('login.confirm')->with('confirm_error', true);\n } else {\n // Confirmed\n $user->confirmed='Y';\n $user->confirmation_code=null;\n $user->save();\n\n $this->successes[] = \"Your account has been confirmed successfully.\";\n //Session::put('successes', serialize($this->successes));\n\n // if the user is not logged in it will be redirected to the login page.\n if (Auth::guest()) return Redirect::to('login')->with('successes', serialize($this->successes));\n\n return Redirect::to('dashboard'); \n }\n }\n \n }", "protected function display_content() {\n $details = get_problem_details($this->id);\n $message = $this->lipsoutput->display_h2(get_string('administration_delete_problem_confirmation', 'lips') .\n \" \" . $details[$this->id]->problem_label . \" ?\");\n\n $continueurl = new moodle_url('action.php',\n array('id' => $this->cm->id,\n 'action' => $this->view,\n 'originV' => $this->originv,\n 'originAction' => $this->originaction,\n 'problemId' => $this->id,\n 'categoryId' => $this->categoryid));\n if ($this->originaction != null) {\n $cancelurl = new moodle_url('view.php',\n array('id' => $this->cm->id,\n 'view' => $this->originv,\n 'action' => $this->originaction,\n 'categoryId' => $this->categoryid));\n } else {\n $cancelurl = new moodle_url('view.php',\n array('id' => $this->cm->id,\n 'view' => $this->originv,\n 'categoryId' => $this->categoryid));\n }\n echo $this->lipsoutput->confirm($message, $continueurl, $cancelurl);\n }", "public function show_message() {\n\t\tif ( ! $this->is_activated || ! $this->purchase_code ) {\n\t\t\t$url = esc_url( 'admin.php?page=lievo-activation' );\n\t\t\t$link = sprintf( '<a href=\"%s\">%s</a>', $url, 'Product Activation' );\n\t\t\techo sprintf( ' To receive automatic updates a license activation is required. Please visit %s to activate your copy of LivIcons Evolution.', $link );\n\t\t}\n\t}", "public function displayconfirm_booking()\n\t{\n\t\t$id = $this->uri->segment(4);\n\t\t$excludeArr = array();\n\t\t$condition = array('id' => $id);\n\t\t$dataArr = array('status' => 'Paid');\n\t\t$this->order_model->commonInsertUpdate(PAYMENT, 'update', $excludeArr, $dataArr, $condition);\n\t\tredirect('admin/order/display_cod');\n\t}", "public function accountVerifyConfirmAction()\n {\n // get the view vars\n $errors = $this->view->errors; /* @var Sly_Errors $errors */\n $site = $this->view->site; /* @var BeMaverick_Site $site */\n $validator = $this->view->validator; /* @var BeMaverick_Validator $validator */\n\n // set the input params\n $requiredParams = array(\n 'code',\n );\n\n $input = $this->processInput( $requiredParams, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n // decode the hash and gets its parts, confirm all good and account is valid\n list( $username, $timestamp, $signature ) = explode( '|', base64_decode( urldecode( $input->code ) ) );\n\n $user = $site->getUserByUsername( $username );\n\n $validator->checkValidUser( $user, $errors );\n $validator->checkValidVerifyAccountCode( $site, $username, $timestamp, $signature, $errors );\n\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n $user->setEmailVerified( true );\n $user->save();\n\n // set the cookie\n BeMaverick_Cookie::updateUserCookie( $user );\n\n return $this->renderPage( 'authAccountVerifyConfirm' );\n }", "public function confirmationEmail()\n {\n $email = new Email;\n $email->sendEmail('submitted', 'applicant', Auth::user()->email);\n }", "public function confirmUserDeletion(): void\n {\n $this->resetErrorBag();\n\n $this->password = '';\n\n $this->dispatch('confirming-delete-user');\n\n $this->dispatch('open-modal', id: 'confirmingUserDeletion');\n }", "private function acceptConfirmation()\n {\n ChannelRepository::removeChannelsOfAuserByName(Chat::lastAskedQuestion()->answer,Chat::getCallBackQuery()->getFrom()->getId());\n Chat::$bot->editMessageText([\n 'text' => 'Your Channel Is Removed',\n 'inline_message_id' => Chat::getCallBackQuery()->getInlineMessageId()\n ]);\n Chat::deleteTemporaryData();\n Pages::channelOwnerPage();\n }", "public function confirm()\n {\n $this->confirmed = true;\n $this->confirmation_token = null;\n\n $this->save();\n }", "public function deleteBackupConfirm()\n {\n $delete_backups = $this->getPost('backups');\n $type = $this->getPost('type');\n $backups = $this->validateBackups($delete_backups, $type);\n $variables = array(\n 'settings' => $this->settings,\n 'backups' => $backups,\n 'backup_type' => $type,\n 'method' => $this->getPost('method'),\n 'errors' => $this->errors,\n 'view_helper' => $this->view_helper,\n 'url_base' => $this->url_base,\n 'menu_data' => $this->backup_lib->getDashboardViewMenu(),\n 'section' => 'db_backups',\n 'theme_folder_url' => plugin_dir_url(self::name)\n );\n \n //$template = 'backuppro/delete_confirm';\n \n //ee()->view->cp_page_title = $this->services['lang']->__('dashboard');\n $template = 'admin/views/delete_confirm';\n $this->renderTemplate($template, $variables);\n }", "public function confirmationAction($confirm)\n {\n $em = $this->getDoctrine()->getManager();\n $user = new User();\n $user_repository = $this->getDoctrine()->getRepository('CloudPodUserBundle:User');\n $user = $user_repository->findOneBy(array('confirmationCode'=>$confirm));\n\n if (!$user)\n {\n throw $this->createNotFoundException('Wrong Confirmation');\n }\n else\n { \n $user->setIsActive(true);\n $em->flush();\n \n return new Response('Account Confirmed!.You can now start using CloudPod.'); \n //return $this->redirect($this->generateUrl('admin_home');\n }\n }", "public static function confirmscreen($returnurl, $actionurl, $action = 'cancelsubscription')\n\t{\n\t\t?>\n\t\t<div class=\"confirmwrap\">\n\t\t\t<div class=\"confirmscreen\">\n\t\t\t\t<p class=\"warning\"><?php echo Lang::txt('COM_JOBS_CONFIRM_ARE_YOU_SURE') . \" \";\n\t\t\t\t\tif ($action == 'cancelsubscription')\n\t\t\t\t\t{\n\t\t\t\t\t\techo strtolower(Lang::txt('COM_JOBSSUBSCRIPTION_CANCEL_THIS'));\n\t\t\t\t\t}\n\t\t\t\t\telse if ($action == 'withdrawapp')\n\t\t\t\t\t{\n\t\t\t\t\t\techo Lang::txt('COM_JOBS_APPLICATION_WITHDRAW');\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo Lang::txt('COM_JOBS_ACTION_PERFORM_THIS');\n\t\t\t\t\t}\n\t\t\t\t\t$yes = strtoupper(Lang::txt('YES'));\n\t\t\t\t\t$yes .= $action == 'cancelsubscription' ? ', ' . Lang::txt('COM_JOBS_ACTION_CANCEL_IT') : '';\n\t\t\t\t\t$yes .= $action == 'withdrawapp' ? ', ' . Lang::txt('COM_JOBS_ACTION_WITHDRAW') : '';\n\t\t\t\t\t$no = strtoupper(Lang::txt('NO'));\n\t\t\t\t\t$no .= $action == 'cancelsubscription' ? ', ' . Lang::txt('COM_JOBS_ACTION_DO_NOT_CANCEL') : '';\n\t\t\t\t\t$no .= $action == 'withdrawapp' ? ', ' . Lang::txt('COM_JOBS_ACTION_DO_NOT_WITHDRAW') : ''; ?>\n\t\t\t\t</p>\n\t\t\t\t<p><span class=\"yes\"><a href=\"<?php echo $actionurl ?>\"><?php echo $yes ?></a></span> <span class=\"no\"><a href=\"<?php echo $returnurl ?>\"><?php echo $no ?></a></span></p>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "protected function confirm_edit()\n\t{\n\t\t$msg =\n\t\t\t$this->fields['FirstName'] . \" \" . $this->fields['LastName'] .\n\t\t\t\" successfully modified.\"\n\t\t;\n\n\t\treturn '<font color=\"green\">' . $msg . '</font><br>';\n\n\t}", "public function confirm( $question, $assoc_args = array() ) {\n\n \\WP_CLI::confirm( $question, $assoc_args );\n }", "public function confirmAction()\r\n {\r\n if (empty($this->View()->sUserLoggedIn)) {\r\n return $this->forward('login', 'account', null, array('sTarget'=>'sKUZOOffer', 'sTargetAction'=>'confirm'));\r\n } elseif ($this->basket->sCountBasket() < 1) {\r\n return $this->redirect(array(\r\n 'module' => 'frontend',\r\n 'controller' => 'checkout',\r\n 'action' => 'cart'\r\n ));\r\n }\r\n\r\n $this->View()->sCountry = $this->getSelectedCountry();\r\n $this->View()->sState = $this->getSelectedState();\r\n $this->View()->sPayment = $this->getSelectedPayment();\r\n $this->View()->sUserData[\"payment\"] = $this->View()->sPayment;\r\n\r\n $this->View()->sDispatch = $this->getSelectedDispatch();\r\n $this->View()->sPayments = $this->getPayments();\r\n $this->View()->sDispatches = $this->getDispatches();\r\n\r\n $this->View()->sBasket = $this->getBasket();\r\n\r\n $this->View()->sLaststock = $this->basket->sCheckBasketQuantities();\r\n $this->View()->sShippingcosts = $this->View()->sBasket['sShippingcosts'];\r\n $this->View()->sShippingcostsDifference = $this->View()->sBasket['sShippingcostsDifference'];\r\n $this->View()->sAmount = $this->View()->sBasket['sAmount'];\r\n $this->View()->sAmountWithTax = $this->View()->sBasket['sAmountWithTax'];\r\n $this->View()->sAmountTax = $this->View()->sBasket['sAmountTax'];\r\n $this->View()->sAmountNet = $this->View()->sBasket['AmountNetNumeric'];\r\n\r\n $this->View()->sPremiums = $this->getPremiums();\r\n\r\n $this->View()->sNewsletter = isset($this->session['sNewsletter']) ? $this->session['sNewsletter'] : null;\r\n $this->View()->sComment = isset($this->session['sComment']) ? $this->session['sComment'] : null;\r\n\r\n $this->View()->sShowEsdNote = $this->getEsdNote();\r\n\r\n $this->View()->sDispatchNoOrder = $this->getDispatchNoOrder();\r\n if(!$this->View()->sDispatch)\r\n {\r\n $this->View()->sDispatchNoOrder = true;\r\n }\r\n $this->View()->sRegisterFinished = !empty($this->session['sRegisterFinished']);\r\n\r\n $this->saveTemporaryOrder();\r\n\r\n if ($this->getMinimumCharge()) {\r\n return $this->forward('cart');\r\n }\r\n\r\n if($this->View()->sBasket['sAmount'] < Shopware()->Config()->inquiryvalue)\r\n {\r\n return $this->redirect(array(\r\n 'module' => 'frontend',\r\n 'controller' => 'checkout',\r\n 'action' => 'cart',\r\n 'amountError' => true\r\n ));\r\n }\r\n\r\n if(Shopware()->Plugins()->Backend()->sKUZOOffer()->assertMinimumVersion(\"5.2\")) {\r\n $activeBillingAddressId = $this->session->offsetGet('checkoutBillingAddressId', null);\r\n if(empty($activeBillingAddressId)) {\r\n $activeBillingAddressId = $this->View()->sUserData['additional']['user']['default_billing_address_id'];\r\n }\r\n\r\n $activeShippingAddressId = $this->session->offsetGet('checkoutShippingAddressId', null);\r\n if(empty($activeShippingAddressId)) {\r\n $activeShippingAddressId = $this->View()->sUserData['additional']['user']['default_shipping_address_id'];\r\n }\r\n\r\n $this->View()->assign('activeBillingAddressId', $activeBillingAddressId);\r\n $this->View()->assign('activeShippingAddressId', $activeShippingAddressId);\r\n\r\n $this->View()->assign('invalidBillingAddress', !$this->isValidAddress($activeBillingAddressId));\r\n $this->View()->assign('invalidShippingAddress', !$this->isValidAddress($activeShippingAddressId));\r\n\r\n $billingAddress = Shopware()->Models()->find('Shopware\\Models\\Customer\\Address',$activeBillingAddressId);\r\n $this->get('shopware_account.address_service')->setDefaultBillingAddress($billingAddress);\r\n $shippingAddress = Shopware()->Models()->find('Shopware\\Models\\Customer\\Address',$activeShippingAddressId);\r\n $this->get('shopware_account.address_service')->setDefaultShippingAddress($shippingAddress);\r\n\r\n $userData = $this->View()->sUserData;\r\n $userAddressData = Shopware()->Modules()->Admin()->sGetUserData();\r\n $userData['billingaddress'] = $userAddressData['billingaddress'];\r\n $userData['shippingaddress'] = $userAddressData['shippingaddress'];\r\n $this->View()->sUserData = $userData;\r\n }\r\n\r\n $this->session['sOrderVariables'] = new ArrayObject($this->View()->getAssign(), ArrayObject::ARRAY_AS_PROPS);\r\n $this->View()->sKUZOOffer = true;\r\n $this->View()->sTargetAction = 'confirm';\r\n }", "public function redirectUnconfirmed()\n {\n $securityContext = $this->container->get('security.context');\n $user = $this->checkUser();\n if ($user && !$securityContext->isGranted('ROLE_USER')) {\n return $this->router->generate('confirm_email_warning');\n }\n\n return FALSE;\n }", "public function onRegistrationConfirm(GetResponseUserEvent $event)\n {\n $this->_session->getFlashBag()->add(\n 'success',\n 'Votre compte a bien été activé. Vous pouvez désormais\n créer un compte pour votre structure eSport ou votre marque.'\n );\n $url = $this->_router->generate('inscription_index');\n $event->setResponse(new RedirectResponse($url));\n }", "function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html', $u_action = '')\n{\n\tglobal $user, $template, $db;\n\tglobal $phpEx, $phpbb_root_path;\n\n\tif (isset($_POST['cancel']))\n\t{\n\t\treturn false;\n\t}\n\n\t$confirm = false;\n\tif (isset($_POST['confirm']))\n\t{\n\t\t// language frontier\n\t\tif ($_POST['confirm'] === $user->lang['YES'])\n\t\t{\n\t\t\t$confirm = true;\n\t\t}\n\t}\n\n\tif ($check && $confirm)\n\t{\n\t\t$user_id = request_var('confirm_uid', 0);\n\t\t$session_id = request_var('sess', '');\n\t\t$confirm_key = request_var('confirm_key', '');\n\n\t\tif ($user_id != $user->data['user_id'] || $session_id != $user->session_id || !$confirm_key || !$user->data['user_last_confirm_key'] || $confirm_key != $user->data['user_last_confirm_key'])\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Reset user_last_confirm_key\n\t\t$sql = 'UPDATE ' . USERS_TABLE . \" SET user_last_confirm_key = ''\n\t\t\tWHERE user_id = \" . $user->data['user_id'];\n\t\t$db->sql_query($sql);\n\n\t\treturn true;\n\t}\n\telse if ($check)\n\t{\n\t\treturn false;\n\t}\n\n\t$s_hidden_fields = build_hidden_fields(array(\n\t\t'confirm_uid'\t=> $user->data['user_id'],\n\t\t'sess'\t\t\t=> $user->session_id,\n\t\t'sid'\t\t\t=> $user->session_id,\n\t));\n\n\t// generate activation key\n\t$confirm_key = gen_rand_string(10);\n\n\tif (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])\n\t{\n\t\tadm_page_header((!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title]);\n\t}\n\telse\n\t{\n\t\tpage_header(((!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title]), false);\n\t}\n\n\t$template->set_filenames(array(\n\t\t'body' => $html_body)\n\t);\n\n\t// If activation key already exist, we better do not re-use the key (something very strange is going on...)\n\tif (request_var('confirm_key', ''))\n\t{\n\t\t// This should not occur, therefore we cancel the operation to safe the user\n\t\treturn false;\n\t}\n\n\t// re-add sid / transform & to &amp; for user->page (user->page is always using &)\n\t$use_page = ($u_action) ? $phpbb_root_path . $u_action : $phpbb_root_path . str_replace('&', '&amp;', $user->page['page']);\n\t$u_action = reapply_sid($use_page);\n\t$u_action .= ((strpos($u_action, '?') === false) ? '?' : '&amp;') . 'confirm_key=' . $confirm_key;\n\n\t$template->assign_vars(array(\n\t\t'MESSAGE_TITLE'\t\t=> (!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title],\n\t\t'MESSAGE_TEXT'\t\t=> (!isset($user->lang[$title . '_CONFIRM'])) ? $title : $user->lang[$title . '_CONFIRM'],\n\n\t\t'YES_VALUE'\t\t\t=> $user->lang['YES'],\n\t\t'S_CONFIRM_ACTION'\t=> $u_action,\n\t\t'S_HIDDEN_FIELDS'\t=> $hidden . $s_hidden_fields)\n\t);\n\n\t$sql = 'UPDATE ' . USERS_TABLE . \" SET user_last_confirm_key = '\" . $db->sql_escape($confirm_key) . \"'\n\t\tWHERE user_id = \" . $user->data['user_id'];\n\t$db->sql_query($sql);\n\n\tif (defined('IN_ADMIN') && isset($user->data['session_admin']) && $user->data['session_admin'])\n\t{\n\t\tadm_page_footer();\n\t}\n\telse\n\t{\n\t\tpage_footer();\n\t}\n}", "function _displayFormConfirm($err='')\r\n\t{\r\n\t\t$dt = $this->_dt;\r\n\r\n\t\t$utpage = new utPage('draws');\r\n\t\t$content =& $utpage->getPage();\r\n\t\t$form =& $content->addForm('tDelDraws', 'draws', KID_DELETE);\r\n\r\n\t\t// Initialize the field\r\n\t\t$drawId = kform::getData();\r\n\t\tif ($err =='' && count($drawId))\r\n\t\t{\r\n\t\t\t$form->addHide(\"drawId\", $drawId);\r\n\t\t\t$form->addMsg('msgConfirmDel');\r\n\t\t\t$form->addBtn('btnDelete', KAF_SUBMIT);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif($err!='') $form->addWng($err);\r\n\t\t\telse $form->addWng('msgNeedDraws');\r\n\t\t}\r\n\t\t$form->addBtn('btnCancel');\r\n\t\t$elts = array('btnDelete', 'btnCancel');\r\n\t\t$form->addBlock('blkBtn', $elts);\r\n\r\n\t\t//Display the page\r\n\t\t$utpage->display();\r\n\t\texit;\r\n\t}", "function __confirm()\n {\n $postdata = 'Comando=validar&Token=' . $this->token;\n foreach($_POST as $key => $value) {\n $val = $this->__clearstr($value);\n $postdata.= \"&$key=$val\";\n }\n return $this->__getConfirmation($postdata);\n }", "public function confirm(Request $request)\n {\n return view('applicants.confirm');\n }", "public function thankyou_page() {\n\t\t\t\tif ( $this->instructions ) {\n\t\t\t\t\techo wpautop( wptexturize( $this->instructions ) );\n\t\t\t\t}\n\t\t\t}", "public function thankyou_page() {\r\n if ( $this->instructions )\r\n echo wpautop( wptexturize( $this->instructions ) );\r\n }", "protected function confirm_add()\n\t{\n\t\t$msg = 'Successfully added Booth ' . $this->fields['BoothNum'];\n\t\treturn '<font color = green>' . $msg . '</font><br>';\n\n\t}", "public function confirmPageTemplate( $data ) {\n\t\t\t?>\n <div id=\"WBCR\" class=\"wrap\">\n <div class=\"wbcr-factory-pages-000-impressive-page-template factory-bootstrap-000 factory-fontawesome-000\">\n <div id=\"wbcr-factory-confirm-dialog\">\n <h2><?php echo $data['title'] ?></h2>\n <p class=\"wbcr-factory-confirm-description\"><?php echo $data['description'] ?></p>\n\t\t\t\t\t\t<?php if ( isset( $data['hint'] ) ): ?>\n <p class=\"wbcr-factory-confirm-hint\"><?php echo $data['hint'] ?></p>\n\t\t\t\t\t\t<?php endif; ?>\n <div class='wbcr-factory-confirm-actions'>\n\t\t\t\t\t\t\t<?php foreach ( $data['actions'] as $action ) { ?>\n <a href='<?php echo $action['url'] ?>' class='<?php echo $action['class'] ?>'>\n\t\t\t\t\t\t\t\t\t<?php echo $action['title'] ?>\n </a>\n\t\t\t\t\t\t\t<?php } ?>\n </div>\n </div>\n </div>\n </div>\n\t\t\t<?php\n\t\t}", "function confirm_email() {\n \n\n $confirm_url = $this->traffic_model->GetAbsoluteURLFolder().'/confirm_register/' . $this->traffic_model->MakeConfirmationMd5();\n \n\n $this->email->from('[email protected]');\n\n $this->email->to($this->input->post('email'));\n $this->email->set_mailtype(\"html\");\n $this->email->subject('Confirm registration');\n $message = \"Hello \" . $this->input->post('username'). \"<br/>\" .\n \"Thanks for your registration with www.satrafficupdates.co.za <br/>\" .\n \"Please click the link below to confirm your registration.<br/>\" .\n \"$confirm_url<br/>\" .\n \"<br/>\" .\n \"Regards,<br/>\" .\n \"Webmaster <br/>\n www.satrafficupdates.co.za\n \";\n $this->email->message($message);\n if ($this->email->send()) {\n echo 'Message was sent';\n //return TRUE;\n } else {\n echo $this->email->print_debugger();\n //return FALSE;\n }\n\n\n\n\n }", "public function thankyou_page() {\n\t\t\tif ( $this->instructions ) {\n\t\t\t\techo wpautop( wptexturize( $this->instructions ) );\n\t\t\t}\n\t\t}", "public function actionSuccess()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\t\t\n\t\t$email = Yii::app()->request->getParam('email');\n\t\t$this->render('success', array('email'=>$email,'is_found'=>true));\n\t}", "public function thankyou_page() {\n if ( $this->instructions )\n echo wpautop( wptexturize( $this->instructions ) );\n }", "public function confirmedAction()\n {\n $user = $this->container->get('security.context')->getToken()->getUser();\n if (!is_object($user) || !$user instanceof UserInterface) {\n throw new AccessDeniedException('This user does not have access to this section.');\n }\n \n //add a default wall\n $user->createDefaultMemoryWall();\n $this->container->get('fos_user.user_manager')->updateUser($user);\n\n return $this->container->get('templating')->renderResponse('FOSUserBundle:Registration:confirmed.html.'.$this->getEngine(), array(\n 'user' => $user,\n ));\n }", "public function confirmingDeletion()\n {\n $this->confirmingExpenseDeletion = true;\n }", "public function thankyou_page() {\n if ( $this->instructions ) {\n echo wpautop( wptexturize( $this->instructions ) );\n }\n }", "static function confirm_account_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n $code = confirm_account_email($user->email);\n\n if ($code === -1) {\n flash('Sua conta já está confirmada, basta acessá-la.', 'warning');\n } else if ($code == true)\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você confirmar sua conta.\");\n else\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "public function unconfirmedTask()\n\t{\n\t\t$xprofile = User::getInstance();\n\t\t$email_confirmed = $xprofile->get('activation');\n\n\t\t// Incoming\n\t\t$return = Request::getString('return', urlencode('/'));\n\n\t\t// Check if the email has been confirmed\n\t\tif ($email_confirmed == 1 || $email_confirmed == 3)\n\t\t{\n\t\t\tApp::redirect(urldecode($return));\n\t\t}\n\n\t\t// Check if the user is logged in\n\t\tif (User::isGuest())\n\t\t{\n\t\t\t$return = base64_encode(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=' . $this->_task, false, true));\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=com_users&view=login&return=' . $return, false),\n\t\t\t\tLang::txt('COM_MEMBERS_REGISTER_ERROR_LOGIN_TO_CONFIRM'),\n\t\t\t\t'warning'\n\t\t\t);\n\t\t}\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway();\n\n\t\t// Set the page title\n\t\t$this->_buildTitle();\n\n\t\t// Instantiate a new view\n\t\t$this->view\n\t\t\t->set('title', Lang::txt('COM_MEMBERS_REGISTER_UNCONFIRMED'))\n\t\t\t->set('email', $xprofile->get('email'))\n\t\t\t->set('return', $return)\n\t\t\t->set('sitename', Config::get('sitename'))\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->display();\n\t}", "public function removeConfirm()\n {\n $project = $this->getProject();\n $recovery_plan_id = $this->request->getIntegerParam('recovery_plan_id', 0);\n\n\n $this->response->html($this->template->render('status:recoveryPlanDetail/remove', array(\n 'title' => t('Remove recovery plan'),\n 'project_id' => $project['id'],\n 'values' => array('id' => $recovery_plan_id)\n )));\n }", "public function confirmOrder()\n {\n return view('frontend.OrderConfirmationDetails.order-confirmation-detail');\n }", "public function confirm( $code )\n {\n if ( Confide::confirm( $code ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.confirmation');\n return Redirect::action('UserController@login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_confirmation');\n return Redirect::action('UserController@login')\n ->with( 'error', $error_msg );\n }\n }", "protected function showForgot() {}", "public function sendConfirm()\n {\n $newPackage = \"\";\n $client = $this->clientEntity;\n $client->writeByte($newPackage, ClientEntity::HEAD_MAIL_SENT);\n $client->writeByte($newPackage, 1);\n $client->writeLong($newPackage, $this->messageEntity->time);\n $client->addPackageToBuffer($newPackage);\n $client->sendToClient();\n $client->addPackageToBuffer($newPackage);\n $client->sendToClient();\n }", "public function confirmForget() {\n $user_id = $_GET['id'];\n $token = $_GET['token'];\n $userForgetConfirmed = $this->model->confirmTokenAfterForget($user_id, $token);\n\n if ($userForgetConfirmed) {\n $this->model->setFlash('success', 'Votre compte est à nouveau validé');\n // $_SESSION['flash']['success'] = 'Votre compte est à nouveau validé';\n header('location:index.php?controller=security&action=formReset');\n } else {\n $this->model->setFlash('danger', \"Ce token n'est plus valide\");\n // $_SESSION['flash']['danger'] = \"Ce token n'est plus valide\";\n header('location:index.php?controller=security&action=formLogin');\n }\n }", "public function confirmar($id)\n {\n //\n $empleado=Empleado::findOrFail($id);\n return view('empleado.confirmar',compact('empleado'));\n\n }", "protected function confirm_add()\n\t{\n\t\t$msg =\n\t\t\t$this->fields['FirstName'] . \" \" . $this->fields['LastName'] .\n\t\t\t\" added as administrator.\"\n\t\t;\n\n\t\treturn '<font color=\"green\">' . $msg . '</font><br>';\n\n\t}", "public function confirmOrder()\n {\n $order = Order::query()->findOrFail(request()->input('order'));\n\n if ($order->orderStatus->slug !== OrderStatus::PROCESSED) {\n return redirect()->back();\n }\n\n $order->delivery_tracking = request()->input('delivery_tracking');\n\n $order->setStatusSent();\n\n $order->save();\n\n $order->user->notify(new OrderSent($order));\n\n return redirect(backpack_url('order?status=2')) //http://lucilevilaine.local/admin/order?status=2\n ->with('success', 'La commande a bien été confirmé');\n }" ]
[ "0.747013", "0.7404322", "0.7373975", "0.7167018", "0.71636295", "0.71578187", "0.7087692", "0.7082611", "0.7027748", "0.7021388", "0.70210403", "0.7005809", "0.699584", "0.6970804", "0.6926242", "0.6866959", "0.6856123", "0.683469", "0.6799713", "0.67785984", "0.67783934", "0.6770096", "0.67678803", "0.6749472", "0.67489874", "0.6734174", "0.67071867", "0.6677275", "0.6662876", "0.666124", "0.66467494", "0.664594", "0.6639805", "0.6637286", "0.6615468", "0.6615468", "0.65969586", "0.65752625", "0.65662575", "0.65465504", "0.6527101", "0.65260243", "0.64954686", "0.64874184", "0.64775205", "0.6470841", "0.6468156", "0.64663184", "0.6447892", "0.6446308", "0.64279014", "0.64258045", "0.64059645", "0.6405274", "0.63989544", "0.639669", "0.63888663", "0.63599277", "0.6358794", "0.63490164", "0.634627", "0.6344125", "0.63358235", "0.6331044", "0.63177663", "0.6292735", "0.62917566", "0.6290169", "0.628479", "0.6271039", "0.626194", "0.6253918", "0.6244607", "0.6237824", "0.6233383", "0.6229132", "0.62057656", "0.619967", "0.61992645", "0.6194291", "0.6188163", "0.61855316", "0.61830145", "0.6168679", "0.6167229", "0.61640364", "0.6159919", "0.6159539", "0.61589205", "0.61572766", "0.61506814", "0.61309326", "0.61259425", "0.61252403", "0.61191916", "0.6115433", "0.61071306", "0.6099772", "0.6093358", "0.6091645", "0.60904557" ]
0.0
-1
Confirmation page for individual registration
function _displayIndividualConfirmation($tpl) { $Itemid = JRequest::getInt('Itemid'); $db = & JFactory::getDBO() ; //First user information $config = EventBookingHelper::getConfig() ; $firstName = JRequest::getVar('first_name', '', 'post') ; $lastName = JRequest::getVar('last_name', '', 'post') ; $organization = JRequest::getVar('organization', '', 'post') ; $address = JRequest::getVar('address', '', 'post') ; $address2 = JRequest::getVar('address2', '', 'post') ; $city = JRequest::getVar('city', '', 'post') ; $state = JRequest::getVar('state', '', 'post') ; $zip = JRequest::getVar('zip', '', 'post') ; $phone = JRequest::getVar('phone', '', 'post') ; $fax = JRequest::getVar('fax', '', 'post') ; $email = JRequest::getVar('email', '', 'post') ; $country = JRequest::getVar('country', '') ; $comment = JRequest::setVar('comment', '') ; $paymentMethod = JRequest::getVar('payment_method', os_payments::getDefautPaymentMethod()) ; $x_card_num = JRequest::getVar('x_card_num', '', 'post'); $expMonth = JRequest::getVar('exp_month', date('m'), 'post') ; $expYear = JRequest::getVar('exp_year', date('Y'), 'post') ; $x_card_code = JRequest::getVar('x_card_code', '', 'post'); $cardHolderName = JRequest::getVar('card_holder_name', '', 'post') ; $cardType = JRequest::getVar('card_type', '') ; $username = JRequest::getVar('username', '', 'post'); $password = JRequest::getVar('password', '', 'post'); $eventId = JRequest::getInt('event_id', 0) ; $sql = 'SELECT * FROM #__eb_events WHERE id='.$eventId; $db->setQuery($sql) ; $event = $db->loadObject(); $feeAmount = JCFields::calculateFee($eventId, 0) ; $totalAmount = $event->individual_price + $feeAmount ; $params = new JParameter($event->params) ; $keys = array('s_lastname', 'r_lastname', 's_organization', 'r_organization', 's_address', 'r_address', 's_address2', 'r_address2', 's_city', 'r_city', 's_state', 'r_state', 's_zip', 'r_zip', 's_country', 'r_country', 's_phone', 'r_phone', 's_fax', 'r_fax', 's_comment', 'r_comment'); foreach ($keys as $key) { $config->$key = $params->get($key, 0) ; } //Get discount $discount = 0 ; $user = & JFactory::getUser() ; if ($user->get('id')) { if ($event->discount > 0) { if ($event->discount_type == 1) { $discount = $totalAmount*$event->discount/100 ; } else { $discount = $event->discount ; } } } if (isset($_SESSION['coupon_id'])) { $sql = 'SELECT * FROM #__eb_coupons WHERE id='.(int)$_SESSION['coupon_id']; $db->setQuery($sql) ; $coupon = $db->loadObject(); if ($coupon) { if ($coupon->coupon_type == 0) { $discount = $discount + $totalAmount*$coupon->discount/100 ; } else { $discount = $discount + $coupon->discount ; } } } //Early bird discount $sql = 'SELECT COUNT(id) FROM #__eb_events WHERE id='.$eventId.' AND DATEDIFF(early_bird_discount_date, NOW()) >= 0'; $db->setQuery($sql); $total = $db->loadResult(); if ($total) { $earlyBirdDiscountAmount = $event->early_bird_discount_amount ; if ($earlyBirdDiscountAmount > 0) { if ($event->early_bird_discount_type == 1) { $discount = $discount + $totalAmount*$event->early_bird_discount_amount/100 ; } else { $discount = $discount + $event->early_bird_discount_amount ; } } } if ($discount > $totalAmount) $discount = $totalAmount ; $amount = $totalAmount - $discount ; #Tax, added from 1.4.3 if ($config->enable_tax && ($amount > 0)) { $taxAmount = round($amount*$config->tax_rate/100, 2) ; } else { $taxAmount = 0 ; } //Custom fields $jcFields = new JCFields($eventId, false, 0) ; if ($jcFields->getTotal()) { $customField = true ; $fields = $jcFields->renderConfirmation() ; $hidden = $jcFields->renderHiddenFields() ; $this->assignRef('fields', $fields) ; $this->assignRef('hidden', $hidden) ; } else { $customField = false ; } $url = EventBookingHelper::getURL(); if ($config->use_https) { $url = str_replace('http:', 'https:', $url) ; } $method = os_payments::getPaymentMethod($paymentMethod) ; $bankId = JRequest::getVar('bank_id'); if (($config->enable_captcha == 3) || (($config->enable_captcha == 2) && ($event->individual_price > 0)) || (($config->enable_captcha == 1) && ($event->individual_price == 0))) { $showCaptcha = 1 ; } else { $showCaptcha = 0 ; } $captchaInvalid = JRequest::getInt('captcha_invalid', 0); $couponCode = JRequest::getVar('coupon_code', ''); #Added support for deposit payment $paymentType = JRequest::getInt('payment_type', 0) ; if ($config->activate_deposit_feature && $event->deposit_amount > 0 && $paymentType == 1) { if ($event->deposit_type == 2) { $depositAmount = $event->deposit_amount ; } else { $depositAmount = $event->deposit_amount*($totalAmount-$discount + $taxAmount)/100 ; } } else { $depositAmount = 0 ; } $this->assignRef('config', $config) ; $this->assignRef('firstName', $firstName); $this->assignRef('lastName', $lastName); $this->assignRef('organization', $organization); $this->assignRef('address', $address); $this->assignRef('address2', $address2); $this->assignRef('city', $city); $this->assignRef('state', $state); $this->assignRef('zip', $zip); $this->assignRef('phone', $phone); $this->assignRef('fax', $fax); $this->assignRef('country', $country) ; $this->assignRef('email', $email); $this->assignRef('comment', $comment); $this->assignRef('paymentMethod', $paymentMethod); $this->assignRef('x_card_num', $x_card_num) ; $this->assignRef('x_card_code', $x_card_code) ; $this->assignRef('cardHolderName', $cardHolderName) ; $this->assignRef('expMonth', $expMonth) ; $this->assignRef('expYear', $expYear) ; $this->assignRef('event', $event) ; $this->assignRef('totalAmount', $totalAmount) ; $this->assignRef('feeAmount', $feeAmount) ; $this->assignRef('customField', $customField) ; $this->assignRef('Itemid', $Itemid) ; $this->assignRef('url', $url) ; $this->assignRef('method', $method) ; $this->assignRef('cardType', $cardType) ; $this->assignRef('discount', $discount) ; $this->assignRef('amount', $amount) ; $this->assignRef('username', $username) ; $this->assignRef('password', $password) ; $this->assignRef('couponCode', $couponCode) ; $this->assignRef('bankId', $bankId) ; $this->assignRef('showCaptcha', $showCaptcha) ; $this->assignRef('captchaInvalid', $captchaInvalid) ; $this->assignRef('paymentType', $paymentType) ; $this->assignRef('depositAmount', $depositAmount) ; $this->assignRef('taxAmount', $taxAmount) ; parent::display($tpl) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function confirmRegistration() {\n $this->form_validation->set_rules('email', 'Email', 'required');\n $this->form_validation->set_rules('temp_code', 'Temporärer Code', 'required');\n\n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n $this->loadUser();\n \n if ($this->user_model->getValue('temp_code') != $this->input->post('temp_code')) {\n \tlog_message('error', 'db: ' . $this->user_model->getValue('temp_code') . ' provided: ' . $this->input->post('temp_code'));\n \t$this->error(404, 'Verification error');\n }\n \n if ($this->user_model->getValue('temp_code_valid_until') < date('Y-m-d H:i:s')) {\n \t$this->error(408, 'Code timed out');\n }\n \n // if the email is confirmed, we don't care for correct or valid code\n if ($this->user_model->getValue('confirmed') == 1) {\n\t\t\t$data['confirmed'] = 'confirmed';\n\t\t\t$this->response($data);\n }\n \n $this->user_model->setValue('confirmed', 1);\n if (! $this->user_model->updateConfirmed()) {\n \t$this->error(400, 'Confirmation error');\n }\n \n $data['confirmed'] = 'confirmed';\n $this->response($data);\n }", "public function onRegistrationConfirm(GetResponseUserEvent $event)\n {\n $this->_session->getFlashBag()->add(\n 'success',\n 'Votre compte a bien été activé. Vous pouvez désormais\n créer un compte pour votre structure eSport ou votre marque.'\n );\n $url = $this->_router->generate('inscription_index');\n $event->setResponse(new RedirectResponse($url));\n }", "public function onSignUp()\n {\n $data = post();\n $data['requires_confirmation'] = $this->requiresConfirmation;\n\n if (app(SignUpHandler::class)->handle($data, (bool)post('as_guest'))) {\n if ($this->requiresConfirmation) {\n return ['.mall-signup-form' => $this->renderPartial($this->alias . '::confirm.htm')];\n }\n\n return $this->redirect();\n }\n }", "public function verifyAction()\n\t{\n\t\t$this->view->headTitle(\"Registration Process\");\n\t\t\n\t\t//Retrieve key from url\n\t\t$registrationKey = $this->getRequest()->getParam('key');\n\t\t\n\t\t//Identitfy the user associated with the key\n\t\t$user = new Default_Model_User();\n\t\t\n\t\t//Determine is user already confirm\n\t\tif($user->isUserConfirmed($registrationKey)){\n\t\t$this->view->isConfirmed = 1;\n\t\t$this->view->errors[] = \"User is already confirmed\";\n\t\treturn;\n\t\t}\n\n\t\t$resultRow = $user->getUserByRegkey($registrationKey);\n\t\t\n\t\t//If the user has been located, set the confirmed column.\n\t\tif(count($resultRow)){\n\t\t\t$resultRow->confirmed = 1;\n\t\t\t$resultRow->save();\n\t\t\t\n\t\t\t$this->view->success = 1;\n\t\t\t$this->view->firstName = $resultRow->first_name;\n\t\t\n\t\t} else{\n\t\t\t$this->view->errors[] = \"Unable to locate registration key\";\n\t\t}\n\n\t}", "public function confirmAction() {\n if (Zend_Auth::getInstance()->hasIdentity())\n $this->_redirect($this->getUrl());\n\n $errors = array();\n\n $action = $this->getRequest()->getParam('a');\n\n switch ($action) {\n case 'email':\n $id = $this->getRequest()->getParam('id');\n $key = $this->getRequest()->getParam('key');\n\n $result = $this->em->getRepository('Champs\\Entity\\User')->activateAccount($id, $key);\n\n if (!$result) {\n $errors['email'] = 'Error activating your account';\n }\n\n break;\n }\n\n $this->view->errors = $errors;\n $this->view->action = $action;\n }", "function register() {\n\n/* ... this form is not to be shown when logged in; if logged in just show the home page instead (unless we just completed registering an account) */\n if ($this->Model_Account->amILoggedIn()) {\n if (!array_key_exists( 'registerMsg', $_SESSION )) {\n redirect( \"mainpage/index\", \"refresh\" );\n }\n }\n\n/* ... define values for template variables to display on page */\n $data['title'] = \"Account Registration - \".$this->config->item( 'siteName' );\n\n/* ... set the name of the page to be displayed */\n $data['main'] = \"register\";\n\n/* ... complete our flow as we would for a normal page */\n $this->index( $data );\n\n/* ... time to go */\n return;\n }", "public function actionCustomiseconfirm()\n\t{\n\t\tif(isset($_SESSION) && isset($_SESSION['userRegisterVal']) && $_SESSION['userRegisterVal']['email'] != '')\n\t\t{\n\t\t\t$this->layout =\"homeinner\";\n\t\t\t$modelUser=new Users;\n\t\t\t$modelGifts=new Gift;\n\n\t\t\t//simply redirecting to Confirm page...\n\t\t\t$this->render('customizejerseyconfirm',array(\n\t\t\t\t'modelUser'=>$modelUser,\n\t\t\t));\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Redirect to home page\n\t\t\t$this->redirect('../index.php', '');\n\t\t}\n\t}", "public function registration() {\r\n \r\n if (isset($_GET[\"submitted\"])) {\r\n $this->registrationSubmit();\r\n } else {\r\n \r\n }\r\n }", "public function actionConfirm()\n\t{\n\t\tif(isset($_SESSION) && isset($_SESSION['userRegisterVal']) && $_SESSION['userRegisterVal']['email'] != '')\n\t\t{\n\t\t\t $this->layout =\"homeinner\";\n\t\t\t $modelUser=new Users;\n\t\t\t \n\t\t\t //for getting lastly saved value of Gift model\n\t\t\t $userGiftId = $_SESSION['giftId'];\n\t\t\t \n\t\t\t if(isset($userGiftId) && $userGiftId != '')\n\t\t\t {\n\t\t\t\t \n\t\t\t\t Yii::app()->user->setFlash('successmessage','You have been registered properly.. Please check your mailbox');\n\t\t\t }\n\t\t\t else \n\t\t\t {\n\t\t\t\t \n\t\t\t\t Yii::app()->user->setFlash('failuremessage','Please fill the form properly again');\n\t\t\t }\n\t\t\t //for getting lastly saved value of Gift model by current user\n\t\t $giftLastValue=Gift::model()->findByAttributes(array('id'=>$userGiftId));\n\t\t\t //for getting lastly saved value of Gift model by current user\n\t\t\t\n\t\t\t //destroying session here..\n\t session_destroy(); \n\t \n\t //create new session to keep current gift id for fbshare\n\t session_start();\n\t $_SESSION['giftId'] = $userGiftId;\n\t\n\t //render page to view page....\n\t\t\t $this->render('finalconfirmed',array(\n\t\t\t\t 'modelUser'=>$modelUser,\n\t\t\t\t 'maxIdGift'=>$userGiftId,\n\t\t\t\t 'giftLastValue'=>$giftLastValue,\n\t\t\t ));\n\t\t}\n\t\telse\n\t\t{\n\t\t \t//Redirect to home page\n\t\t\t$this->redirect('../index.php', '');\n\t\t}\n\t}", "public function confirmed()\n {\n if(!Auth::check()){\n return redirect()->route('auth.registration');\n }\n\n return view('confirm');\n }", "public function actionRegister()\n\t{\n\t\tUtilities::updateCallbackURL();\n\t\t$this->render('registration');\n\t}", "public function RegistrationUnderApproval() {\n $this->Render();\n }", "public function confirmationAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERUPDATE);\n \t$userId = $this->getRequest()->getParam('userId');\n $activationKey = $this->getRequest()->getParam(self::ACTIVATION_KEY_PARAMNAME);\n\n $user = $this->_getUserFromIdAndKey($userId, $activationKey);\n\n if(!$user){\n // No such user\n Globals::getLogger()->registrationError(\"Account activation: user retrieval failed - userId=$userId, key=$activationKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::ACTIVATION_FAILED));\n }\n\n $user->clearCache();\n $user = $this->_getUserFromIdAndKey($userId, $activationKey);\n\n if($user->{User::COLUMN_STATUS} == User::STATUS_PENDING){\n $user->{User::COLUMN_STATUS} = User::STATUS_MEMBER;\n $user->date = date('Y-m-d H:i:s');\n $id = $user->save();\n if($id !== $userId){\n Globals::getLogger()->registrationError(\"Account activation: user save failed - userId=$userId, key=$activationKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::ACTIVATION_FAILED));\n }\n\n $this->view->success = true;\n $this->view->alreadyDone = false;\n \t$this->_savePendingUserIdentity($userId);\n } else {\n $this->view->success = false;\n $this->view->alreadyDone = true;\n }\n }", "public function register_action()\n {\n $registration_successful = RegistrationModel::registerNewUser();\n\n if ($registration_successful) {\n Redirect::to('index');\n } else {\n Redirect::to('user/register');\n }\n }", "public function confirmedAction()\n {\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $address = $user->getAddress();\n $city = $user->getCity();\n $geocodeAddress = $address . \",\" . $city;\n $geo = $this->container->get('simon_user.geocoder');\n $coord = $geo->geocode($geocodeAddress);\n $geometry = new Geometry();\n $geometry->setLat($coord[0]);\n $geometry->setLng($coord[1]);\n $geometry->setUser($user);\n $em->persist($geometry);\n $em->flush();\n return $this->render('@FOSUser/Registration/confirmed.html.twig', array(\n 'user' => $user,\n 'targetUrl' => $this->getTargetUrlFromSession(),\n ));\n }", "public function showRegistrationForm()\n {\n $askForAccount = false;\n return view('client.auth.register',compact(\"askForAccount\"));\n }", "public function showRegistrationForm()\n {\n abort_unless(config('access.registration'), 404);\n\n return view('frontend.auth.register');\n }", "public function activationAction()\n {\n View::renderBlade('register/activation');\n }", "public function registerFamilyConfirmAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site; /* @var BeMaverick_Site $site */\n $validator = $this->view->validator; /* @var BeMaverick_Validator $validator */\n\n // set the input params\n $requiredParams = array(\n 'emailAddress',\n );\n\n $input = $this->processInput( $requiredParams, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'authRegisterParent' );\n }\n\n // get the variables\n $emailAddress = $input->emailAddress;\n\n // perform the checks\n $validator->checkParentEmailAddressAssociatedWithAKid( $site, $emailAddress, $errors );\n\n $errorPopupCode = null;\n if ( $errors->hasErrors() ) {\n $errorPopupCode = 'EMAIL_NOT_ASSOCIATED';\n }\n\n if ( $errorPopupCode && $this->view->ajax ) {\n $input->errorCode = $errorPopupCode;\n return $this->renderPage( 'authError' );\n } else if ( $errorPopupCode ) {\n $this->view->popupUrl = $site->getUrl( 'authError', array( 'errorCode' => $errorPopupCode ) );\n return $this->renderPage( 'authRegisterParent' );\n }\n\n // parent is registering, so send them to verify the first kid. they had to have at least\n // one kid to get to this point\n $kids = $site->getKidsByParentEmailAddress( $emailAddress );\n\n if( $kids[0] && !($kids[0]->getVPCStatus()) ) {\n $redirectUrl = BeMaverick_Util::getParentVerifyMaverickUrl( $site, $kids[0] );\n if ( $this->view->ajax ) {\n $this->view->redirectUrl = $redirectUrl;\n return $this->renderPage( 'redirect' );\n }\n\n return $this->_redirect( $redirectUrl );\n } else {\n //if one of the kid is verified, send the parent to set their email.\n $parent = $site->getUserByEmailAddress( $emailAddress );\n BeMaverick_Cookie::updateUserCookie( $parent );\n $successPage = 'authParentVerifyMaverickStep3';\n if ( $this->view->ajax && $this->view->ajax != 'dynamicModule' ) {\n $successPage = $this->view->ajax.'Ajax';\n }\n return $this->renderPage( $successPage );\n }\n }", "public function registerPost(){\n\t\t\t$this->modelRegister();\n\t\t\t//quay lai trang dang ky\n\t\t\t//header(\"location:index.php?controller=account&action=register&notify=success\");\n\t\t\techo \"<script>location.href='login/register-success';</script>\";\n\t\t}", "public function registration()\n {\n $view = new View('login_registration');\n $view->title = 'Bilder-DB';\n $view->heading = 'Registration';\n $view->display();\n }", "public function showRegistrationForm()\n {\n return redirect()->route('frontend.account.register');\n //return theme_view('account.register');\n }", "public function register() {\n\t\t\tif($this->Session->read('Auth.User.id')){\n\t\t\t\t$this->redirect('/');\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\tif(!empty($this->request->data)){\n\n\t\t\t\t\t$this->User->create($this->request->data);\n\t\t\t\t\t// Validation des données\n\t\t\t\t\tif($this->User->validates()) {\n\n\t\t\t\t\t\t$token = md5(time() .' - '. uniqid());\n\n\t\t\t\t\t\t$this->User->create(array(\n\t\t\t\t\t\t\t\"email\" \t\t=> $this->request->data['User']['email'],\n\t\t\t\t\t\t\t\"password\" \t\t=> $this->Auth->password($this->request->data['User']['password']),\n\t\t\t\t\t\t\t\"token\" \t\t=> $token\n\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t// Si tout est ok, on sauvegarde\n\t\t\t\t\t\t$this->User->save();\n\n\t\t\t\t\t\t// Envoie de l'email d'activation à l'utilisateur\n\t\t\t\t\t\t$CakeEmail = new CakeEmail('default');\n\t\t\t\t\t\t$CakeEmail->to($this->request->data['User']['email']);\n\t\t\t\t\t\t$CakeEmail->subject('Dezordre: Confirmation d\\'inscription');\n\t\t\t\t\t\t$CakeEmail->viewVars($this->request->data['User'] + array(\n\t\t\t\t\t\t\t'token' => $token,\n\t\t\t\t\t\t\t'id'\t=> $this->User->id,\n\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t$CakeEmail->emailFormat('text');\n\t\t\t\t\t\t$CakeEmail->template('register');\n\t\t\t\t\t\t$CakeEmail->send();\n\n\n\t\t\t\t\t\t$this->Session->setFlash(\"Votre compte à bien été créer. Un lien vous à été envoyé par email afin d'activer votre compte.\", 'alert', array('class' => 'success'));\n\t\t\t\t\t\t$this->redirect(array('controller' => 'pages', 'action' => 'display', 'home'));\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t\t$this->Session->setFlash(\"Erreur, merci de corriger\", 'alert', array('class' => 'danger'));\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function guest_completed_registration_form_Successfully_registered_and_checked_in_DB()\n {\n $this->visit('/register')\n ->seePageIs('/register')\n ->type($this->user->name, 'name')\n ->type($this->user->email, 'email')\n ->type($this->user->password, 'password')\n ->type($this->user->password, 'password_confirmation')\n ->press('Register');\n\n\n $this->seeInDatabase('users', ['name' => $this->user->name]);\n }", "public function registerForm(): Response\n {\n $this->init('You\\'r already loggedIn', '/chatroom');\n return $this->render('register.html.twig');\n }", "public function page_register() {\n\n\t\tif(isset($_POST['submit'])) {\n\n\t\t\t$validate = new validate();\n\n\t\t\t/**\n\t\t\t * setup custom allback text\n\t\t\t */\n\t\t\t$validate->errors_text['account_action::_pwdntmatch'] = 'Password fields do not match!';\n\t\t\t$validate->errors_text['account_action::_userexists'] = 'User already exists!';\n\n\t\t\t/**\n\t\t\t* setup form validation rules\n\t\t\t*/\n\t\t\t$validate->set_rules('username', array(\n\t\t\t\t'empty', \n\t\t\t\tarray(\n\t\t\t\t\t'callback' => array(&$this, '_userexists')\n\t\t\t\t)\n\t\t\t));\n\n\t\t\t$validate->set_rules('password', array(\n\t\t\t\t'empty',\n\t\t\t\tarray(\n\t\t\t\t\t'callback' => array($this, '_pwdntmatch'),\n\t\t\t\t\t'params' => array('password_again')\n\t\t\t\t)\n\t\t\t), true);\n\n\t\t\t/**\n\t\t\t * lets attempt to save user into the database\n\t\t\t */\n\t\t\tif(!$validate->check()) {\n\n\t\t\t\t/**\n\t\t\t\t * register user\n\t\t\t\t */\n\t\t\t\tif(account_model::register()) {\n\t\t\t\t\t$this->data->message = \"Account created successful\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->data->message = \"Something went wrong when attempting to create this account!\";\n\t\t\t\t}\n\n\n\t\t\t} else {\n\t\t\t\t$this->data->message = validate::errors();\n\t\t\t}\n\t\t}\n\t}", "function success()\n {\n $message = null;\n $message = \"Một email đã được gửi tới hòm thư của bạn. <br />\";\n $message .= \"Vui lòng kiểm tra hộp thư đến và kích hoạt tài khoản.\";\n $this->view->load('frontend/user/register_success', [\n 'message' => $message\n ]);\n }", "public function action_confirm()\n {\n $hash = $this->request->param('hash');\n\n $model_auth = new Model_Auth();\n\n $id = $model_auth->getUserIdByHash($hash, Model_Auth::TYPE_EMAIL_CONFIRM);\n\n if (!$id) {\n $error_text = 'Ваш аккаунт уже подтвержден';\n $this->template->content = View::factory('templates/error', ['error_text' => $error_text]);\n\n return;\n }\n\n $model_auth->deleteHash($hash, Model_Auth::TYPE_EMAIL_CONFIRM);\n\n $user = new Model_User($id);\n\n if (!$user->id) {\n $error_text = 'Переданы некорректные данные';\n $this->template->content = View::factory('templates/error', ['error_text' => $error_text]);\n\n return;\n }\n\n $user->updateUser($user->id, ['isConfirmed' => 1]);\n\n $this->redirect('/user/' . $id . '?confirmed=1');\n }", "public function actionVerifyRegistration()\n {\n // get hash code from url\n $hash = Yii::app()->getRequest()->getQuery('hash');\n // activate account\n $model = Profiles::model()->findByAttributes(array('PRF_RND'=>$hash));\n if($model!==null){\n $model->PRF_ACTIVE = '1';\n $model->save();\n\t\tYii::app()->user->setFlash('register','Thank you for your verification. You can now login using the following link.');\n//$this->refresh();\n } else {\n\t\tYii::app()->user->setFlash('register','Hash value invalid, cannot verification user.');\n\t }\n\t //echo $hash . \"<br>\\r\\n\";\n\t //print_r($model);\n $this->checkRenderAjax('register',array('model'=>$model,));\n }", "public function newRegistration() {\n $this->registerModel->getUserRegistrationInput();\n $this->registerView->setUsernameValue($this->registerView->getUsername());\n $this->registerModel->validateRegisterInputIfSubmitted();\n if ($this->registerModel->isValidationOk()) {\n $this->registerModel->hashPassword();\n $this->registerModel->saveUserToDatabase();\n $this->loginView->setUsernameValue($this->registerView->getUsername());\n $this->loginView->setLoginMessage(\"Registered new user.\");\n $this->layoutView->render(false, $this->loginView);\n } else {\n $this->layoutView->render(false, $this->registerView);\n }\n \n }", "function register_action()\n {\n $login_model = $this->loadModel('Login');\n $registration_successful = $login_model->registerNewUser();\n\n if ($registration_successful == true) {\n $this->view->render('login/index');\n } else {\n $this->view->render('login/register');\n }\n }", "public function showRegistrationForm()\n {\n return view('skins.' . config('pilot.SITE_SKIN') . '.auth.register');\n }", "public function actionRegdone()\n\t{\n\t\t$this->render('regdone');\n\t}", "public function handleRegistration()\n {\n $user = $this->repository->signup(\\Input::all());\n\n if ($user->id) {\n if (\\Config::get('confide::signup_email')) {\n \\Mail::queueOn(\n \\Config::get('confide::email_queue'),\n \\Config::get('confide::email_account_confirmation'),\n compact('user'),\n function ($message) use ($user) {\n $message\n ->to($user->email, $user->username)\n ->subject(\\Lang::get('confide::confide.email.account_confirmation.subject'));\n }\n );\n }\n \\Notification::success(\n \\Notification::message(\\Lang::get('users::app.user.registered'))->flash()\n );\n\n return \\Redirect::route('app.session.login');\n\n } else {\n $errors = $user->errors()->all(':message');\n\n if (is_array($errors) && $errors) {\n foreach ($errors as $error) {\n \\Notification::error(\n \\Notification::message(\\Lang::get($error))->flash()\n );\n }\n } else {\n \\Notification::error(\n \\Notification::message(\\Lang::get('users::app.registration.failed'))->flash()\n );\n }\n\n\n return \\Redirect::route('app.session.register');\n }\n }", "function confirm_user_signup($user_name, $user_email)\n {\n }", "public function showRegistrationForm()\n {\n return view('instructor.auth.register');\n }", "public function p_signup() \n {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n $q = 'SELECT user_id\n FROM users \n WHERE email = \"'.$_POST['email'].'\"';\n $user_id = DB::instance(DB_NAME)->select_field($q);\n if ($user_id!=NULL)\n {\n $error=\"User account already exists.\";\n $this->template->content = View::instance('v_users_signup');\n $this->template->content->error=$error;\n echo $this->template;\n }\n else\n {\n\t\t\n //Inserting the user into the database\n\t\t\t$_POST['created']=Time::now();\n\t\t\t$_POST['modified']=Time::now();\n\t\t\t$_POST['password']=sha1(PASSWORD_SALT.$_POST['password']);\n\t\t\t$_POST['token']=sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string());\n\t\t\t$_POST['activation_key']=str_shuffle($_POST['password'].$POST['token']);\n\t\t\t$activation_link=\"http://\".$_SERVER['SERVER_NAME'].\"/users/p_activate/\".$_POST['activation_key'];\n\t\t\t$name=$_POST['first_name'];\n\t\t\t$name.=\" \";\n\t\t\t$name.=$_POST['last_name'];\n\t\t\t$user_id = DB::instance(DB_NAME)->insert('users', $_POST);\n\t\t\t\n\t\t//Sending the confirmation mail\n\t\t\t$to[]=Array(\"name\"=>$name, \"email\"=>$_POST['email']);\n\t\t\t$subject=\"Confirmation letter\";\n\t\t\t$from=Array(\"name\"=>APP_NAME, \"email\"=>APP_EMAIL); \n $body = View::instance('signup_email');\n $body->name=$name;\n $body->activation_link=$activation_link;\n\n\n\t\t\t$email = Email::send($to, $from, $subject, $body, false, $cc, $bcc);\n\t\t\t\n\t\t\tRouter::redirect('/');\n } \n }", "public function register()\n\t{\n\t\tif ($this->session->userdata('isValid') == 0) {\n\t\t\t$this->load->view('v_register');\n\t\t}\n\n\t\t// Jika user masuk dari link baru, memastikan isi data session kosong dengan men-destroy data session\n\t\telse\n\t\t{\n\t\t\t$this->session->sess_destroy();\n\t\t\t$this->load->view('v_register');\n\t\t}\n\t}", "public function getRegisterSuccess()\n {\n return view(\"Home::auth.registersuccess\");\n }", "public function registrar()\r\n\t{\r\n\t\t//Se debe agregar el checkbox de terminos y condiciones y debe ser un enlace tipo _blank\r\n\t\tView::template('default');\r\n\t\tif(Input::hasPost('correo')){\r\n\t\t\tif((New Proveedor)->registrar()){\r\n\t\t\t\tFlash::valid('Registro exitoso, ya puede iniciar sesión con su cuenta, lo estamos redirigiendo al inicio de sesión');\r\n \t\tInput::delete();\r\n \t\tRedirect::to('', '5');\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tFlash::error('No se pudo registrar, intente más tarde o comuniquese con soporte');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function confirm() {\n $user_id = $_GET['id'];\n $token = $_GET['token'];\n $userConfirmed = $this->model->confirmToken($user_id, $token);\n\n if ($userConfirmed) {\n $this->model->setFlash('success', 'Votre compte a bien été validé');\n // $_SESSION['flash']['success'] = 'Votre compte a bien été validé';\n header('location:index.php?controller=security&action=formLogin');\n } else {\n $this->model->setFlash('danger', \"Ce token n'est plus valide\");\n // $_SESSION['flash']['danger'] = \"Ce token n'est plus valide\";\n header('location:index.php?controller=security&action=formRegister');\n }\n }", "public function registration() {\n $this->load->view('header');\n $this->load->view('user_registration');\n $this->load->view('footer');\n }", "public function regi_form() {\n $template = $this->loadView('registration_page');\n // $template->set('result', $error);\n $template->render();\n }", "function confirm_page(){\n $this->load->view('include/header.inc');\n $this->load->view('pages/register_complete.php' );\n $this->load->view('include/footer.inc');\n }", "public function register_show_2()\n {\n return view('fontend.user.verify');\n }", "public function showRegistrationForm() {\n //parent::showRegistrationForm();\n $data = array();\n\n $data = $this->example_of_user();\n $data['title'] = 'RegisterForm';\n\n return view('frontend.auth.register', $data);\n }", "public function showRegistrationForm()\n {\n return view('privato.auth.register');\n }", "public function actionRegister()\n {\n if (!$this->module->enableRegistration) {\n throw new NotFoundHttpException;\n }\n\n $model = \\Yii::createObject(RegistrationForm::className());\n\n $this->performAjaxValidation($model);\n\n if ($model->load(\\Yii::$app->request->post()) && $model->register()) {\n return $this->render('/message', [\n 'title' => \\Yii::t('user', 'Your account has been created'),\n 'module' => $this->module,\n ]);\n }\n\n return $this->render('register', [\n 'model' => $model,\n 'module' => $this->module,\n ]);\n }", "public function register() \n\t{\n $referer = isset($_GET['referer']) ? htmlentities($_GET['referer'], ENT_QUOTES) : '';\n\t\t\n\t\t$this->View->RenderMulti(['_templates/header','user/register']);\n }", "public function register(){\n header(\"Location: register.php\");\n }", "function ConfirmUser(){\r\n if(empty($_GET['code'])||strlen($_GET['code'])<=10){\r\n $this->HandleError(\"Please provide the confirm code\");\r\n return false;\r\n }\r\n $user_rec = array();\r\n if(!$this->UpdateDBRecForConfirmation($user_rec)){\r\n return false;\r\n }\r\n \r\n $this->SendUserWelcomeEmail($user_rec);\r\n \r\n $this->SendAdminIntimationOnRegComplete($user_rec);\r\n \r\n return true;\r\n }", "public function confirmedAction()\n {\n $user = $this->container->get('security.context')->getToken()->getUser();\n if (!is_object($user) || !$user instanceof UserInterface) {\n throw new AccessDeniedException('This user does not have access to this section.');\n }\n \n //add a default wall\n $user->createDefaultMemoryWall();\n $this->container->get('fos_user.user_manager')->updateUser($user);\n\n return $this->container->get('templating')->renderResponse('FOSUserBundle:Registration:confirmed.html.'.$this->getEngine(), array(\n 'user' => $user,\n ));\n }", "public function getConfirmRegisterTopic()\n {\n return view('teacher.confirmregister', ['topics' => $this->topic->getTopicStudent()]);\n }", "public function getRegistrationConfirmation($hash)\n {\n //get data\n $hideBack = true;\n\n $registrationRequest = $this->requestRepository->getRegistrationByHash($hash);\n if (!$registrationRequest) {\n return $this->redirect\n ->route('auth.get_registration');\n }\n //output\n return view('auth.registration_confirmation', [\n 'hideBack',\n 'hash'\n ]);\n }", "public function actionSendConfirmationEmail() {\n\n\t\t$userId = User::checkLogged();\n\t\t$confirmation = User::generateConfirmationCode($userId);\n\t\t$subject = \"Confirm your account on JustRegMe\";\n\t\t$bodyPath = ROOT . '/template/email/confirmation.php';\n\t\t$body = include($bodyPath); //loads HTML-body from template\n\t\t\n\t\techo User::sendEmail($userId, $subject, $body);\n\n\t}", "public function registerFamilyAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authRegisterParent' );\n }", "public function showRegistrationForm()\n {\n return view('adminlte::auth.register');\n }", "private function _signUpPageRequested()\n {\n $this->utility->redirect('signup');\n }", "function userConfirmation($data){\n\t\t$requiredData['action'] = $this->getPassword(@trim($data->action));\n\t\t$user_name_id = explode(\"#/#\",$requiredData['action']);\n\t\t$rec = $this->query(\"UPDATE `users` SET `status`=1 where `user_name` = '\".@$user_name_id[0].\"' AND `id`= \".@$user_name_id[1]);\n\t\tif($rec){\n\t\t\t$url = HTTP_HOST.\"confirm.php?action=1\";\n\t\t\techo \"<meta http-equiv=Refresh content=0;url=\".$url.\">\";\t\t\t\n\t\t\texit;\n\t\t}else{\n\t\t\t$url = HTTP_HOST.\"confirm.php?action=0\";\n\t\t\techo \"<meta http-equiv=Refresh content=0;url=\".$url.\">\";\t\t\t\n\t\t\texit;\t\t\n\t\t}\n\t}", "public function registerAction()\n {\n if (empty($_POST) === false) {\n if (isset($_POST['register'])) {\n //Function Checking if customer with entered \n // user name or emalil exists in Data Base.\n $message = $this->checkIfExists($_POST['userName'], $_POST['email']);\n //Message that user Already exist. \n if ($message != \"\")\n $this->regMassage($message);\n //Registrating a new Customer and Adding him to Data Base.\n else {\n $cst = $this->customerCreate();\n $this->register($cst);\n }\n }\n }\n $this->view->render('Register');\n }", "function signup_confirmation($subscriber_id=0,$sigup_form_id=0){\n\t\tif(!is_numeric($subscriber_id) || $subscriber_id==0){\n\t\t// This is a false message to subscribers\t\t\t \n\t\t\t$msg= '<h3>One more step in order to complete the sign up process...</h3>\n\t\t\t\t<div style=\"clear:both;margin-bottom:40px;\">\n\t\t\t\tYou will need to click on the link that <br/>we just sent to your email address.\n\t\t\t </div>';\n\t\t\t$this->load->view('header_blue');\n\t\t\t$this->load->view('subscription/sign_up_confirmation',array('signup_id'=>0,'msg'=>$msg,'rc_logo'=>1));\n\t\t\t$this->load->view('footer_blue');\n\t\t\texit;\n\t\t}\n\n\t\t//Fetch data from database\n\n\t\t$subscriber_data_array=$this->Subscriber_Model->get_subscriber_data(array('res.subscriber_id'=>$subscriber_id));\n\t\t$user_id=$subscriber_data_array[0]['subscriber_created_by'];\n\t\t$to_email=$subscriber_data_array[0]['subscriber_email_address'];\n\n\t\t// Fetch sigh-up form data from database\n\t\t$signup_array=$this->Signup_Model->get_signup_data(array('id'=>$sigup_form_id,'member_id'=>$user_id));\n\t\t$signup_array[0]['form_language'] = ($signup_array[0]['form_language'] !='')?$signup_array[0]['form_language']:'en';\n\t\t$this->lang->load($signup_array[0]['form_language'], 'signup');\n\t\tif($signup_array[0]['single_opt_in'] == '1'){\n\t\t\t$this->subscriber_update($subscriber_id, $sigup_form_id);\n\t\t}else{\n\t\t\t$this->confirm_subscription_notification($subscriber_id,$sigup_form_id,$user_id,$to_email);\n\n\t\t\tif((trim($signup_array[0]['confirmation_thanks_you_message_url'])!=\"\")&&(trim(strtolower($signup_array[0]['confirmation_thanks_you_message_url']))!=\"http:/\")){\n\t\t\t\t//redirect($signup_array[0]['confirmation_thanks_you_message_url']);\n\t\t\t\techo \"<script language='javascript'>window.location.href='\".$signup_array[0]['confirmation_thanks_you_message_url'].\"';</script>\";\n\t\t\t\texit;\n\t\t\t}else{\n\t\t\t\t$msg= '<h3>'. $this->lang->line('form_submit_confirmation_heading').'</h3>'.\n\t\t\t\t\t'<div style=\"clear:both;margin-bottom:40px;\">'.\n\t\t\t\t\t $this->lang->line('form_submit_confirmation_content').\n\t\t\t\t '</div>';\n\t\t\t\t# Fetch user data from database\n\t\t\t\t$user=$this->UserModel->get_user_data(array('member_id'=>$user_id));\n\t\t\t\t$rc_logo=$user[0]['rc_logo'];\t#set rc logo\n\t\t\t\t$this->load->view('header_blue');\n\t\t\t\t$this->load->view('subscription/sign_up_confirmation',array('signup_id'=>$subscriber_id,'msg'=>$msg,'rc_logo'=>$rc_logo));\n\t\t\t\t$this->load->view('footer_blue');\n\t\t\t}\n\t\t}\n\t}", "public function showRegistration()\n\t{\n\t\t# if the user is already authenticated then they can't register and they can't log in\n\t\t# so get them out of here.\n\t\tif( userIsAuthenticated() ) {\n\t\t\treturn Redirect::to('profile');\n\t\t}\n\n\t\t# if we get here then forget the redirect value as the user has used the global sign in link\n\t\t# and we won't need to take them anywhere specific after authentication\n\t\tSession::forget('previousPage');\n\n\t\t# error vars, something went wrong!\n\t\tif(Session::has('registration-errors')) {\n\t\t\t$errors = reformatErrors(Session::get('registration-errors')['errors']);\n\t\t\t$message = Session::get('registration-errors')['public'];\n\t\t\t$messageClass = \"danger\";\n\n\t\t\t# grab the old form data\n\t\t\t$input = Input::old();\n\t\t}\n\n\t\t# indicate what we're on to the view. This is used to prevent the auth/register pop up\n\t\t# when viewing these pages\n\t\t$page = \"register\";\n\n\t\t$pageTitle = \"Register\";\n\n\t\treturn View::make('register.index', compact('errors', 'message', 'messageClass', 'input', 'form', 'page', 'pageTitle'));\n\t}", "public function showRegistrationForm()\n {\n return view('laboratorio.auth.register');\n \n }", "public function actionAccept($confirmation) {\n\n\t\tUser::confirmEmail($confirmation);\n\t}", "public function register_action() \n\t{\n $rules = array(\n 'username' => 'required',\n 'email' => 'valid_email|required',\n 'password' => 'required',\n 'password2' => 'required',\n 'securityq1' => 'required',\n 'securityq2' => 'required',\n 'securitya1' => 'required',\n 'securitya2' => 'required',\n\n );\n \n // Readible array\n $readible = \n [ \n 'securityq1' => 'Security Queston 1',\n 'securityq2' => 'Security Queston 2',\n 'securitya1' => 'Security Answer 1',\n 'securitya2' => 'Security Answer 2'\n ];\n\n // readible inputs\n FormValidation::set_field_names($readible);\n \n //validate the info\n $validated = FormValidation::is_valid($_POST, $rules);\n \n // Check if validation was successful\n if($validated !== TRUE): \n \n //exit with an error\n exit(Alert::error(false, true, $validated));\n\n endif;\n\n\n UserModel::register();\n }", "public function showRegistrationForm()\n {\n return view('admin.auth.register');\n }", "public function registerAction(){\n if(!empty($_POST[\"fname\"]) && !empty($_POST[\"lname\"]) && !empty($_POST[\"email2\"]) && !empty($_POST[\"password2\"]) && !empty($_POST[\"password3\"])){\n\n //We validate that the passwords match and that the password is at least 4 characters\n if(($_POST[\"password2\"] == $_POST[\"password3\"]) && (strlen($_POST[\"password2\"]) >= 4)){\n\n //We validate the email string\n if(filter_var($_POST[\"email2\"], FILTER_VALIDATE_EMAIL)){\n //We has the password\n $hashPass = password_hash($_POST[\"password2\"], PASSWORD_BCRYPT, array(\"cost\" => 11));\n\n //Add to database\n $db = new PDO(\"mysql:host=localhost;dbname=chatup\", \"root\", \"root\");\n $stm = $db->prepare(\"INSERT INTO users (user_fname, user_lname, user_email, user_pass) VALUES (:fname, :lname, :email2, :password2)\");\n $result = $stm->execute(array(\n \":fname\" => $_POST[\"fname\"],\n \":lname\" => $_POST[\"lname\"],\n \":email2\" => $_POST[\"email2\"],\n \":password2\" => $hashPass\n ));\n\n //If we added without problems we redirect the user\n if($result){\n echo \"You are now registered - try to log in!\";\n //header(\"location:../user?msg=ok\");\n }\n else{\n echo \"user already exists!\";\n //$msg = \"user already exists!\";\n }\n }\n else{\n echo \"email is invalid!\";\n //$msg = \"email is invalid!\";\n }\n }\n else{\n echo \"Passwords don't match or less than 4 characters!\";\n //$msg = \"Passwords don't match or less than 4 characters!\";\n }\n }\n else{\n echo \"the entire form must be filled!\";\n //$msg = \"the entire form must be filled!\";\n }\n\n //The $msg from above is displayed in the template\n }", "public function showReg()\n {\n //show the form\n if (Auth::check())\n {\n return Redirect::route('account');\n }\n\n // Show the page\n return View::make('account.reg');\n }", "public function actionCandidateRegister()\n {\n $model = new CandidateSignupForm();\n $timezoneList = DateTimeZone::listIdentifiers();\n\n if ($model->load(Yii::$app->request->post()) && $user = $model->signup()) {\n $newCandidate = new Candidate();\n $newCandidate->user_id = $user->id;\n $newCandidate->username = $user->username;\n $newCandidate->save();\n\n return $this->goHome();\n }\n\n return $this->render('candidate-register', compact('model', 'timezoneList'));\n }", "public function register()\n\t{\n\t\t$input = Input::All();\n\t\t\n\t\t$validation = Validator::make($input, User::$rules);\n\t\t\n\t\tif ($validation->passes() && $data['user'] = $this->repo->register($input))\n\t\t{\t\t\t\n\t\t\t$data['activationCode'] = $data['user']->getActivationCode();\n\t\t\t//Send activation code\n\t\t\t$body = View::make('emails.auth.account_activation',$data);\n\t\t\tEmailController::sendMail($data['user']->email, $data['user']->first_name.' '.$data['user']->last_name, 'Welcome to Leadcliq', $body);\n\t\t\t// Create a Milestones entry to track user's checkpoints.\n\t\t\tMilestone::create(array('user_id' => $data['user']->id));\n\t\t\t\n\t\t\treturn View::make('authentication.activation_message',$data);\t\t\t\n\t\t}\n\t\treturn Redirect::route('register')\n\t\t->withInput()\n\t\t->withErrors($validation)\n\t\t->with('message', 'There were validation errors.');\n\t}", "public function registerAction()\n {\n\n\n $form = new Application_Form_User();\n if($this->_request->isPost() && $form->isValid($_POST))\n {\n //code to process the form\n $model = new Application_Model_Users();\n $formValues = $this->_request->getParams();\n $token = $model->getActivationToken();\n // echo $token;\n // die();\n // $nameWS = str_replace(' ', '', trim($formValues['name']->getName()));\n\n $id = $model->create($formValues['name'],\n $formValues['username'],\n \n $formValues['email'],\n $formValues['password'],\n $formValues['age'],\n // $formValues['password'],\n $token);\n if(isset($id))\n {\n $mail = new Application_Model_Mail();\n $mail->sendActivationEmail($formValues['username'], $formValues['email'], $token);\n $this->_redirect('users/register-success');\n }\n else\n {\n throw new Zend_Exception('Registration Error');\n }\n }\n else\n {\n $this->view->form=$form;\n $this->render('register'); \n }\n\n\n }", "public function registrationForm() {\n\n }", "public function registerAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERREGISTER);\n \t$form = new User_Form_Register();\n $data = $this->_request->getPost();\n if(!$data){\n // Display empty form\n $this->view->registerForm = $form;\n return;\n }\n\n if (!$form->isValid($data) || $this->_request->getParam('emailFailure')) {\n // Display form with errors\n $this->view->registerForm = $form;\n $this->view->emailFailure = $this->_request->getParam('emailFailure', null);\n return;\n }\n\n // Parameters for email and user creation\n $params = array(\n User::COLUMN_USERNAME => $form->getValue(User::INPUT_USERNAME),\n User::COLUMN_PASSWORD => $form->getValue(User::INPUT_PASSWORD),\n User::COLUMN_EMAIL => $form->getValue(User::INPUT_EMAIL),\n //User::COLUMN_OPENID_IDENTITY => $form->getValue(User::INPUT_OPENID_IDENTITY),\n User::INPUT_AUTH_METHOD => $form->getValue(User::INPUT_AUTH_METHOD),\n );\n\n try{\n // Create user in database\n $user = $this->_createNewUser($params);\n $userId = $user->{User::COLUMN_USERID};\n\n $params['activationKey'] = $user->activationKey;\n $params['link'] = APP_URL.Globals::getRouter()->assemble(array(),'userconfirmation');\n $params['link'] .= '?'.User::COLUMN_USERID.\"=$userId&\".self::ACTIVATION_KEY_PARAMNAME.\"={$user->activationKey}\";\n $params['site'] = APP_NAME;\n } catch (Exception $e){\n \t$msg = \"Error while creating user and/or blog. \".$e->getMessage();\n Globals::getLogger()->registrationError($msg);\n \t$userId = null;\n }\n\n if($userId === null){\n // Redirect to error page in case of user creation failure\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::CREATION_FAILURE));\n }\n\n try{\n // Send Email\n $emailStatus = $this->_helper->emailer()->sendEmail($params[User::COLUMN_EMAIL], $params);\n } catch (Exception $e) {\n $emailStatus = false;\n $msg = \"Email error 2 \".$e->getMessage();\n Globals::getLogger()->registrationError($msg);\n }\n\n if(!$emailStatus){\n // If there was en error sending the email, delete user row, and forward to current page\n $this->_cleanupUser($userId);\n $this->_forward('register', null, null, array('emailFailure'=>1));\n return;\n }\n\n // Success !\n $this->_savePendingUserIdentity($userId);\n $this->_helper->redirectToRoute('userpending');\n }", "public function displayRegisterForm()\n {\n // charger le HTML de notre template\n require OPROFILE_TEMPLATES_DIR . 'register-form.php';\n }", "public function showRegistrationForm()\n {\n return view('auth.register');\n }", "public function user_can_register_account_with_valid_details()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/register')\n ->assertSee('Register')\n ->type('name','keith')\n ->type('email','[email protected]')\n ->type('password','secret')\n ->type('password_confirmation','secret')\n ->press('Register')\n ->assertpathIs('/home')\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'register')\n ;\n });\n }", "function registration() {\r\n\r\n $this->layout = 'default';\r\n if ($this->Session->check(md5(SITE_TITLE) . 'USERID') == true) {\r\n //$this->Session->setFlash('The URL you\\'ve followed requires you login.');\r\n //$this->redirect(DEFAULT_ADMINURL);\r\n $this->redirect(DEFAULT_ADMINURL . 'users/dashboard');\r\n exit();\r\n }\r\n\r\n if (!empty($this->data)) {\r\n\r\n $errorarray = array();\r\n $errorarray = $this->register_validate($this->data,'registration');\r\n $this->set('errorarray',$errorarray);\r\n\r\n// $this->pre($errorarray);\r\n// exit;\r\n\r\n if(empty($errorarray))\r\n {\r\n\r\n $this->request->data['User']['user_type'] = 'user';\r\n $this->request->data['User']['password'] = md5($this->data['User']['newpwd']);\r\n $this->request->data['User']['encrypt_password'] = $this->encrypt_pass($this->data['User']['newpwd']);\r\n $this->request->data['User']['status'] = '0';\r\n $this->request->data['User']['created_date'] = date('Y-m-d H:i:s', time());\r\n $this->request->data['User']['modified_date'] = date('Y-m-d H:i:s', time());\r\n\r\n unset($this->request->data['User']['newpwd']);\r\n unset($this->request->data['User']['confirmpwd']);\r\n $this->User->save($this->data['User']);\r\n\r\n $this->redirect(DEFAULT_ADMINURL . 'users/registration/'.SUCADD);\r\n\r\n// $this->pre($this->data);\r\n// exit;\r\n }\r\n\r\n }\r\n }", "function register()\n\t\t{\n\n\t\t if(!empty($_POST['email']) && !empty($_POST['password'])&& !empty($_POST['nombre'])){\n\n\t\t $email=filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\n\t\t $password=filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n\t\t $name=filter_input(INPUT_POST, 'nombre', FILTER_SANITIZE_STRING);\n\t\t $new_user=$this->model->register($email,$password,$name);\n\n\t\t if ($new_user == TRUE){ \n\t\t // cap a la pàgina principal\n\t\t header('Location:'.APP_W.'home');\n\t\t }\n\t\t else{\n\t\t // no hi és l'usuari, cal registrar\n\t\t header('Location:'.APP_W.'register');\n\t\t }\n\t\t \t\t}\n\t\t}", "function confirmation() {\n\t\n\n\n}", "public function actionRegister(){\n return $this -> render('register');\n }", "public function regNewCommercialUser()\n {\n $this->view('Registration/commercial_user_registration');\n }", "public function register(){\n \n $data[\"title\"] = \"Register\";\n \n if(isset($_POST[\"register_button\"])){\n \n $name = $_POST[\"register_name\"];\n $email = $_POST[\"register_email\"];\n $password1 = $_POST[\"register_password\"];\n $password2 = $_POST[\"confirm_password\"];\n \n //Validation (this will be expanded)\n if($name == \"\"){\n $error[\"no_name\"] = \"Name is required\";\n }\n \n if($email == \"\"){\n $error[\"no_email\"] = \"Email is required\";\n } else if(!filter_var($email, FILTER_VALIDATE_EMAIL)){\n $error[\"not_valid_email\"] = \"Not a valid email\";\n } else if($this->_model->exists($email)){\n $error[\"email_exists\"] = \"This email is already registered\";\n }\n \n if($password1 == \"\"){\n $error[\"no_password\"] = \"Password is required\";\n } else if(strlen($password1) < 8){\n $error[\"password_short\"] = \"Password must be atleast 9 characters\";\n } else if(ctype_lower($password1)){\n $error[\"no_uppercase\"] = \"Password must contain atleast one upper case letter\";\n } else if($password1 != $password2){\n $error[\"no_password_match\"] = \"Passwords do not match\";\n }\n \n // For the captcha\n $rainCaptcha = new \\Helpers\\RainCaptcha();\n \n if(!$rainCaptcha->checkAnswer($_POST['captcha'])){\n $error[\"captcha\"] = \"Not valid captcha.\";\n }\n \n //If no errors were detected then we'll carry on and register the user\n if(!$error){\n \n $postdata = array(\n \"name\" => $name,\n \"email\" => $email,\n \"password\" => Password::make($password1)\n );\n $this->_model->insert_user($postdata);\n \n $this->_model->sendVerificationEmail($email, $name);\n \n Session::set(\"message\", \"A verification email has been sent to the entered email address.\");\n }\n }\n \n View::renderTemplate(\"header\", $data);\n View::render(\"auth/register\", $data, $error);\n View::renderTemplate(\"footer\", $data);\n }", "public function registration()\n\t{\n\t\t$this->load->view('register');\n }", "public function testIndividualUserRegistrationWithConfirmation(FunctionalTester $I)\n {\n Yii::$app->getModule('user')->enableEmailConfirmation = true;\n $I->amOnRoute('/user/registration/register');\n\n $this->register($I,\n '[email protected]',\n 'Tester2019@',\n 'Tester2019@',\n 'Name',\n 'LastName',\n 'MiddleName',\n '500100732259',\n null,\n 'individual'\n );\n\n $I->see('Your account has been created and a message with further instructions has been sent to your email');\n $user = $I->grabRecord(User::className(), ['email' => '[email protected]']);\n $token = $I->grabRecord(Token::className(), ['user_id' => $user->id, 'type' => Token::TYPE_CONFIRMATION]);\n /** @var yii\\swiftmailer\\Message $message */\n $message = $I->grabLastSentEmail();\n $I->assertArrayHasKey($user->email, $message->getTo());\n $I->assertContains(Html::encode($token->getUrl()), utf8_encode(quoted_printable_decode($message->getSwiftMessage()->toString())));\n $I->assertFalse($user->isConfirmed);\n }", "function confirm_email() {\n \n\n $confirm_url = $this->traffic_model->GetAbsoluteURLFolder().'/confirm_register/' . $this->traffic_model->MakeConfirmationMd5();\n \n\n $this->email->from('[email protected]');\n\n $this->email->to($this->input->post('email'));\n $this->email->set_mailtype(\"html\");\n $this->email->subject('Confirm registration');\n $message = \"Hello \" . $this->input->post('username'). \"<br/>\" .\n \"Thanks for your registration with www.satrafficupdates.co.za <br/>\" .\n \"Please click the link below to confirm your registration.<br/>\" .\n \"$confirm_url<br/>\" .\n \"<br/>\" .\n \"Regards,<br/>\" .\n \"Webmaster <br/>\n www.satrafficupdates.co.za\n \";\n $this->email->message($message);\n if ($this->email->send()) {\n echo 'Message was sent';\n //return TRUE;\n } else {\n echo $this->email->print_debugger();\n //return FALSE;\n }\n\n\n\n\n }", "public function onRegistrationConfirm(GetResponseUserEvent $event) {\n\t\trequire_once('UKM/inc/password.inc.php');\n\t\t\n\t\t$tokenGenerator = $this->container->get('fos_user.util.token_generator');\n\t\t$password = UKM_ordpass(true); // true gives numbers before words\n\t\t$event->getUser()->setPlainPassword( $password );\n\n \t\t$text = $this->container->getParameter('ukmdelta.sms.password.created');\n\t\t\n\t\t$UKMSMS = $this->container->get('ukmsms');\n try {\n\t $UKMSMS->sendSMS( $event->getUser()->getPhone(), str_replace('#code', $password, $text) );\n\t } catch( Exception $e ) {\n\t\t $this->container->get('session')->getFlashBag()->add('error', 'Kunne ikke sende engangskode på SMS ('.$e->getMessage().')');\n\t }\n\n\t}", "public function accountAction()\n {\n \tif(!in_array($this->_user->{User::COLUMN_STATUS}, array(User::STATUS_BANNED, User::STATUS_PENDING, User::STATUS_GUEST))){\n \t\t$this->_forward('homepage');\n \t\treturn;\n \t}\n \t$this->view->registerForm = new User_Form_Register();\n \t$this->view->loginForm = new User_Form_Login();\n }", "public static function email_confirm_account() {\n\n if ($u = static::check_record_existence()) {\n\n $m = auth_model();\n $u = $m::first(array('where' => 'id = \\'' . $u->id . '\\''));\n\n # definindo conta como não confirmada.\n $u->hash_confirm_account = $u->hash_confirm_account ?: \\Security::random(32);\n\n if ($u->emailConfirmAccount())\n flash('Email com as instruções para Confirmação de conta para ' . $u->email . '.');\n else\n flash('Algo ocorreu errado. Tente novamente mais tarde.', 'error');\n }\n\n go_paginate();\n }", "public function showRegistrationForm()\n\t{\n\t\t$data = [];\n\t\t\n\t\t// References\n\t\t$data['countries'] = CountryLocalizationHelper::transAll(CountryLocalization::getCountries());\n\t\t$data['genders'] = Gender::trans()->get();\n\t\t\n\t\t// Meta Tags\n\t\tMetaTag::set('title', getMetaTag('title', 'register'));\n\t\tMetaTag::set('description', strip_tags(getMetaTag('description', 'register')));\n\t\tMetaTag::set('keywords', getMetaTag('keywords', 'register'));\n\t\t\n\t\t// return view('auth.register.indexFirst', $data);\n\t\treturn view('auth.register.index', $data);\n\n\t}", "public function ShowRegistrationForm(){\n return view('Auth.register');\n }", "public function successAction()\n {\n View::renderTemplate('Signup/success.html');\n }", "public function registerSuccess()\n {\n return $this->loadPublicView('user.register-success');\n }", "public function successAction()\r\n {\r\n View::renderTemplate('Signup/success.html');\r\n }", "public function registerAction() {\n $request = $this->getRequest();\n\n $fp = new Champs_Form_Account_Register($this->em);\n\n if ($request->isPost()) {\n // get the hash\n $hash = $request->getPost('hash');\n\n if ($this->checkHash($hash)) {\n if ($fp->process($request)) {\n $session = new Zend_Session_Namespace('registration');\n $session->user_id = $fp->user->id;\n $this->_redirect($this->getUrl('complete'));\n }\n }\n }\n\n // setup hash\n $this->initHash();\n // assign form to view\n $this->view->fp = $fp;\n }", "public function confirmationEmail()\n {\n $email = new Email;\n $email->sendEmail('submitted', 'applicant', Auth::user()->email);\n }", "public function confirmUserDeletion(): void\n {\n $this->resetErrorBag();\n\n $this->password = '';\n\n $this->dispatch('confirming-delete-user');\n\n $this->dispatch('open-modal', id: 'confirmingUserDeletion');\n }", "public function register()\n\t{\n\t \t$this->load->library('form_validation');\n\t \t$this->load->helper('security');\n\t \t$this->form_validation->set_rules('siape', 'Siape', \n\t \t\t'trim|required|xss_clean|max_length[8]|is_unique[tb_professor.siape]',\n\t \t\tarray('is_unique' => 'Siape já cadastrado'));\n\t \t$this->form_validation->set_rules('nome', 'Nome', 'trim|required|xss_clean');//call_back_checar repetição\n\t \t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|is_unique[tb_professor.email]',\n\t \t\tarray('is_unique' => 'E-mail já cadastrado'));\n\t \t$this->form_validation->set_rules('senha', 'Password', 'trim|required|xss_clean|matches[confirmasenha]',\n\t \t\tarray('matches' => 'Confirmação de senha inválida' ));\n\t \t$this->form_validation->set_rules('confirmasenha', 'CPassword', 'trim|required|xss_clean');\n\n\t \tif($this->form_validation->run() == FALSE)\n\t \t{ \n\t \t\t$data['register_tab'] = 'active';\n\t \t\t$data['login_tab'] = 'inactive';\n\t \t$this->load->view('login/login.php', $data);\n\t \t}\n\t \telse\n\t \t{ \n\t \t$this->insert_professor();\n\t \tredirect('login', 'refresh');\n\t \t}\n\t}", "public function confirmAction()\n {\n try {\n $orderId = (int) $this->getRequest()->getParam('order_id');\n $hash = $this->getRequest()->getParam('hash');\n $this->loadValidOrder($orderId, $hash);\n\n //Load and render basic layout\n $this->loadLayout();\n\n // set page title\n $title = $this->getLayout()->getBlock('dhlonlineretoure_customer_address_edit')->getTitle();\n $this->getLayout()->getBlock('head')->setTitle($this->__($title));\n\n // set current navigation entry\n $navigationBlock = $this->getLayout()->getBlock('customer_account_navigation');\n if ($navigationBlock) {\n $navigationBlock->setActive('sales/order/history');\n }\n\n $this->renderLayout();\n } catch (Exception $e) {\n //Show error message to user\n Mage::getSingleton('core/session')->addError($e->getMessage());\n Mage::helper(\"dhlonlineretoure/data\")->log($e->getMessage());\n\n $this->_redirect('*/*/error');\n }\n }", "static function confirm_account_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n $code = confirm_account_email($user->email);\n\n if ($code === -1) {\n flash('Sua conta já está confirmada, basta acessá-la.', 'warning');\n } else if ($code == true)\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você confirmar sua conta.\");\n else\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "public function registration() {\n return view('auth.registration');\n }", "public function showRegistrationForm()\n {\n $jurusan = \\App\\Models\\Jurusan::where('active', 1)->get();\n return view('auth.register', ['jurusan' => $jurusan]);\n }" ]
[ "0.7247788", "0.7199131", "0.71944135", "0.7086905", "0.7062883", "0.7044679", "0.69923115", "0.69872725", "0.6984432", "0.6974889", "0.6823064", "0.6810402", "0.67992747", "0.67757976", "0.67665786", "0.6759205", "0.674482", "0.67257434", "0.6656273", "0.6646545", "0.6624423", "0.66223025", "0.66194344", "0.65998304", "0.65880036", "0.65793806", "0.6571121", "0.6566301", "0.6548555", "0.6546455", "0.6537457", "0.6529822", "0.6522426", "0.6520821", "0.65159184", "0.6495824", "0.64909875", "0.64821225", "0.64806676", "0.647724", "0.64722264", "0.6469799", "0.6469766", "0.6458595", "0.6455557", "0.64538527", "0.6453748", "0.645009", "0.64498055", "0.64437586", "0.6436551", "0.64364034", "0.64349455", "0.64333177", "0.64325833", "0.64292735", "0.6402511", "0.63928896", "0.63842714", "0.638307", "0.63720196", "0.63677377", "0.6365543", "0.6365041", "0.6354326", "0.6350439", "0.63475615", "0.6344624", "0.63380206", "0.63325155", "0.6331798", "0.6325065", "0.63236713", "0.6323408", "0.6316686", "0.6311151", "0.630723", "0.6301646", "0.6298162", "0.62873346", "0.62858564", "0.62756556", "0.6275119", "0.6272286", "0.62650794", "0.6263678", "0.62591237", "0.6255259", "0.6237884", "0.6234483", "0.6233581", "0.6232692", "0.62285537", "0.6227229", "0.6225688", "0.6224471", "0.62224257", "0.621811", "0.62130404", "0.62124455", "0.6212105" ]
0.0
-1
Display confirmation page for group registration
function _displayGroupConfirmation($tpl) { $Itemid = JRequest::getInt('Itemid'); $db = & JFactory::getDBO() ; $eventId = JRequest::getInt('event_id', 0) ; $groupId = JRequest::getInt('group_id', 0) ; $config = EventBookingHelper::getConfig() ; $firstName = JRequest::getVar('first_name', '', 'post') ; $lastName = JRequest::getVar('last_name', '', 'post') ; $organization = JRequest::getVar('organization', '', 'post') ; $address = JRequest::getVar('address', '', 'post') ; $address2 = JRequest::getVar('address2', '', 'post') ; $city = JRequest::getVar('city', '', 'post') ; $state = JRequest::getVar('state', '', 'post') ; $zip = JRequest::getVar('zip', '', 'post') ; $phone = JRequest::getVar('phone', '', 'post') ; $fax = JRequest::getVar('fax', '', 'post') ; $email = JRequest::getVar('email', '', 'post') ; $country = JRequest::getVar('country', '') ; $comment = JRequest::setVar('comment', '') ; $paymentMethod = JRequest::getVar('payment_method', os_payments::getDefautPaymentMethod()) ; $x_card_num = JRequest::getVar('x_card_num', '', 'post'); $expMonth = JRequest::getVar('exp_month', date('m'), 'post') ; $expYear = JRequest::getVar('exp_year', date('Y'), 'post') ; $x_card_code = JRequest::getVar('x_card_code', '', 'post'); $cardHolderName = JRequest::getVar('card_holder_name', '', 'post') ; $cardType = JRequest::getVar('card_type', '') ; $username = JRequest::getVar('username', '', 'post'); $password = JRequest::getVar('password', '', 'post'); $sql = 'SELECT COUNT(*) FROM #__eb_registrants WHERE group_id='.$groupId; $db->setQuery($sql) ; $numberRegistrants = $db->loadResult(); $url = EventBookingHelper::getURL(); $sql = 'SELECT * FROM #__eb_registrants WHERE group_id='.$groupId ; $db->setQuery($sql) ; $rowMembers = $db->loadObjectList(); //Override the configuration $sql = 'SELECT * FROM #__eb_events WHERE id='.$eventId ; $db->setQuery($sql) ; $event = $db->loadObject(); $params = new JParameter($event->params) ; $keys = array('s_lastname', 'r_lastname', 's_organization', 'r_organization', 's_address', 'r_address', 's_address2', 'r_address2', 's_city', 'r_city', 's_state', 'r_state', 's_zip', 'r_zip', 's_country', 'r_country', 's_phone', 'r_phone', 's_fax', 'r_fax', 's_comment', 'r_comment'); foreach ($keys as $key) { $config->$key = $params->get($key, 0) ; } $keys = array('gr_lastname', 'gr_lastname', 'gs_organization', 'gr_organization', 'gs_address', 'gr_address', 'gs_address2', 'gr_address2', 'gs_city', 'gr_city', 'gs_state', 'gr_state', 'gs_zip', 'gr_zip', 'gs_country', 'gr_country', 'gs_phone', 'gr_phone', 'gs_fax', 'gr_fax', 'gs_email', 'gr_email', 'gs_comment', 'gr_comment'); foreach ($keys as $key) { $config->$key = $params->get($key, 0) ; } //Custom fields $jcFields = new JCFields($eventId, true, 1) ; if ($jcFields->getTotal()) { $customFields = true ; $fields = $jcFields->renderConfirmation() ; $hidden = $jcFields->renderHiddenFields() ; $this->assignRef('fields', $fields) ; $this->assignRef('hidden', $hidden) ; } else { $customFields = false ; } $sql = 'SELECT * FROM #__eb_events WHERE id='.$eventId ; $db->setQuery($sql) ; $event = $db->loadObject(); //Store member total amount and discount $rate = EventBookingHelper::getRegistrationRate($eventId, $numberRegistrants) ; $feeFields = new JCFields($eventId, false, 2) ; $extraFee = $feeFields->canculateGroupFee($groupId) + JCFields::calculateFee($eventId, 1) ; $totalAmount = $rate*$numberRegistrants + $extraFee ; if ($config->collect_member_information) { $memberIds = array() ; $memberDiscounts = array() ; $memberTotals = array() ; for ($i = 0 , $n = count($rowMembers) ; $i < $n ; $i++) { $memberId = $rowMembers[$i]->id ; $memberIds[] = $memberId ; $memberTotals[] = $rate + JCFields::getMemberFee($memberId, $eventId); $memberDiscounts[] = 0 ; } } //Get discount $discount = 0 ; $user = & JFactory::getUser() ; if ($user->get('id')) { if ($event->discount > 0) { if ($event->discount_type == 1) { $discount = $totalAmount*$event->discount/100 ; if ($config->collect_member_information) { for ($i = 0 , $n = count($memberTotals) ; $i < $n ; $i++) { $memberDiscounts[$i] += $memberTotals[$i]*$event->discount/100 ; } } } else { $discount = $numberRegistrants*$event->discount ; if ($config->collect_member_information) { for ($i = 0 , $n = count($memberTotals) ; $i < $n ; $i++) { $memberDiscounts[$i] += $event->discount ; } } } } } if (isset($_SESSION['coupon_id'])) { $sql = 'SELECT * FROM #__eb_coupons WHERE id='.(int)$_SESSION['coupon_id']; $db->setQuery($sql) ; $coupon = $db->loadObject(); if ($coupon) { if ($coupon->coupon_type == 0) { $discount = $discount + $totalAmount*$coupon->discount/100 ; if ($config->collect_member_information) { for ($i = 0 , $n = count($memberTotals) ; $i < $n ; $i++) { $memberDiscounts[$i] += $memberTotals[$i]*$coupon->discount/100 ; } } } else { if ($config->collect_member_information) { for ($i = 0 , $n = count($memberTotals) ; $i < $n ; $i++) { $memberDiscounts[$i] += $coupon->discount ; } } $discount = $discount + $numberRegistrants*$coupon->discount ; } } } //Early bird discount $sql = 'SELECT COUNT(id) FROM #__eb_events WHERE id='.$eventId.' AND DATEDIFF(early_bird_discount_date, NOW()) >= 0'; $db->setQuery($sql); $total = $db->loadResult(); if ($total) { $earlyBirdDiscountAmount = $event->early_bird_discount_amount ; if ($earlyBirdDiscountAmount > 0) { if ($event->early_bird_discount_type == 1) { $discount = $discount + $totalAmount*$event->early_bird_discount_amount/100 ; if ($config->collect_member_information) { for ($i = 0 , $n = count($memberTotals) ; $i < $n ; $i++) { $memberDiscounts[$i] += $memberTotals[$i]*$event->early_bird_discount_amount/100 ; } } } else { $discount = $discount + $numberRegistrants*$event->early_bird_discount_amount ; if ($config->collect_member_information) { for ($i = 0 , $n = count($memberTotals) ; $i < $n ; $i++) { $memberDiscounts[$i] += $event->early_bird_discount_amount ; } } } } } if ($discount > $totalAmount) $discount = $totalAmount ; $amount = $totalAmount - $discount ; #Tax, added from 1.4.3 if ($config->enable_tax && ($amount > 0)) { $taxAmount = round($amount*$config->tax_rate/100, 2) ; } else { $taxAmount = 0 ; } $method = os_payments::getPaymentMethod($paymentMethod) ; $couponCode = JRequest::getVar('coupon_code', ''); $bankId = JRequest::getVar('bank_id'); if (($config->enable_captcha == 3) || (($config->enable_captcha == 2) && ($event->individual_price > 0)) || (($config->enable_captcha == 1) && ($event->individual_price == 0))) { $showCaptcha = 1 ; } else { $showCaptcha = 0 ; } $captchaInvalid = JRequest::getInt('captcha_invalid', 0); #Added support for deposit payment $paymentType = JRequest::getInt('payment_type', 0) ; if ($config->activate_deposit_feature && $event->deposit_amount > 0 && $paymentType == 1) { if ($event->deposit_type == 2) { $depositAmount = $event->deposit_amount ; } else { $depositAmount = $event->deposit_amount*($totalAmount-$discount+$taxAmount)/100 ; } } else { $depositAmount = 0 ; } //Store member information in group registration first if ($config->collect_member_information) { for ($i = 0 , $n = count($memberIds) ; $i < $n ; $i++) { $memberId = $memberIds[$i] ; $memberTotal = $memberTotals[$i] ; $memberDiscount = $memberDiscounts[$i] ; $memberAmount = $memberTotal - $memberDiscount ; $sql = "UPDATE #__eb_registrants SET total_amount='$memberTotal', discount_amount='$memberDiscount', amount='$memberAmount', number_registrants=1 WHERE id='$memberId'"; $db->setQuery($sql); $db->query(); } } //Basic member registrations $this->assignRef('config', $config) ; $this->assignRef('firstName', $firstName); $this->assignRef('lastName', $lastName); $this->assignRef('organization', $organization); $this->assignRef('address', $address); $this->assignRef('address2', $address2); $this->assignRef('city', $city); $this->assignRef('state', $state); $this->assignRef('zip', $zip); $this->assignRef('phone', $phone); $this->assignRef('fax', $fax); $this->assignRef('country', $country) ; $this->assignRef('email', $email); $this->assignRef('comment', $comment); $this->assignRef('paymentMethod', $paymentMethod); $this->assignRef('x_card_num', $x_card_num) ; $this->assignRef('x_card_code', $x_card_code) ; $this->assignRef('cardHolderName', $cardHolderName) ; $this->assignRef('expMonth', $expMonth) ; $this->assignRef('expYear', $expYear) ; $this->assignRef('numberRegistrants', $numberRegistrants) ; $this->assignRef('rowMembers', $rowMembers) ; $this->assignRef('groupId', $groupId) ; $this->assignRef('url', $url) ; $this->assignRef('Itemid', $Itemid) ; $this->assignRef('customFields', $customFields) ; $this->assignRef('totalAmount', $totalAmount) ; $this->assignRef('amount', $amount) ; $this->assignRef('event', $event) ; $this->assignRef('extraFee', $extraFee) ; $this->assignRef('method', $method) ; $this->assignRef('cardType', $cardType) ; $this->assignRef('discount', $discount) ; $this->assignRef('amount', $amount) ; $this->assignRef('username', $username) ; $this->assignRef('password', $password) ; $this->assignRef('couponCode', $couponCode) ; $this->assignRef('bankId', $bankId) ; $this->assignRef('showCaptcha', $showCaptcha) ; $this->assignRef('captchaInvalid', $captchaInvalid) ; $this->assignRef('paymentType', $paymentType) ; $this->assignRef('depositAmount', $depositAmount) ; $this->assignRef('taxAmount', $taxAmount) ; parent::display($tpl) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _displayFormConfirmGroup($err='')\n\t{\n\t\t$dt = $this->_dt;\n\n\t\t$utpage = new utPage('draws');\n\t\t$content =& $utpage->getPage();\n\t\t$form =& $content->addForm('tDelGroups', 'draws', DRAW_GROUP_DELETE);\n\n\t\t// Initialize the field\n\t\t$group = kform::getData();\n\t\tif (empty($ids)) $ids[] = kform::getData();\n\t\tif ($err =='' && !empty($group))\n\t\t{\n\t\t\t$form->addHide(\"group\", $group);\n\t\t\t$form->addMsg('msgConfirmDelGroup');\n\t\t\t$form->addBtn('btnDelete', KAF_SUBMIT);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($err!='') $form->addWng($err);\n\t\t\telse $form->addWng('msgNeedGroups');\n\t\t}\n\t\t$form->addBtn('btnCancel');\n\t\t$elts = array('btnDelete', 'btnCancel');\n\t\t$form->addBlock('blkBtn', $elts);\n\n\t\t//Display the page\n\t\t$utpage->display();\n\t\texit;\n\t}", "public function confirm()\n {\n // Only super admins can delete member groups\n if (! ee('Permission')->can('delete_roles')) {\n show_error(lang('unauthorized_access'), 403);\n }\n\n $roles = ee()->input->post('selection');\n\n $roleModels = ee('Model')->get('Role', $roles)->all();\n $vars['members_count_primary'] = 0;\n $vars['members_count_secondary'] = 0;\n foreach ($roleModels as $role) {\n $vars['members_count_primary'] += $role->getMembersCount('primary');\n $vars['members_count_secondary'] += $role->getMembersCount('secondary');\n }\n\n $vars['new_roles'] = [];\n if (ee('Permission')->can('delete_members')) {\n $vars['new_roles']['delete'] = lang('member_assignment_none');\n }\n $allowed_roles = ee('Model')->get('Role')\n ->fields('role_id', 'name')\n ->filter('role_id', 'NOT IN', array_merge($roles, [1, 2, 3, 4]))\n ->order('name');\n if (! ee('Permission')->isSuperAdmin()) {\n $allowed_roles->filter('is_locked', 'n');\n }\n $vars['new_roles'] += $allowed_roles->all()\n ->getDictionary('role_id', 'name');\n\n ee()->cp->render('members/delete_member_group_conf', $vars);\n }", "public function registerFamilyConfirmAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site; /* @var BeMaverick_Site $site */\n $validator = $this->view->validator; /* @var BeMaverick_Validator $validator */\n\n // set the input params\n $requiredParams = array(\n 'emailAddress',\n );\n\n $input = $this->processInput( $requiredParams, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'authRegisterParent' );\n }\n\n // get the variables\n $emailAddress = $input->emailAddress;\n\n // perform the checks\n $validator->checkParentEmailAddressAssociatedWithAKid( $site, $emailAddress, $errors );\n\n $errorPopupCode = null;\n if ( $errors->hasErrors() ) {\n $errorPopupCode = 'EMAIL_NOT_ASSOCIATED';\n }\n\n if ( $errorPopupCode && $this->view->ajax ) {\n $input->errorCode = $errorPopupCode;\n return $this->renderPage( 'authError' );\n } else if ( $errorPopupCode ) {\n $this->view->popupUrl = $site->getUrl( 'authError', array( 'errorCode' => $errorPopupCode ) );\n return $this->renderPage( 'authRegisterParent' );\n }\n\n // parent is registering, so send them to verify the first kid. they had to have at least\n // one kid to get to this point\n $kids = $site->getKidsByParentEmailAddress( $emailAddress );\n\n if( $kids[0] && !($kids[0]->getVPCStatus()) ) {\n $redirectUrl = BeMaverick_Util::getParentVerifyMaverickUrl( $site, $kids[0] );\n if ( $this->view->ajax ) {\n $this->view->redirectUrl = $redirectUrl;\n return $this->renderPage( 'redirect' );\n }\n\n return $this->_redirect( $redirectUrl );\n } else {\n //if one of the kid is verified, send the parent to set their email.\n $parent = $site->getUserByEmailAddress( $emailAddress );\n BeMaverick_Cookie::updateUserCookie( $parent );\n $successPage = 'authParentVerifyMaverickStep3';\n if ( $this->view->ajax && $this->view->ajax != 'dynamicModule' ) {\n $successPage = $this->view->ajax.'Ajax';\n }\n return $this->renderPage( $successPage );\n }\n }", "public function showRegistrationForm()\n {\n $groups = Group::all();\n return view('auth.register', compact('groups'));\n }", "public function RegistrationUnderApproval() {\n $this->Render();\n }", "public static function confirmation_center () \n { \n $html = null;\n\n load::view( 'admin/confirmation/center' );\n $html .= confirmation_center::form();\n\n return $html;\n }", "public function getConfirmRegisterTopic()\n {\n return view('teacher.confirmregister', ['topics' => $this->topic->getTopicStudent()]);\n }", "public function actionRegdone()\n\t{\n\t\t$this->render('regdone');\n\t}", "public function add_group_page()\n {\n\n $this->authorize('create', Group::class);\n\n return view('pages.add_group');\n }", "public function actionCustomiseconfirm()\n\t{\n\t\tif(isset($_SESSION) && isset($_SESSION['userRegisterVal']) && $_SESSION['userRegisterVal']['email'] != '')\n\t\t{\n\t\t\t$this->layout =\"homeinner\";\n\t\t\t$modelUser=new Users;\n\t\t\t$modelGifts=new Gift;\n\n\t\t\t//simply redirecting to Confirm page...\n\t\t\t$this->render('customizejerseyconfirm',array(\n\t\t\t\t'modelUser'=>$modelUser,\n\t\t\t));\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Redirect to home page\n\t\t\t$this->redirect('../index.php', '');\n\t\t}\n\t}", "public function registerFamilyAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authRegisterParent' );\n }", "public function actionConfirm()\n\t{\n\t\tif(isset($_SESSION) && isset($_SESSION['userRegisterVal']) && $_SESSION['userRegisterVal']['email'] != '')\n\t\t{\n\t\t\t $this->layout =\"homeinner\";\n\t\t\t $modelUser=new Users;\n\t\t\t \n\t\t\t //for getting lastly saved value of Gift model\n\t\t\t $userGiftId = $_SESSION['giftId'];\n\t\t\t \n\t\t\t if(isset($userGiftId) && $userGiftId != '')\n\t\t\t {\n\t\t\t\t \n\t\t\t\t Yii::app()->user->setFlash('successmessage','You have been registered properly.. Please check your mailbox');\n\t\t\t }\n\t\t\t else \n\t\t\t {\n\t\t\t\t \n\t\t\t\t Yii::app()->user->setFlash('failuremessage','Please fill the form properly again');\n\t\t\t }\n\t\t\t //for getting lastly saved value of Gift model by current user\n\t\t $giftLastValue=Gift::model()->findByAttributes(array('id'=>$userGiftId));\n\t\t\t //for getting lastly saved value of Gift model by current user\n\t\t\t\n\t\t\t //destroying session here..\n\t session_destroy(); \n\t \n\t //create new session to keep current gift id for fbshare\n\t session_start();\n\t $_SESSION['giftId'] = $userGiftId;\n\t\n\t //render page to view page....\n\t\t\t $this->render('finalconfirmed',array(\n\t\t\t\t 'modelUser'=>$modelUser,\n\t\t\t\t 'maxIdGift'=>$userGiftId,\n\t\t\t\t 'giftLastValue'=>$giftLastValue,\n\t\t\t ));\n\t\t}\n\t\telse\n\t\t{\n\t\t \t//Redirect to home page\n\t\t\t$this->redirect('../index.php', '');\n\t\t}\n\t}", "function delete_member_group_conf()\n {\n // ------------------------------------\n // Only super admins can delete member groups\n // ------------------------------------\n\n if (Session::userdata('group_id') != 1)\n {\n return Cp::unauthorizedAccess(__('members.only_superadmins_can_admin_groups'));\n }\n\n\n if ( ! $group_id = Request::input('group_id'))\n {\n return false;\n }\n\n // You can't delete these groups\n\n if (in_array($group_id, $this->no_delete))\n {\n return Cp::unauthorizedAccess();\n }\n\n // Are there any members that are assigned to this group?\n $count = DB::table('members')\n ->where('group_id', $group_id)\n ->count();\n\n $members_exist = (!empty($count)) ? true : false;\n\n $group_name = DB::table('member_groups')\n ->where('group_id', $group_id)\n ->value('group_name');\n\n Cp::$title = __('members.delete_member_group');\n\n Cp::$crumb = Cp::anchor(BASE.'?C=Administration'.AMP.'area=members_and_groups', __('admin.members_and_groups')).\n Cp::breadcrumbItem(Cp::anchor(BASE.'?C=Administration'.AMP.'M=members'.AMP.'P=group_manager', __('admin.member_groups'))).\n Cp::breadcrumbItem(__('members.delete_member_group'));\n\n\n Cp::$body = Cp::formOpen(array('action' => 'C=Administration'.AMP.'M=members'.AMP.'P=delete_mbr_group'.AMP.'group_id='.$group_id))\n .Cp::input_hidden('group_id', $group_id);\n\n Cp::$body .= ($members_exist === TRUE) ? Cp::input_hidden('reassign', 'y') : Cp::input_hidden('reassign', 'n');\n\n\n Cp::$body .= Cp::heading(Cp::quickSpan('alert', __('members.delete_member_group')))\n .Cp::div('box')\n .Cp::quickDiv('littlePadding', '<b>'.__('members.delete_member_group_confirm').'</b>')\n .Cp::quickDiv('littlePadding', '<i>'.$group_name.'</i>')\n .Cp::quickDiv('alert', BR.__('members.cp.action_can_not_be_undone').BR.BR);\n\n if ($members_exist === TRUE)\n {\n Cp::$body .= Cp::quickDiv('defaultBold', str_replace('%x', $count, __('members.member_assignment_warning')));\n\n Cp::$body .= Cp::div('littlePadding');\n Cp::$body .= Cp::input_select_header('new_group_id');\n\n $query = DB::table('member_groups')\n ->select('group_name', 'group_id')\n ->orderBy('group_name')\n ->get();\n\n foreach ($query as $row)\n {\n Cp::$body .= Cp::input_select_option($row->group_id, $row->group_name, '');\n }\n\n Cp::$body .= Cp::input_select_footer();\n Cp::$body .= '</div>'.PHP_EOL;\n }\n\n Cp::$body .= Cp::quickDiv('littlePadding', Cp::input_submit(__('cp.delete')))\n .'</div>'.PHP_EOL\n .'</form>'.PHP_EOL;\n }", "public function groups() {\n\t\t//variabel\n\t\t$data['datas'] = $this->PbkGroups_model->get_all();\n\t\t\n\t\t$template_data['title'] = 'SMS Gateway ';\n\t\t$template_data['subtitle'] = 'Kirim SMS';\n $template_data['crumb'] = ['SMS Gateway' => 'smsgateway', 'SMS Groups' => 'smsgateway/kirimsms/groups',];\n\t\t//view\n\t\t$this->layout->set_wrapper('groups_form', $data);\n\t\t$this->layout->auth();\n\t\t$this->layout->render('admin', $template_data);\n\t}", "public function showForm()\n {\n return view('admin.groups.create');\n }", "public function verifyAction()\n\t{\n\t\t$this->view->headTitle(\"Registration Process\");\n\t\t\n\t\t//Retrieve key from url\n\t\t$registrationKey = $this->getRequest()->getParam('key');\n\t\t\n\t\t//Identitfy the user associated with the key\n\t\t$user = new Default_Model_User();\n\t\t\n\t\t//Determine is user already confirm\n\t\tif($user->isUserConfirmed($registrationKey)){\n\t\t$this->view->isConfirmed = 1;\n\t\t$this->view->errors[] = \"User is already confirmed\";\n\t\treturn;\n\t\t}\n\n\t\t$resultRow = $user->getUserByRegkey($registrationKey);\n\t\t\n\t\t//If the user has been located, set the confirmed column.\n\t\tif(count($resultRow)){\n\t\t\t$resultRow->confirmed = 1;\n\t\t\t$resultRow->save();\n\t\t\t\n\t\t\t$this->view->success = 1;\n\t\t\t$this->view->firstName = $resultRow->first_name;\n\t\t\n\t\t} else{\n\t\t\t$this->view->errors[] = \"Unable to locate registration key\";\n\t\t}\n\n\t}", "public function confirmed()\n {\n if(!Auth::check()){\n return redirect()->route('auth.registration');\n }\n\n return view('confirm');\n }", "function success()\n {\n $message = null;\n $message = \"Một email đã được gửi tới hòm thư của bạn. <br />\";\n $message .= \"Vui lòng kiểm tra hộp thư đến và kích hoạt tài khoản.\";\n $this->view->load('frontend/user/register_success', [\n 'message' => $message\n ]);\n }", "public static function groups_page()\n\t{\n\n\t\t//If the form was submitted\n\t\tif ( $_POST ){\n\n\t\t\t//Do a bit of validation\n\t\t\tif ( ! $_POST['mz_group_name'] ){\n\t\t\t\t$error = 'You must fill in the form';\n\t\t\t\tmz_Groups::newGroupForm( $error );\n\t\t\t} else {\n\t\t\t\t//Make the update\n\t\t\t\t$mz_group_name = esc_sql( stripslashes( $_POST['mz_group_name'] ) );\n\t\t\t\tglobal $wpdb;\n\t\t\t\t$ins = $wpdb->query('INSERT INTO ' . $wpdb->prefix . GROUPS_DB_TABLE . ' ( groupname , groupactive ) VALUES (\"' . $mz_group_name . '\" , \"0\") ');\n\t\t\t}\n\n\t\t}\n\n\n\t\techo '<div class=\"wrap\">';\n\t\techo '<h2>Mentorz - Group Administration</h2>';\n\n\t\t//Generate the form\n\t\tmz_Groups::newGroupForm();\n\n\t\tglobal $wpdb;\n\t\t$results = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . GROUPS_DB_TABLE , ARRAY_A);\n\n\t\tif(count($results)){\n\t\t\t\n\t\t\techo '<p>&nbsp;</p>';\n\t\t\techo '<table cellspacing=\"0\" class=\"widefat\">';\n\t\t\techo '<thead>';\n\t\t\t\techo '<tr>';\n\t\t\t\t\techo '<th class=\"column-title\"><span>Group Name</span></th>';\n\t\t\t\t\t//echo '<th class=\"column-title\">Group Active</th>';\n\t\t\t\t\techo '<th class=\"column-title\">Edit</th>';\n\t\t\t\t\techo '<th class=\"column-title\">Delete</th>';\n echo '<th class=\"column-title\">Info</th>';\n\n echo '</tr>';\n\t\t\techo '</thead>';\n\n\t\t\tforeach ($results as $key => $value) {\n\n\t\t\t\t//Clean up the status\n\t\t\t\t$status = $value['groupactive'];\n\t\t\t\tif ( $status == 0 ){\n\t\t\t\t\t$status = \"Inactive\";\n\t\t\t\t} elseif ( $status == 1 ){\n\t\t\t\t\t$status = \"Active\";\n\t\t\t\t}\n\n\t\t\t\techo '<tbody>';\n\t\t\t\t\techo '<tr>';\n\t\t\t\t\t\techo '<td>' . $value['groupname'] . '</td>';\n\t\t\t\t\t\t//echo '<td>' . $status . '</td>';\n\t\t\t\t\t\techo '<td style=\"width: 30px;\">';\n\t\t\t\t\t\t\techo '<a href=\"' . str_replace( '%7E', '~', $_SERVER['REQUEST_URI']) . '&edit='.$value['groupid'].'\" class=\"\">EDIT</a>';\n\t\t\t\t\t\techo '</td>';\n\t\t\t\t\t\techo '<td style=\"width: 30px;\">';\n\t\t\t\t\t\t\techo '<a href=\"' . str_replace( '%7E', '~', $_SERVER['REQUEST_URI']) . '&del='.$value['groupid'].'\" class=\"\">DELETE</a>';\n\t\t\t\t\t\techo '</td>';\n echo '<td style=\"width: 30px;\">';\n echo '<a href=\"#\" class=\"mz_accordion_button\" rel=\"mz_accord_'.$value['groupid'].'\">INFO</a>';\n echo '</td>';\n\t\t\t\t\techo '</tr>';\n\n echo '<tr class=\"mz_accord mz_accord_'.$value['groupid'].'_inner\">';\n echo '<td style=\"width: 30px;\" colspan=\"99\">';\n echo '<div>';\n\n $mentor = mz_Func::get_group_mentor( $value['groupid'] );\n\n if ( $mentor ){\n echo '<h4>The group mentor is ' . mz_Func::get_group_mentor( $value['groupid'] ) . '</h4>';\n } else {\n echo '<h4>The group does not have a mentor</h4>';\n }\n\n $students = mz_func::get_all_students_in_group( $value['groupid'] );\n\n if ( $students ){\n\n echo '<h4>The groups beneficiaries are</h4>';\n echo '<ul>';\n\n foreach ( $students as $student ) {\n\n echo '<li>'.mz_Func::get_users_display_name( $student['userid'] ).'</li>';\n\n }\n\n echo '</ul>';\n\n } else {\n\n echo '<h4>The group does not have any beneficiaries</h4>';\n\n }\n\n\n\n echo '</div>';\n echo '</td>';\n echo '</tr>';\n\n\t\t\t\techo '</tbody>';\n\n\n\t\t\t}//fe\n\n\t\t} else {\n\n\t\t\techo '<h3>There are no groups yet</h3>';\n\t\t\t\n\t\t}\n\n\t\techo '</div>';\n\n\t}", "public function regi_form() {\n $template = $this->loadView('registration_page');\n // $template->set('result', $error);\n $template->render();\n }", "public function familyVerifyMaverickConfirmAction()\n {\n // get the view vars\n $errors = $this->view->errors; /* @var Sly_Errors $errors */\n $site = $this->view->site; /* @var BeMaverick_Site $site */\n $loginUser = $this->view->loginUser; /* @var BeMaverick_User $loginUser */\n\n // set the input params\n $requiredParams = array(\n 'password',\n );\n\n $input = $this->processInput( $requiredParams, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n $loginUser->setPassword( $input->getUnescaped( 'password' ) );\n\n $emailAddress = $loginUser->getEmailAddress();\n $kids = $site->getKidsByParentEmailAddress( $emailAddress );\n $systemConfig = $site->getSystemConfig();\n\n if ( $kids[0] ) {\n // send the email\n $vars = array(\n 'EMAIL_ADDRESS' => $emailAddress,\n 'USERNAME' => $kids[0]->getUsername(),\n 'APP_URL' => $systemConfig->getSetting( 'APP_DEEPLINK' ),\n );\n BeMaverick_Email::sendTemplate( $site, 'parent-new-user', array( $emailAddress ), $vars );\n\n }\n\n\n $successPage = 'authParentVerifyMaverickConfirm';\n if ( $this->view->ajax && $this->view->ajax != 'dynamicModule' ) {\n $successPage = $this->view->ajax.'Ajax';\n }\n\n return $this->renderPage( $successPage );\n }", "public function confirmAction() {\n if (Zend_Auth::getInstance()->hasIdentity())\n $this->_redirect($this->getUrl());\n\n $errors = array();\n\n $action = $this->getRequest()->getParam('a');\n\n switch ($action) {\n case 'email':\n $id = $this->getRequest()->getParam('id');\n $key = $this->getRequest()->getParam('key');\n\n $result = $this->em->getRepository('Champs\\Entity\\User')->activateAccount($id, $key);\n\n if (!$result) {\n $errors['email'] = 'Error activating your account';\n }\n\n break;\n }\n\n $this->view->errors = $errors;\n $this->view->action = $action;\n }", "public function onRegistrationConfirm(GetResponseUserEvent $event)\n {\n $this->_session->getFlashBag()->add(\n 'success',\n 'Votre compte a bien été activé. Vous pouvez désormais\n créer un compte pour votre structure eSport ou votre marque.'\n );\n $url = $this->_router->generate('inscription_index');\n $event->setResponse(new RedirectResponse($url));\n }", "public function admin_user_group()\n\t{\n\t\t$crud = $this->generate_crud('admin_groups');\n\t\t$this->mTitle.= 'Admin User Groups';\n\t\t$this->render_crud();\n\t}", "public function showRegistrationForm()\n {\n abort_unless(config('access.registration'), 404);\n\n return view('frontend.auth.register');\n }", "function deleteGroupById($group_id){\n\n Group::DeleteGroupById($group_id);\n\n echo \"<script>window.location.href=\\\"../Views/group.php\\\"</script>\";\n\n}", "public function actionSendConfirmationEmail() {\n\n\t\t$userId = User::checkLogged();\n\t\t$confirmation = User::generateConfirmationCode($userId);\n\t\t$subject = \"Confirm your account on JustRegMe\";\n\t\t$bodyPath = ROOT . '/template/email/confirmation.php';\n\t\t$body = include($bodyPath); //loads HTML-body from template\n\t\t\n\t\techo User::sendEmail($userId, $subject, $body);\n\n\t}", "public function showRegistrationForm()\n {\n return view('skins.' . config('pilot.SITE_SKIN') . '.auth.register');\n }", "function confirm_page(){\n $this->load->view('include/header.inc');\n $this->load->view('pages/register_complete.php' );\n $this->load->view('include/footer.inc');\n }", "public function deletegroupAction()\n {\n \t$this->_helper->viewRenderer->setNoRender();\n \t\n \t$group = GroupNamespace::getCurrentGroup();\n \tif (isset($group))\n \t{\n \t\tGroupDAO::getGroupDAO()->deleteGroup($group);\n \t}\n \tGroupNamespace::clearCurrentGroup();\n \t$this->_helper->redirector('index', 'user');\n }", "public function phrase_delete_group()\n {\n $group_id = ee()->input->get('phrase_group_id', TRUE);\n $groups = array('' => '- Select -');\n\n foreach (ee()->publisher_phrase->get_groups() as $id => $group)\n {\n if ($group_id != $id)\n {\n $groups[$id] = $group->group_label;\n }\n }\n\n $vars = array(\n 'group_name' => ee()->publisher_phrase->get_group($group_id)->group_label,\n 'groups' => $groups,\n 'hidden' => array('group_id' => $group_id),\n 'delete_url' => ee()->publisher_helper_cp->mod_link('phrase_delete_group_execute', array(), TRUE),\n );\n\n return ee()->load->view('phrase/delete_group', $vars, TRUE);\n }", "public function successAction()\r\n {\r\n View::renderTemplate('Signup/success.html');\r\n }", "public function showRegistrationForm()\n {\n $askForAccount = false;\n return view('client.auth.register',compact(\"askForAccount\"));\n }", "public function confirmationAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERUPDATE);\n \t$userId = $this->getRequest()->getParam('userId');\n $activationKey = $this->getRequest()->getParam(self::ACTIVATION_KEY_PARAMNAME);\n\n $user = $this->_getUserFromIdAndKey($userId, $activationKey);\n\n if(!$user){\n // No such user\n Globals::getLogger()->registrationError(\"Account activation: user retrieval failed - userId=$userId, key=$activationKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::ACTIVATION_FAILED));\n }\n\n $user->clearCache();\n $user = $this->_getUserFromIdAndKey($userId, $activationKey);\n\n if($user->{User::COLUMN_STATUS} == User::STATUS_PENDING){\n $user->{User::COLUMN_STATUS} = User::STATUS_MEMBER;\n $user->date = date('Y-m-d H:i:s');\n $id = $user->save();\n if($id !== $userId){\n Globals::getLogger()->registrationError(\"Account activation: user save failed - userId=$userId, key=$activationKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::ACTIVATION_FAILED));\n }\n\n $this->view->success = true;\n $this->view->alreadyDone = false;\n \t$this->_savePendingUserIdentity($userId);\n } else {\n $this->view->success = false;\n $this->view->alreadyDone = true;\n }\n }", "public function successAction()\n {\n View::renderTemplate('Signup/success.html');\n }", "protected function confirm_add()\n\t{\n\t\t$msg =\n\t\t\t$this->fields['FirstName'] . \" \" . $this->fields['LastName'] .\n\t\t\t\" added as administrator.\"\n\t\t;\n\n\t\treturn '<font color=\"green\">' . $msg . '</font><br>';\n\n\t}", "public function registerSuccess()\n {\n return $this->loadPublicView('user.register-success');\n }", "public function add()\n {\n $data['action'] = $this->url->link('/admin/users-groups/submit');\n\n $data['pages'] = $this->getPermissionPages();\n\n return $this->view->render('admin/users-groups/form', $data);\n }", "function register() {\n\n/* ... this form is not to be shown when logged in; if logged in just show the home page instead (unless we just completed registering an account) */\n if ($this->Model_Account->amILoggedIn()) {\n if (!array_key_exists( 'registerMsg', $_SESSION )) {\n redirect( \"mainpage/index\", \"refresh\" );\n }\n }\n\n/* ... define values for template variables to display on page */\n $data['title'] = \"Account Registration - \".$this->config->item( 'siteName' );\n\n/* ... set the name of the page to be displayed */\n $data['main'] = \"register\";\n\n/* ... complete our flow as we would for a normal page */\n $this->index( $data );\n\n/* ... time to go */\n return;\n }", "public function register_show_2()\n {\n return view('fontend.user.verify');\n }", "function confirmation_delete(){\n\t\t\tif($this->check_session->user_session() && $this->check_session->get_level()==100){\n\t\t\t\tif($this->uri->segment(3)!='99'){ //jika bukan user pusat\n\t\t\t\t\t$data['url']\t\t= site_url('rsa_tambah_em/exec_delete/'.$this->uri->segment(3));\n\t\t\t\t\t$data['message']\t= \"Apakah anda yakin akan menghapus data ini ( kode : \".$this->uri->segment(3).\") ?\";\n\t\t\t\t\t$this->load->view('confirmation_',$data);\n\t\t\t\t}else{ //jika user pusat\n\t\t\t\t\t$data['class']\t = 'option box';\n\t\t\t\t\t$data['class_btn']\t = 'ya';\n\t\t\t\t\t$data['message'] = 'Unit pusat tidak diijinkan untuk dihapus';\n\t\t\t\t\t$this->load->view('messagebox_',$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tshow_404('page');\n\t\t\t}\n\t\t}", "public function admin_user_group()\n\t{\n\t\t$crud = $this->generate_crud('admin_groups');\n\t\t$crud->set_theme('datatables');\n\t\t$this->mPageTitle = 'Admin User Groups';\n\t\t$this->render_crud();\n\t}", "public function registrarGrupoController()\n\t\t{\n\t\t\t$respuesta = \"\";\n\t\t\tif(isset($_POST['registrar']))\n\t\t\t{\n\n\t\t\t\tif(!empty($_POST['nombre']))\n\t\t\t\t{\n\t\t\t\t\t//Se registra en la base de datos desde el modelo\n\t\t\t\t\t$datosController = $_POST['nombre'];\n\t\t\t\t\t$respuesta = Datos::registrarGrupoModel($datosController,'grupo');\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($respuesta == \"success\")\n\t\t\t{\n\t\t\t\techo\"<script>\n\t\t\t\t\t\twindow.location = 'index.php?action=grupos';\n\t\t\t\t\t</script>\";\n\t\t\t}\n\t\t}", "public function registration() {\n $this->load->view('header');\n $this->load->view('user_registration');\n $this->load->view('footer');\n }", "public function create()\n\t{\n\t\t//\n\t\treturn view('admin.auth.group.create');\n\t}", "public function showRegistrationForm()\n {\n $navList = Nav::getMenuTree(Nav::orderBy('sort', 'asc')->get()->toArray());\n $categories = Category::getMenuTree(Category::orderBy('sort', 'asc')->select('id', 'name', 'pid')->get()->toArray());\n View::share([\n 'nav_list' => $navList,\n 'category_list' => $categories,\n ]);\n return view('auth.register');\n }", "public function showRegistrationForm()\n {\n return view('admin.auth.register');\n }", "public function showRegistrationForm()\n {\n return view('laboratorio.auth.register');\n \n }", "function confirmation_redirect() {\n if (!SwpmFbForm::is_form_submitted() || $this->form->is_fatal() || !$this->form->is_valid()) {\n return;\n }\n\n global $wpdb;\n\n $form_id = ( isset($_REQUEST['form_id']) ) ? (int) esc_html($_REQUEST['form_id']) : '';\n\n // Get forms\n $order = sanitize_sql_orderby('form_id DESC');\n $forms = $wpdb->get_results($wpdb->prepare(\"SELECT * FROM $this->form_table_name WHERE form_id = %d ORDER BY $order\", $form_id));\n\n foreach ($forms as $form) :\n // If text, return output and format the HTML for display\n if ('page' == $form->form_success_type) {\n $page = get_permalink($form->form_success_message);\n wp_redirect($page);\n exit();\n }\n // If redirect, redirect to the URL\n elseif ('redirect' == $form->form_success_type) {\n wp_redirect(esc_url($form->form_success_message));\n exit();\n }\n\n endforeach;\n }", "public function showRegistrationForm()\n {\n return view('adminlte::auth.register');\n }", "public function showRegistrationForm()\n {\n return view('privato.auth.register');\n }", "public function showRegistrationForm()\n {\n return redirect()->route('frontend.account.register');\n //return theme_view('account.register');\n }", "public function confirmedAction()\n {\n $user = $this->container->get('security.context')->getToken()->getUser();\n if (!is_object($user) || !$user instanceof UserInterface) {\n throw new AccessDeniedException('This user does not have access to this section.');\n }\n \n //add a default wall\n $user->createDefaultMemoryWall();\n $this->container->get('fos_user.user_manager')->updateUser($user);\n\n return $this->container->get('templating')->renderResponse('FOSUserBundle:Registration:confirmed.html.'.$this->getEngine(), array(\n 'user' => $user,\n ));\n }", "public function actionAccept($confirmation) {\n\n\t\tUser::confirmEmail($confirmation);\n\t}", "function confirmation(){\n\t\tglobal $wpdb;\n\n\t\t$form_id = ( isset( $_REQUEST['form_id'] ) ) ? (int) esc_html( $_REQUEST['form_id'] ) : '';\n\n\t\tif ( !isset( $_REQUEST['vfb-submit'] ) )\n\t\t\treturn;\n\n\t\tdo_action( 'vfb_confirmation', $form_id, $this->new_entry_id );\n\n\t\t// Allow custom query arguments to be appended to redirects\n\t\t$query_args = apply_filters( 'vfb_redirect_query_args', '', $form_id, $this->new_entry_id );\n\n\t\t// Get forms\n\t\t$order = sanitize_sql_orderby( 'form_id DESC' );\n\t\t$forms \t= $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $this->form_table_name WHERE form_id = %d ORDER BY $order\", $form_id ) );\n\n\t\tforeach ( $forms as $form ) :\n\n\t\t\t// If user wants this to redirect to PayPal\n\t\t\tif ( $form->form_paypal_setting ) {\n\n\t\t\t\t$paypal_data = array(\n\t\t\t\t\t'paypal_field'\t=> $form->form_paypal_field_price,\n\t\t\t\t\t'item_name'\t\t=> $form->form_paypal_item_name,\n\t\t\t\t\t'currency_code'\t=> $form->form_paypal_currency,\n\t\t\t\t\t'tax_rate'\t\t=> $form->form_paypal_tax,\n\t\t\t\t\t'shipping'\t\t=> $form->form_paypal_shipping,\n\t\t\t\t\t'business'\t\t=> $form->form_paypal_email,\n\t\t\t\t);\n\n\t\t\t\t$this->paypal_redirect( $paypal_data, $form_id );\n\t\t\t}\n\n\t\t\t// Allow templating within confirmation message\n\t\t\t$form->form_success_message = $this->templating( $form->form_success_message );\n\n\t\t\t// Apply a filter for the success message\n\t\t\t$form->form_success_message = apply_filters( 'vfb_form_success_message', $form->form_success_message, $form_id, $form->form_success_type );\n\n\t\t\t// If text, return output and format the HTML for display\n\t\t\tif ( 'text' == $form->form_success_type ) :\n\t\t\t\treturn stripslashes( html_entity_decode( wp_kses_stripslashes( $form->form_success_message ) ) );\n\t\t\t// If page, redirect to the permalink\n\t\t\telseif ( 'page' == $form->form_success_type ) :\n\t\t\t\t$page = get_permalink( $form->form_success_message );\n\t\t\t\twp_redirect( esc_url_raw( $page . $query_args ) );\n\t\t\t\texit();\n\t\t\t// If redirect, redirect to the URL\n\t\t\telseif ( 'redirect' == $form->form_success_type ) :\n\t\t\t\twp_redirect( esc_url_raw( $form->form_success_message . $query_args ) );\n\t\t\t\texit();\n\t\t\t// Display Entry with Text message prepended\n\t\t\telseif ( 'display-entry' == $form->form_success_type ) :\n\t\t\t\t// At least output the Text message\n\t\t\t\t$output = stripslashes( html_entity_decode( wp_kses_stripslashes( $form->form_success_message ) ) );\n\n\t\t\t\t// Only add entry to output if Display Entries is active\n\t\t\t\tif ( class_exists( 'VFB_Pro_Display_Entries' ) ) {\n\t\t\t\t\t$output .= vfb_display_entries( array(\n\t\t\t\t\t\t'entry_id' \t=> $this->new_entry_id,\n\t\t\t\t\t\t'echo'\t\t=> 0\n\t\t\t\t\t));\n\t\t\t\t}\n\n\t\t\t\treturn $output;\n\t\t\tendif;\n\n\t\tendforeach;\n\t}", "public function registrar()\r\n\t{\r\n\t\t//Se debe agregar el checkbox de terminos y condiciones y debe ser un enlace tipo _blank\r\n\t\tView::template('default');\r\n\t\tif(Input::hasPost('correo')){\r\n\t\t\tif((New Proveedor)->registrar()){\r\n\t\t\t\tFlash::valid('Registro exitoso, ya puede iniciar sesión con su cuenta, lo estamos redirigiendo al inicio de sesión');\r\n \t\tInput::delete();\r\n \t\tRedirect::to('', '5');\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tFlash::error('No se pudo registrar, intente más tarde o comuniquese con soporte');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function registration()\n {\n $view = new View('login_registration');\n $view->title = 'Bilder-DB';\n $view->heading = 'Registration';\n $view->display();\n }", "public function getRegisterSuccess()\n {\n return view(\"Home::auth.registersuccess\");\n }", "public function account_group()\n {\n //goal: one controller and one module for complete genric Creation.\n $form_validation='account_group';\n $table_name='account_group';\n $view='accounts/account_group';\n $field='account_group_name';\n $this->insert_genric($form_validation,$table_name,$view,$field);\n }", "public function account_group()\n {\n //goal: one controller and one module for complete genric Creation.\n $form_validation='account_group';\n $table_name='account_group';\n $view='accounts/account_group';\n $field='account_group_name';\n $this->insert_genric($form_validation,$table_name,$view,$field);\n }", "public function showRegistrationForm()\n {\n return view('instructor.auth.register');\n }", "public function confirmedAction()\n {\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $address = $user->getAddress();\n $city = $user->getCity();\n $geocodeAddress = $address . \",\" . $city;\n $geo = $this->container->get('simon_user.geocoder');\n $coord = $geo->geocode($geocodeAddress);\n $geometry = new Geometry();\n $geometry->setLat($coord[0]);\n $geometry->setLng($coord[1]);\n $geometry->setUser($user);\n $em->persist($geometry);\n $em->flush();\n return $this->render('@FOSUser/Registration/confirmed.html.twig', array(\n 'user' => $user,\n 'targetUrl' => $this->getTargetUrlFromSession(),\n ));\n }", "public function create_group()\r\n\t{\r\n\t\t// Load template\r\n\t\tinclude(BLUPATH_TEMPLATES .'/site/modules/create_group.php');\r\n\t}", "public function create()\n\t{\n\t\treturn view('registration/investigation_group_registration/investigation_group_registration_create');\n\t}", "public function showRegistrationForm() {\n //parent::showRegistrationForm();\n $data = array();\n\n $data = $this->example_of_user();\n $data['title'] = 'RegisterForm';\n\n return view('frontend.auth.register', $data);\n }", "function formSuccess() {\n\n // Template\n $this->r->text['back_url'] = suxFunct::getPreviousURL();\n $this->r->title .= \" | {$this->r->gtext['success']}\";\n\n $this->tpl->display('success.tpl');\n\n }", "public function showRegistrationForm()\n {\n //Custom code here\n return view('auth.register')->with('packages', Package::all()->where('status', 1));\n }", "function joingroup_submit(Pieform $form, $values) {\n global $SESSION, $USER;\n group_add_user($values['group'], $USER->get('id'));\n $SESSION->add_ok_msg(get_string('joinedgroup', 'group'));\n if (substr($values['returnto'], 0, 1) == '/') {\n $next = $values['returnto'];\n }\n else {\n $next = '/group/view.php?id=' . $values['group'];\n }\n redirect($next);\n}", "function new_member_profile_form()\n {\n if ( ! Session::access('can_admin_members')) {\n return Cp::unauthorizedAccess();\n }\n\n Cp::$body_props = \" onload=\\\"document.forms[0].email.focus();\\\"\";\n\n $title = __('members.register_member');\n\n // Build the output\n $r = Cp::formOpen(['action' => 'C=Administration'.AMP.'M=members'.AMP.'P=register_member']);\n\n $r .= Cp::quickDiv('tableHeading', $title);\n $r .= Cp::div('box');\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.email'),\n Cp::input_text('email', '', '35', '32', 'input', '300px')\n );\n\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.password'),\n Cp::input_pass('password', '', '35', '32', 'input', '300px')\n );\n\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.password_confirm'),\n Cp::input_pass('password_confirm', '', '35', '32', 'input', '300px')\n );\n\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.screen_name'),\n Cp::input_text('screen_name', '', '40', '50', 'input', '300px')\n );\n\n $r .= '</td>'.PHP_EOL.\n Cp::td('', '45%', '', '', 'top');\n\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.email'),\n Cp::input_text('email', '', '35', '100', 'input', '300px')\n );\n\n // Member groups assignment\n if (Session::access('can_admin_mbr_groups')) {\n $query = DB::table('member_groups')\n ->select('group_id', 'group_name')\n ->orderBy('group_name');\n\n if (Session::userdata('group_id') != 1)\n {\n $query->where('is_locked', 'n');\n }\n\n $query = $query->get();\n\n if ($query->count() > 0)\n {\n $r .= Cp::quickDiv(\n 'paddingTop',\n Cp::quickDiv('defaultBold', __('account.member_group_assignment'))\n );\n\n $r .= Cp::input_select_header('group_id');\n\n foreach ($query as $row)\n {\n $selected = ($row->group_id == 5) ? 1 : '';\n\n // Only SuperAdmins can assigned SuperAdmins\n if ($row->group_id == 1 AND Session::userdata('group_id') != 1) {\n continue;\n }\n\n $r .= Cp::input_select_option($row->group_id, $row->group_name, $selected);\n }\n\n $r .= Cp::input_select_footer();\n }\n }\n\n $r .= '</div>'.PHP_EOL;\n\n // Submit button\n\n $r .= Cp::itemgroup( '',\n Cp::required(1).'<br><br>'.Cp::input_submit(__('cp.submit'))\n );\n $r .= '</form>'.PHP_EOL;\n\n\n Cp::$title = $title;\n Cp::$crumb = Cp::anchor(BASE.'?C=Administration'.AMP.'area=members_and_groups', __('admin.members_and_groups')).\n Cp::breadcrumbItem($title);\n Cp::$body = $r;\n }", "public function displayRegisterForm()\n {\n // charger le HTML de notre template\n require OPROFILE_TEMPLATES_DIR . 'register-form.php';\n }", "function register()\r\n {\r\n if (!empty($this->data))\r\n {\r\n // Turn the supplied password into the correct Hash.\r\n // and move into the ‘password’ field so it will get saved.\r\n $this->data['User']['password'] = $this->Auth->password($this->data['User']['passwrd']);\r\n\r\n $this->User->data = Sanitize::clean($this->data);\r\n\r\n // Successfully created account – send activation email\r\n\r\n if ($this->User->save())\r\n {\r\n $this->__sendActivationEmail($this->User->getLastInsertID());\r\n\r\n // this view is not show / listed – use your imagination and inform\r\n // users that an activation email has been sent out to them.\r\n $this->flashSuccess('The activation eMail has been sent to you. Please click on the link in your eMail to activate your account. Please note that right now there is no possibility to recover a lost password for you.', 'login');\r\n }\r\n // Failed, clear password field\r\n else\r\n {\r\n $this->data['User']['passwrd'] = null;\r\n }\r\n }\r\n $groups = $this->User->Group->find('list');\r\n $this->set(compact('groups'));\r\n }", "public function register()\n\t{\n\t\tif ($this->session->userdata('isValid') == 0) {\n\t\t\t$this->load->view('v_register');\n\t\t}\n\n\t\t// Jika user masuk dari link baru, memastikan isi data session kosong dengan men-destroy data session\n\t\telse\n\t\t{\n\t\t\t$this->session->sess_destroy();\n\t\t\t$this->load->view('v_register');\n\t\t}\n\t}", "function confirm_subscibe_ajax() {\r\n global $wpdb;\r\n\r\n $member_id = $_REQUEST['member_id'];\r\n\r\n if ( $_REQUEST['hash'] != md5( \"sometext123\" . $member_id ) )\r\n die( __( 'Error: Wrong subscription data!', 'email-newsletter' ) );\r\n\r\n $member_data = $this->get_member( $member_id );\r\n\r\n $unsubscribe_code = $this->gen_unsubscribe_code();\r\n\r\n $result = $wpdb->query( $wpdb->prepare( \"UPDATE {$this->tb_prefix}enewsletter_members SET member_info = '', unsubscribe_code = '%s' WHERE member_id = %d\", $unsubscribe_code, $member_id ) );\r\n\r\n //creating new list of groups for user\r\n if ( is_array( $member_data['future_groups_id'] ) )\r\n foreach( ( array ) $member_data['future_groups_id'] as $group_id )\r\n $result = $wpdb->query( $wpdb->prepare( \"INSERT INTO {$this->tb_prefix}enewsletter_member_group SET member_id = %d, group_id = %d\", $member_id, $group_id ) );\r\n\r\n\r\n die( __( 'Successful subscription!', 'email-newsletter' ) );\r\n }", "public function onSignUp()\n {\n $data = post();\n $data['requires_confirmation'] = $this->requiresConfirmation;\n\n if (app(SignUpHandler::class)->handle($data, (bool)post('as_guest'))) {\n if ($this->requiresConfirmation) {\n return ['.mall-signup-form' => $this->renderPartial($this->alias . '::confirm.htm')];\n }\n\n return $this->redirect();\n }\n }", "public function activationAction()\n {\n View::renderBlade('register/activation');\n }", "public function formRegistrazioneNegozio() {\n $this->smarty->display('reg_negozio.tpl');\n }", "function show_confirmation() {\r\n\tshow_header();\r\n?>\r\n<div class=\"box\">\r\n\t<p class=\"success\">The database connection was established successfully.</p>\r\n\t<p class=\"success\">The database tables were created or updated successfully.</p>\r\n\t<p class=\"success\">The application configuration file was updated successfully.</div>\r\n<form method=\"get\" action=\"install.php\">\r\n<p style=\"text-align: right\">\r\n\t<input type=\"hidden\" name=\"step\" value=\"3\" />\r\n\t<input type=\"submit\" value=\"Continue &gt;&gt;\" onclick=\"javascript:return fieldsAreValid();\" />\r\n</p>\r\n</form>\r\n<?php\r\n\tshow_footer();\r\n\texit;\r\n}", "public function registration() {\r\n \r\n if (isset($_GET[\"submitted\"])) {\r\n $this->registrationSubmit();\r\n } else {\r\n \r\n }\r\n }", "function confirm_email() {\n \n\n $confirm_url = $this->traffic_model->GetAbsoluteURLFolder().'/confirm_register/' . $this->traffic_model->MakeConfirmationMd5();\n \n\n $this->email->from('[email protected]');\n\n $this->email->to($this->input->post('email'));\n $this->email->set_mailtype(\"html\");\n $this->email->subject('Confirm registration');\n $message = \"Hello \" . $this->input->post('username'). \"<br/>\" .\n \"Thanks for your registration with www.satrafficupdates.co.za <br/>\" .\n \"Please click the link below to confirm your registration.<br/>\" .\n \"$confirm_url<br/>\" .\n \"<br/>\" .\n \"Regards,<br/>\" .\n \"Webmaster <br/>\n www.satrafficupdates.co.za\n \";\n $this->email->message($message);\n if ($this->email->send()) {\n echo 'Message was sent';\n //return TRUE;\n } else {\n echo $this->email->print_debugger();\n //return FALSE;\n }\n\n\n\n\n }", "public function showReg()\n {\n //show the form\n if (Auth::check())\n {\n return Redirect::route('account');\n }\n\n // Show the page\n return View::make('account.reg');\n }", "public function regNewCommercialUser()\n {\n $this->view('Registration/commercial_user_registration');\n }", "public function showRegistrationForm()\n\t{\n\t\t$data = [];\n\t\t\n\t\t// References\n\t\t$data['countries'] = CountryLocalizationHelper::transAll(CountryLocalization::getCountries());\n\t\t$data['genders'] = Gender::trans()->get();\n\t\t\n\t\t// Meta Tags\n\t\tMetaTag::set('title', getMetaTag('title', 'register'));\n\t\tMetaTag::set('description', strip_tags(getMetaTag('description', 'register')));\n\t\tMetaTag::set('keywords', getMetaTag('keywords', 'register'));\n\t\t\n\t\t// return view('auth.register.indexFirst', $data);\n\t\treturn view('auth.register.index', $data);\n\n\t}", "public function formRegistrazionePrivato() {\n $this->smarty->display('reg_privato.tpl');\n }", "public function confirm() {\n $user_id = $_GET['id'];\n $token = $_GET['token'];\n $userConfirmed = $this->model->confirmToken($user_id, $token);\n\n if ($userConfirmed) {\n $this->model->setFlash('success', 'Votre compte a bien été validé');\n // $_SESSION['flash']['success'] = 'Votre compte a bien été validé';\n header('location:index.php?controller=security&action=formLogin');\n } else {\n $this->model->setFlash('danger', \"Ce token n'est plus valide\");\n // $_SESSION['flash']['danger'] = \"Ce token n'est plus valide\";\n header('location:index.php?controller=security&action=formRegister');\n }\n }", "public function actionRegister()\n\t{\n\t\tUtilities::updateCallbackURL();\n\t\t$this->render('registration');\n\t}", "public function showRegistrationForm()\n {\n return view('auth.register');\n }", "public function contactConfirm()\n {\n return view('contact.contactConfirm');\n }", "public function admin_delete(){\n \n // Load the group in question\n $group = $this->Group->find('first', array('conditions' => array('Group.id' => $this->params->id)));\n if($group){\n // Delete the group\n $delete_attempt = $this->Group->delete($this->params->id);\n if ($delete_attempt){\n $this->Session->setFlash('Group \\''.$group['Group']['name'].'\\' successfully deleted.', 'default', array('class' => 'alert alert-success'));\n CakeLog::write('admin', '[success] Group \\''.$group['Group']['name'].'\\' deleted.');\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n } else {\n $this->Session->setFlash('There was an error deleting the \\''.$group['Group']['name'].'\\' group.', 'default', array('class' => 'alert alert-error'));\n CakeLog::write('admin', '[error] Group \\''.$group['Group']['name'].'\\' could not be deleted.');\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n }\n } else {\n $this->Session->setFlash('That group could not be found.', 'default', array('class' => 'alert alert-error'));\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n }\n }", "public function confirmationEmail()\n {\n $email = new Email;\n $email->sendEmail('submitted', 'applicant', Auth::user()->email);\n }", "public function getGroupAdd(){\n return view('Newsletter.Views.administrator.group-add');\n }", "public function createAction()\n\t{\n\t\n\t\tif(\\Input::server('REQUEST_METHOD') == 'POST')\n\t\t{\n\t\t\t$rules = array(\n\t\t\t\t'group' => 'required|unique:groups,group',\n\t\t\t);\n\t\t\t$input = \\Input::all();\n\t\t\t$validator = \\Validator::make($input, $rules);\n\n\t\t\tif( $validator->passes() )\n\t\t\t{\n\t\t\t\t$group = new \\Group;\n\t\t\t\t$group->group = $input['group'];\n\n\t\t\t\tif($group->save())\n\t\t\t\t{\n\t\t\t\t\treturn \\Redirect::to('admin/members/groups')\n\t\t\t\t\t\t->with('success_msg', 'Successfully saved');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \\Redirect::to('admin/members/group/create')\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->with('errors', $validator->getMessageBag()->toArray());\n\t\t\t}\n\t\t}\n\n\t\treturn \\View::make('user::group.create');\n\t\t\n\t}", "function confirmation() {\n\t\n\n\n}", "public function getRegistrationConfirmation($hash)\n {\n //get data\n $hideBack = true;\n\n $registrationRequest = $this->requestRepository->getRegistrationByHash($hash);\n if (!$registrationRequest) {\n return $this->redirect\n ->route('auth.get_registration');\n }\n //output\n return view('auth.registration_confirmation', [\n 'hideBack',\n 'hash'\n ]);\n }", "public function confirm()\n {\n $task = $this->getTask();\n $link = $this->getExternalTaskLink($task);\n\n $this->response->html($this->template->render('task_external_link/remove', array(\n 'link' => $link,\n 'task' => $task,\n )));\n }", "public function actionSuccess()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\t\t\n\t\t$email = Yii::app()->request->getParam('email');\n\t\t$this->render('success', array('email'=>$email,'is_found'=>true));\n\t}", "function _displayFormConfirm($err='')\r\n\t{\r\n\t\t$dt = $this->_dt;\r\n\r\n\t\t$utpage = new utPage('draws');\r\n\t\t$content =& $utpage->getPage();\r\n\t\t$form =& $content->addForm('tDelDraws', 'draws', KID_DELETE);\r\n\r\n\t\t// Initialize the field\r\n\t\t$drawId = kform::getData();\r\n\t\tif ($err =='' && count($drawId))\r\n\t\t{\r\n\t\t\t$form->addHide(\"drawId\", $drawId);\r\n\t\t\t$form->addMsg('msgConfirmDel');\r\n\t\t\t$form->addBtn('btnDelete', KAF_SUBMIT);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif($err!='') $form->addWng($err);\r\n\t\t\telse $form->addWng('msgNeedDraws');\r\n\t\t}\r\n\t\t$form->addBtn('btnCancel');\r\n\t\t$elts = array('btnDelete', 'btnCancel');\r\n\t\t$form->addBlock('blkBtn', $elts);\r\n\r\n\t\t//Display the page\r\n\t\t$utpage->display();\r\n\t\texit;\r\n\t}", "protected function confirmTemplateSwitch()\n\t{\n\t\tinclude_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';\n\t\t$this->ctrl->setReturn($this,'perm');\n\t\t$this->ctrl->setCmdClass('ildidactictemplategui');\n\t\t$dtpl_gui = new ilDidacticTemplateGUI($this->gui_obj);\n\t\t$this->ctrl->forwardCommand($dtpl_gui,'confirmTemplateSwitch');\n\t}", "public function showForm()\n {\n return view('auth.register-step2');\n }", "function class_group_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'class_group_add';\n $page_data['page_title'] = get_phrase('add_class_group');\n $this->load->view('backend/index', $page_data);\n }", "public function removeConfirm()\n {\n $project = $this->getProject();\n $recovery_plan_id = $this->request->getIntegerParam('recovery_plan_id', 0);\n\n\n $this->response->html($this->template->render('status:recoveryPlanDetail/remove', array(\n 'title' => t('Remove recovery plan'),\n 'project_id' => $project['id'],\n 'values' => array('id' => $recovery_plan_id)\n )));\n }" ]
[ "0.6968954", "0.6951138", "0.6525918", "0.6508716", "0.641738", "0.6292342", "0.62908393", "0.62744606", "0.6181828", "0.6164168", "0.6156973", "0.61371714", "0.61126643", "0.60993075", "0.606455", "0.6057234", "0.600011", "0.5994623", "0.598585", "0.59798807", "0.5962121", "0.5958215", "0.59528196", "0.5946414", "0.59418714", "0.5941659", "0.5931368", "0.5930651", "0.5917015", "0.59121525", "0.5904482", "0.5896747", "0.5874344", "0.5871246", "0.5871218", "0.58545214", "0.5848505", "0.584597", "0.5842964", "0.5840301", "0.58344066", "0.5828236", "0.58267254", "0.5812088", "0.58024305", "0.5791204", "0.5784417", "0.5782119", "0.5778864", "0.5765967", "0.5744395", "0.57441175", "0.57405037", "0.57397544", "0.5738448", "0.57330394", "0.57320315", "0.57310414", "0.57220775", "0.57220775", "0.57168883", "0.57124966", "0.57100475", "0.5707144", "0.57066154", "0.570393", "0.5699769", "0.5690908", "0.5690741", "0.56769735", "0.56691563", "0.5661313", "0.5661271", "0.5646846", "0.5642395", "0.56404424", "0.5634868", "0.5633268", "0.5626366", "0.56259495", "0.56233054", "0.5621446", "0.5613653", "0.5599852", "0.5593112", "0.5589326", "0.5584428", "0.5581452", "0.558053", "0.5575796", "0.55660385", "0.5561321", "0.5561292", "0.556063", "0.5552235", "0.5547603", "0.5540879", "0.5537366", "0.553499", "0.553187" ]
0.70351744
0
Fetches rotators and returns a paginator array
public function fetchRotators($params = NULL) { $select = $this->registry->db->select(); $select->from(array('r' => 'rotators')); $select->order('r.rot_name ASC'); if(isset($params['page']) && is_numeric($params['page'])) : $pagenum = $params['page']; else : $pagenum = 1; endif; if(isset($params['items']) && is_numeric($params['items'])) : $items = $params['items']; else : $items = 15; endif; if(isset($params['range']) && is_numeric($params['range'])) : $range = $params['range']; else : $range = 5; endif; $paginator = Zend_Paginator::factory($select); $paginator->setCurrentPageNumber($pagenum); $paginator->setItemCountPerPage($items); $paginator->setPageRange($range); return $paginator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get()\n {\n $total_pages = ceil($this->total / $this->per_page);\n $begin = $this->page - $this->side_pages_n;\n $end = $this->page + $this->side_pages_n;\n $pagination = [];\n\n if ($begin <= 0) {\n $begin = 1;\n }\n\n for ($i = $begin; $i <= $end && $i <= $total_pages; $i++) {\n $pagination[] = $this->getNewPage($i);\n }\n\n if ($this->show_ends) {\n $this->addEnds($pagination);\n }\n\n return $pagination;\n }", "public function getPaginated();", "public function getToPaginator();", "public function fetchSlides($params = NULL)\n\t{\n \t$select = $this->registry->db->select();\n \t$select->from(array('s' => 'rotators_slides'));\n \t\n \tif(isset($params['rotator'])) :\n \t $select->where('s.rots_rotator = ?', $params['rotator']);\n \tendif;\n \t\n \t$select->order('s.rots_title ASC');\n \t\n \tif(isset($params['page']) && is_numeric($params['page'])) :\n \t\t$pagenum = $params['page'];\n \telse :\n \t\t$pagenum = 1;\n \tendif;\n \t\n \tif(isset($params['items']) && is_numeric($params['items'])) :\n \t\t$items = $params['items'];\n \telse :\n \t\t$items = 15;\n \tendif;\n \t\n \tif(isset($params['range']) && is_numeric($params['range'])) :\n \t\t$range = $params['range'];\n \telse :\n \t\t$range = 5;\n \tendif;\n \t\n \t$paginator = Zend_Paginator::factory($select);\n\t\t$paginator->setCurrentPageNumber($pagenum);\n\t\t$paginator->setItemCountPerPage($items);\n\t\t$paginator->setPageRange($range);\n\t \n \treturn $paginator;\n\t}", "public function get(): array\n\t{\n\t\t$roundedNumber = $this->count();\n\t\t$page = 1;\n\t\t\n\t\t$arrayPage = array();\n\t\t\n\t\tfor ($i = 0; $i < $roundedNumber; $i++) {\n\t\t\t$arrayPage[] = $page;\n\t\t\t$page++;\n\t\t}\n\t\treturn $arrayPage;\n\t}", "public function getPages();", "function getPages() {\n\t\t$sql = 'SELECT * FROM page WHERE vis = 1 ORDER BY psn';\n\t\t$qrh = mysqli_query($this->lnk, $sql);\n\t\t$i = 1;\n\t\t\n\t\t// iterate and extract data to be passed to view\n\t\twhile ( $res = mysqli_fetch_array($qrh)) {\n\t\t\t$results[] = array('id' => $res['id'],'name' => $res['nam']);\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\treturn $results;\n\t\t\n\t}", "public function test_cached_paginators_can_be_retrieved(): void\n {\n $page = 1;\n $perPage = 15;\n\n $expected = new Paginator(new Collection([\n new User(['id' => 1, 'name' => 'Robbie']),\n new User(['id' => 2, 'name' => 'Michael']),\n ]), $perPage, $page);\n\n $key = \"paginator:users:$perPage:$page\";\n\n $this->adapter->withName(User::class)\n ->onPage($page)\n ->showing($perPage)\n ->remember(10, function () use ($expected): Paginator {\n return $expected;\n });\n\n $this->assertTrue($this->adapter->has($this->hash($key)));\n\n $actual = $this->adapter->get($this->hash($key));\n $this->assertInstanceOf(Paginator::class, $actual);\n $this->assertEquals(2, $actual->count());\n }", "public static function obtenerPaginate()\n {\n $rs = self::builder();\n return $rs->paginate(self::$paginate) ?? [];\n }", "public function getItems()\n {\n $arrLinks = array();\n\n $intNumberOfLinks = floor($this->intNumberOfLinks / 2);\n $intFirstOffset = ($this->intPage - $intNumberOfLinks - 1);\n\n if ($intFirstOffset > 0) {\n $intFirstOffset = 0;\n }\n\n $intLastOffset = ($this->intPage + $intNumberOfLinks - $this->intTotalPages);\n\n if ($intLastOffset < 0) {\n $intLastOffset = 0;\n }\n\n $intFirstLink = ($this->intPage - $intNumberOfLinks - $intLastOffset);\n\n if ($intFirstLink < 1) {\n $intFirstLink = 1;\n }\n\n $intLastLink = ($this->intPage + $intNumberOfLinks - $intFirstOffset);\n\n if ($intLastLink > $this->intTotalPages) {\n $intLastLink = $this->intTotalPages;\n }\n\n for ($i = $intFirstLink; $i <= $intLastLink; $i++) {\n $arrLinks[] = (object) array(\n 'page' => $i,\n 'current' => $i == $this->intPage,\n 'href' => $this->getItemLink($i)\n );\n }\n\n return $arrLinks;\n }", "public function getPages() {}", "public function get_pagination() {\n\t\treturn $this->pagination();\n\t}", "public function getPaginator()\n {\n return $this->wallpaperMapper->getPaginator();\n }", "public function getApartados(){\n\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraApartados\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM apartados \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM apartados LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}", "public function getPaginate(){ }", "public function getRolePagination()\n {\n try{\n $roles=\\Config::get('app.pagi');\n return Role::paginate($roles);\n //return $this->roles->paginate($roles);\n }\n catch (\\Exception $exception)\n {\n return null;\n }\n }", "public function getPagesLinks()\r\n\t{\r\n\t\t$app = JFactory::getApplication();\r\n\t\t// Yjsg instance\r\n\t\t$yjsg = Yjsg::getInstance(); \r\n\t\t\r\n\t\t// Build the page navigation list.\r\n\t\t$data = $this->_buildDataObject();\r\n\r\n\t\t$list = array();\r\n\t\t$list['prefix'] = $this->prefix;\r\n\r\n\t\t$itemOverride = false;\r\n\t\t$listOverride = false;\r\n\r\n\t\t$chromePath \t= JPATH_THEMES . '/' . $app->getTemplate() . '/html/pagination.php';\r\n\t\t//yjsg start\r\n\t\tif (!file_exists($chromePath)){\r\n\t\t\tif($yjsg->preplugin()){\r\n\t\t\t\r\n\t\t\t\t$chromePath = YJSGPATH . 'legacy' . YJDS . 'html' . YJDS . 'pagination.php';\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\t$chromePath = YJSGPATH . 'includes' . YJDS . 'html' . YJDS . 'pagination.php';\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t//yjsg end\r\n\t\tif (file_exists($chromePath))\r\n\t\t{\r\n\t\t\tinclude_once $chromePath;\r\n\t\t\tif (function_exists('pagination_item_active') && function_exists('pagination_item_inactive'))\r\n\t\t\t{\r\n\t\t\t\t$itemOverride = true;\r\n\t\t\t}\r\n\t\t\tif (function_exists('pagination_list_render'))\r\n\t\t\t{\r\n\t\t\t\t$listOverride = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Build the select list\r\n\t\tif ($data->all->base !== null)\r\n\t\t{\r\n\t\t\t$list['all']['active'] = true;\r\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_active($data->all) : $this->_item_active($data->all);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['all']['active'] = false;\r\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);\r\n\t\t}\r\n\r\n\t\tif ($data->start->base !== null)\r\n\t\t{\r\n\t\t\t$list['start']['active'] = true;\r\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_active($data->start) : $this->_item_active($data->start);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['start']['active'] = false;\r\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);\r\n\t\t}\r\n\t\tif ($data->previous->base !== null)\r\n\t\t{\r\n\t\t\t$list['previous']['active'] = true;\r\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_active($data->previous) : $this->_item_active($data->previous);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['previous']['active'] = false;\r\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);\r\n\t\t}\r\n\r\n\t\t$list['pages'] = array(); //make sure it exists\r\n\t\tforeach ($data->pages as $i => $page)\r\n\t\t{\r\n\t\t\tif ($page->base !== null)\r\n\t\t\t{\r\n\t\t\t\t$list['pages'][$i]['active'] = true;\r\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_active($page) : $this->_item_active($page);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$list['pages'][$i]['active'] = false;\r\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_inactive($page) : $this->_item_inactive($page);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($data->next->base !== null)\r\n\t\t{\r\n\t\t\t$list['next']['active'] = true;\r\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_active($data->next) : $this->_item_active($data->next);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['next']['active'] = false;\r\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);\r\n\t\t}\r\n\r\n\t\tif ($data->end->base !== null)\r\n\t\t{\r\n\t\t\t$list['end']['active'] = true;\r\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_active($data->end) : $this->_item_active($data->end);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$list['end']['active'] = false;\r\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);\r\n\t\t}\r\n\r\n\t\tif ($this->total > $this->limit)\r\n\t\t{\r\n\t\t\treturn ($listOverride) ? pagination_list_render($list) : $this->_list_render($list);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}", "public function getIterator()\n {\n return new ArrayIterator($this->pages);\n }", "public function paginate()\n {\n return $this->operator->paginate($this->page, $this->limit);\n }", "public function index()\n {\n return $this->paginator($this->collator());\n }", "public function getPaginator()\r\n {\r\n return $this->photoMapper->getPaginator();\r\n }", "public function getPaginatorAdapter(array $params)\n {\n }", "public function get(): array\n {\n return array_filter($this->resources, function ($resourceNumber) {\n return $resourceNumber >= $this->offset && $resourceNumber < ($this->offset + $this->limit);\n }, ARRAY_FILTER_USE_KEY);\n }", "public function getCurrentPageResults(): array;", "public function paginator()\n {\n return new Tools\\Paginator($this);\n }", "function getPagosanteriores() {\n $where = \" WHERE 1\";\n $array = \"\";\n\n $columns = \"`Clave_catalogo`, `Nombre`, `Email`, `Cantidad`, `Fecha_pagada`, `Id_pago` \";\n $response = $this->db->select3($columns, 'catalogo_pagos', $where, $array);\n return $response;\n }", "protected function buildPagination() {}", "protected function buildPagination() {}", "public function getPaginationDataSource();", "private function getPaginator()\n {\n return $this->_paginator;\n }", "public function can_return_a_collection_of_paginated_products()\n {\n $product1 = $this->create('Product');\n $product2 = $this->create('Product');\n $product3 = $this->create('Product');\n\n $response = $this->actingAs($this->create('User', [], false), 'api')->json('GET', '/api/products');\n\n $response->assertStatus(200)\n ->assertJsonStructure([\n 'data' => [\n '*' => ['id','name','slug','price','created_at']\n ],\n\n 'links' => ['first', 'last', 'prev', 'next'],\n 'meta' => [\n 'current_page', 'last_page', 'from', 'to', 'path', 'per_page', 'total'\n ]\n ]);\n }", "public function paginar_get(){\n\n $this->load->helper('paginacion');\n\n $pagina = $cliente_id = $this->uri->segment(3); // parametro #3\n $por_pagina = $cliente_id = $this->uri->segment(4); // parametro #4\n\n $campos = array('id','nombre','telefono1'); // campos de la tabla\n\n $respuesta = paginar_todo( 'clientes', $pagina, $por_pagina, $campos ); // helper\n $this->response( $respuesta ); // imprime el resultado de lo que se obtuvo\n }", "public function pagination() {\n\t\tglobal $post, $page, $numpages, $multipage;\n\t\t$post = $this;\n\t\t$ret = array();\n\t\tif ( $multipage ) {\n\t\t\tfor ( $i = 1; $i <= $numpages; $i++ ) {\n\t\t\t\t$link = self::get_wp_link_page($i);\n\t\t\t\t$data = array('name' => $i, 'title' => $i, 'text' => $i, 'link' => $link);\n\t\t\t\tif ( $i == $page ) {\n\t\t\t\t\t$data['current'] = true;\n\t\t\t\t}\n\t\t\t\t$ret['pages'][] = $data;\n\t\t\t}\n\t\t\t$i = $page - 1;\n\t\t\tif ( $i ) {\n\t\t\t\t$link = self::get_wp_link_page($i);\n\t\t\t\t$ret['prev'] = array('link' => $link);\n\t\t\t}\n\t\t\t$i = $page + 1;\n\t\t\tif ( $i <= $numpages ) {\n\t\t\t\t$link = self::get_wp_link_page($i);\n\t\t\t\t$ret['next'] = array('link' => $link);\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "public function getPaginator($page, $routeGenerator, $params = array()) {\n $db = $this->app['ar'];\n $arrResult = array();\n //----------------------\n // Create Paginator\n $adapter = $this->createPaginatorAdapter('\\Pagerfanta\\ArAdapter', $db->getClass('post'), $params);\n $pagerfanta = $this->createPaginator($adapter);\n $pagerfanta->setCurrentPage($page);\n $arrResult['html'] = $this->renderPaginator($pagerfanta, $routeGenerator);\n $arrResult['data'] = $pagerfanta->getCurrentPageResults();\n return $arrResult;\n }", "function pagination(){}", "public function getPagination()\n {\n return $this->get(self::pagination);\n }", "public function readAllCompromissos() {\n $array = ['error' => ''];\n\n $compromissos = Compromisso::simplePaginate(2);\n\n $array['list'] = $compromissos->items();\n $array['current_page'] = $compromissos->currentPage();\n\n return $array;\n }", "private function loadPages()\n {\n $webClient = new WebClient();\n $allPages = [];\n $choppedUrls = array_chunk($this->newUrls, self::PAGES_PER_TIME);\n foreach ($choppedUrls as $iteration => $urlsChunk) {\n $currentPages = $webClient->multiGet($this->newUrls);\n $allPages = array_merge($allPages, $currentPages);\n\n $urlsChunkCount = count($urlsChunk);\n $pagesLoaded = $urlsChunkCount < self::PAGES_PER_TIME ?\n $urlsChunkCount\n : ($iteration + 1) * self::PAGES_PER_TIME;\n $this->outputMessage(sprintf('... loaded %s pages', $pagesLoaded));\n }\n\n return $allPages;\n }", "protected function paginator($queryBuilder)\n {\n // Paginator\n $adapter = new DoctrineORMAdapter($queryBuilder);\n $pagerfanta = new Pagerfanta($adapter);\n $currentPage = $this->getRequest()->get('page', 1);\n $pagerfanta->setCurrentPage($currentPage);\n $entities = $pagerfanta->getCurrentPageResults();\n \n // Paginator - route generator\n $me = $this;\n $routeGenerator = function($page) use ($me)\n {\n return $me->generateUrl('remitovolvo', array('page' => $page));\n };\n \n // Paginator - view\n $translator = $this->get('translator');\n $view = new TwitterBootstrapView();\n $pagerHtml = $view->render($pagerfanta, $routeGenerator, array(\n 'proximity' => 3,\n 'prev_message' => $translator->trans('views.index.pagprev', array(), 'JordiLlonchCrudGeneratorBundle'),\n 'next_message' => $translator->trans('views.index.pagnext', array(), 'JordiLlonchCrudGeneratorBundle'),\n ));\n \n return array($entities, $pagerHtml);\n }", "public function paginator()\r\n\t{\r\n\t\treturn $this;\r\n\t}", "public function get_all_pagination($perpage, $offset ) \n {\n\n $result = $this->db->select()->limit($perpage, $offset)->get('sys_menu');\n\n if ($result->num_rows() > 0) \n {\n return $result->result_array();\n } \n else \n {\n return array();\n }\n }", "public function consultaPaginas(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT * FROM tbpaginas order by idpaginas\";\n $sql = $this->conexao->query($sql);\n $dados = array();\n\n while ($row = $sql->fetch_assoc()) {\n\n $dado = array();\n $dado['idpaginas'] = $row['idpaginas'];\n $dado['paginas'] = $row['nome_paginas'];\n $dado['url'] = $row['paginas'];\n $dados[] = $dado;\n }\n\n return $dados;\n\n }", "public function getPerPage();", "public function nextPage(): array\n {\n return $this->next()->getPage();\n }", "public function get_pages($args = [])\n {\n global $db, $system;\n /* initialize arguments */\n $user_id = !isset($args['user_id']) ? null : $args['user_id'];\n $offset = !isset($args['offset']) ? 0 : $args['offset'];\n $promoted = !isset($args['promoted']) ? false : true;\n $suggested = !isset($args['suggested']) ? false : true;\n $random = !isset($args['random']) ? false : true;\n $boosted = !isset($args['boosted']) ? false : true;\n $managed = !isset($args['managed']) ? false : true;\n $results = !isset($args['results']) ? $system['max_results_even'] : $args['results'];\n /* initialize vars */\n $pages = [];\n $offset *= $results;\n /* get suggested pages */\n if ($promoted) {\n $get_pages = $db->query(sprintf(\"SELECT * FROM pages WHERE page_boosted = '1' ORDER BY RAND() LIMIT %s\", $system['max_results'])) or _error(\"SQL_ERROR_THROWEN\");\n } elseif ($suggested) {\n $pages_ids = $this->get_pages_ids();\n $random_statement = ($random) ? \"ORDER BY RAND()\" : \"\";\n if (count($pages_ids) > 0) {\n /* make a list from liked pages */\n $pages_list = implode(',', $pages_ids);\n $get_pages = $db->query(sprintf(\"SELECT * FROM pages WHERE page_id NOT IN (%s) \" . $random_statement . \" LIMIT %s, %s\", $pages_list, secure($offset, 'int', false), secure($results, 'int', false))) or _error(\"SQL_ERROR_THROWEN\");\n } else {\n $get_pages = $db->query(sprintf(\"SELECT * FROM pages \" . $random_statement . \" LIMIT %s, %s\", secure($offset, 'int', false), secure($results, 'int', false))) or _error(\"SQL_ERROR_THROWEN\");\n }\n /* get the \"viewer\" boosted pages */\n } elseif ($boosted) {\n $get_pages = $db->query(sprintf(\"SELECT * FROM pages WHERE page_boosted = '1' AND page_boosted_by = %s LIMIT %s, %s\", secure($this->_data['user_id'], 'int'), secure($offset, 'int', false), secure($results, 'int', false))) or _error(\"SQL_ERROR_THROWEN\");\n /* get the \"taget\" all pages who admin */\n } elseif ($managed) {\n $get_pages = $db->query(sprintf(\"SELECT pages.* FROM pages_admins INNER JOIN pages ON pages_admins.page_id = pages.page_id WHERE pages_admins.user_id = %s ORDER BY page_id DESC\", secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n /* get the \"viewer\" pages who admin */\n } elseif ($user_id == null) {\n $get_pages = $db->query(sprintf(\"SELECT pages.* FROM pages_admins INNER JOIN pages ON pages_admins.page_id = pages.page_id WHERE pages_admins.user_id = %s ORDER BY page_id DESC LIMIT %s, %s\", secure($this->_data['user_id'], 'int'), secure($offset, 'int', false), secure($results, 'int', false))) or _error(\"SQL_ERROR_THROWEN\");\n /* get the \"target\" liked pages*/\n } else {\n /* get the target user's privacy */\n $get_privacy = $db->query(sprintf(\"SELECT user_privacy_pages FROM users WHERE user_id = %s\", secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n $privacy = $get_privacy->fetch_assoc();\n /* check the target user's privacy */\n if (!$this->check_privacy($privacy['user_privacy_pages'], $user_id)) {\n return $pages;\n }\n $get_pages = $db->query(sprintf(\"SELECT pages.* FROM pages INNER JOIN pages_likes ON pages.page_id = pages_likes.page_id WHERE pages_likes.user_id = %s LIMIT %s, %s\", secure($user_id, 'int'), secure($offset, 'int', false), secure($results, 'int', false))) or _error(\"SQL_ERROR_THROWEN\");\n }\n if ($get_pages->num_rows > 0) {\n while ($page = $get_pages->fetch_assoc()) {\n $page['page_picture'] = get_picture($page['page_picture'], 'page');\n /* check if the viewer liked the page */\n $page['i_like'] = $this->check_page_membership($this->_data['user_id'], $page['page_id']);\n $pages[] = $page;\n }\n }\n return $pages;\n }", "public function getPaginate ($p_rowsPerPage, $p_currentPage);", "protected function getPaginationLinks(LengthAwarePaginator $paginator) {\n\t\t\t$links = new Collection();\n\t\t\t\n\t\t\t$selfLink = urldecode($paginator->url($paginator->currentPage()));\n\t\t\t$firstLink = urldecode($paginator->url(1));\n\t\t\t$lastLink = urldecode($paginator->url($paginator->lastPage()));\n\t\t\t$previousLink = urldecode($paginator->url($paginator->currentPage() - 1));\n\t\t\t$nextLink = urldecode($paginator->nextPageUrl());\n\t\t\t\n\t\t\t$links->push(new LinkObject(\"first\", $firstLink));\n\t\t\t$links->push(new LinkObject(\"last\", $lastLink));\n\t\t\t\n\t\t\tif ($previousLink !== $selfLink && $previousLink !== '') {\n\t\t\t\t$links->push(new LinkObject(\"previous\", $previousLink));\n\t\t\t}\n\t\t\tif ($nextLink !== $selfLink || $nextLink !== '') {\n\t\t\t\t$links->push(new LinkObject(\"next\", $nextLink));\n\t\t\t}\n\t\t\treturn $links;\n\t\t}", "public function GetByPaginated($offset, $limit);", "public function getEpaymentsPaginator($params = array())\r\n {\r\n $paginator = Zend_Paginator::factory($this->getEpaymentsSelect($params));\r\n if( !empty($params['page']) )\r\n {\r\n $paginator->setCurrentPageNumber($params['page']);\r\n }\r\n if( !empty($params['limit']) )\r\n {\r\n $paginator->setItemCountPerPage($params['limit']);\r\n } \r\n return $paginator;\r\n }", "public function generatePagination()\n {\n $this->buffer = [];\n\n if ($this->currentPage != 1) {\n $this->generateLeftButton($this->currentPage);\n } else {\n $this->generateLeftButton($this->currentPage, true);\n }\n\n $this->generatePages();\n\n if ($this->currentPage != self::getPages($this->records, $this->recordsInPage)) {\n $this->generateRightButton($this->currentPage);\n } else {\n $this->generateLeftButton($this->currentPage, true);\n }\n }", "abstract protected function getIteratorArray();", "public static function pagination()\n {\n $limit = (int) self::set(\"limit\");\n $offset = (int) self::set(\"offset\");\n\n $limit = Validator::intType()->notEmpty()->positive()->validate($limit)? $limit: false;\n $offset = Validator::intType()->notEmpty()->positive()->validate($offset)? $offset: 0;\n\n $pagination = \"\";\n $pagination .= $limit? \" LIMIT {$limit}\": null;\n $pagination .= ($limit && $offset)? \" OFFSET {$offset}\": null;\n\n return (object) [\n \"limit\" => $limit,\n \"offset\" => $offset,\n \"query\" => $pagination\n ];\n }", "abstract public function preparePagination();", "function getPages() {\r\n\tglobal $S;\r\n\tif (!is_array($S->arbo)) {\r\n\t\trequire_once('../lib/class/class_arbo.php');\r\n\t\t$S =& new ARBO();\r\n\t\t$S->fields = array('id', 'pid', 'type_id', 'titre_fr');\r\n\t\t$S->buildArbo();\r\n\t}\r\n\t$options = array();\r\n\tforeach($S->arbo as $rid=>$tmp) {\r\n\t\t$options[urlencode($S->arbo[$rid]['url'])] = $S->arbo[$rid]['titre_fr'].' (#'.$rid.')';\r\n\t}\r\n\treturn $options;\r\n}", "public function getPages() \n {\n \n $page_array = array();\n \n $start = $this->page_current - ceil(($this->limit / 2));\n $end = $this->page_current + floor(($this->limit / 2));\n\n if($end > $this->num_pages) {\n $start = $this->num_pages - $this->limit;\n $end = $this->num_pages;\n }\n \n if($start < 0) {\n $start = 0;\n $end = $start + $this->limit;\n }\n \n if($end > $this->num_pages) {\n $end = $this->num_pages;\n }\n \n for($i=$start; $i < $end; $i++) {\n $page_number = $i + 1;\n \n $page_array[] = array(\n \"label\" => $page_number,\n \"value\" => $page_number,\n \"url\" => $this->getPageUrl($page_number)\n );\n \n if($page_number == $this->page_current) {\n $page_array[sizeof($page_array) - 1][\"current\"] = true;\n } \n } \n return $page_array;\n }", "function get_pager()\n\t{\n\t\tinclude_once('Pager/Pager.php');\n\t\t$pager_options = array();\n\t\t$pager_options['mode'] = 'Sliding';\n\t\t$pager_options['urlVar'] = 'page';\n\t\t$pager_options['delta'] = 2;\n\t\t$pager_options['perPage'] = (int) $this->rows_per_page;\n\t\t$pager_options['separator'] = '|';\n\t\t$pager_options['prev'] = '&laquo;';\n\t\t$pager_options['next'] = '&raquo;';\n\t\t$pager_options['append'] = false;\n\t\t$pager_options['fileName'] = $this->pager_file_name;\n\t\t\n\t\t$pager_options['totalItems'] = $this->totalItems;\n\t\t\n\t\t$currentPage = common::arg($this->pager_arg_no);\n\t\t//$this->content->debug .= ' currentPage: '.$currentPage .' argno: '.$this->pager_arg_no .' a:'.(int)common::arg(3);\n\t\tif (! isset($currentPage) || ! $currentPage) { $currentPage = 1; }\n\t\tif ($currentPage > ceil($this->totalItems/$this->rows_per_page)) { $currentPage = 1; }\n\t\t\n\t\t$pager_options['currentPage'] = $currentPage;\n\t\t\n\t\t$pager =& Pager::factory($pager_options);\n\t\treturn $pager->links;\n\t}", "public function getPaginator()\n {\n return $this->getMapper()\n ->getPaginator();\n }", "public function getPaginator()\n {\n return $this->getMapper()\n ->getPaginator();\n }", "protected function getce817e8bdc75399a693ba45b876c457a0f7fd422258f7d4eabc553987c2fbd31(): \\Viserio\\Component\\Console\\CommandLoader\\IteratorCommandLoader\n {\n return $this->services[\\Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface::class] = new \\Viserio\\Component\\Console\\CommandLoader\\IteratorCommandLoader(new \\Viserio\\Component\\Container\\RewindableGenerator(function () {\n yield 'route:table' => ($this->services[\\Viserio\\Component\\Routing\\Command\\RouteListCommand::class] ?? $this->get5f34d750a5fcad2449cb7b81f89a57492dc2a795006c02d9b865276ad3291746());\n }, 1));\n }", "function get_objects($offset, $count, $order_property = null)\r\n {\r\n $order_property = $this->get_order_property($order_property);\r\n return $this->get_browser()->retrieve_photo_gallery_publications($this->get_condition(), $order_property, $offset, $count);\r\n }", "function pager($margin=10)\n {\n $path = $_GET;\n $newpath = $PHP_SELF.\"?\";\n foreach($path as $key => $value)\n {\n if($key!=$this->getvar)\n {\n $newpath .= $key.\"=\".$value;\n $newpath .=\"&amp;\";\n }\n }\n $newpath .= $this->getvar;\n\n $linkpaths = array();\n $current = $this->start / $this->length + 1;\n $pages = ceil(($this->rows/$this->length));\n $pagerstart = $current-$margin;\n $pagerstart = ($pagerstart<1)?1:$pagerstart;\n $pagerend = $current+$margin;\n \n $pagerend = ( $pagerend > $pages ) ? ( ceil( ( $this->rows / $this->length ) ) ): $pagerend;\n\n for($i=$pagerstart;$i < ($pagerend+1);$i++)\n {\n $linkpaths[$i] = $newpath.\"=\".($i);\n }\n if($linkpaths[($current+1)]!=null)\n {\n $linkpaths['next']=$linkpaths[($current+1)];\n }\n if($linkpaths[($current-1)]!=null)\n {\n $linkpaths['last']=$linkpaths[($current-1)];\n }\n return $linkpaths;\n }", "public function paginate(): array\n {\n $this->fetchRecords();\n $this->fetchTotalRecordCount();\n $this->setHeaders();\n\n return [\n 'data' => $this->data,\n 'total_records' => $this->totalRecords,\n 'current_page' => $this->parameters->getCurrentPage(),\n 'items_per_page' => $this->parameters->getResultsPerPage(),\n 'last_page' => ceil($this->totalRecords / $this->parameters->getResultsPerPage()),\n 'headers' => $this->headers,\n ];\n }", "public function getPaginator()\n {\n return $this->paginator;\n }", "function getPagesLinks()\n\t{\n\t\tglobal $mainframe;\n\n\t\t$lang =& JFactory::getLanguage();\n\n\t\t// Build the page navigation list\n\t\t$data = $this->_buildDataObject();\n\n\t\t$list = array();\n\n\t\t$itemOverride = false;\n\t\t$listOverride = false;\n\n\t\t$chromePath = JPATH_THEMES.DS.$mainframe->getTemplate().DS.'html'.DS.'pagination.php';\n\t\tif (file_exists($chromePath))\n\t\t{\n\t\t\trequire_once ($chromePath);\n\t\t\tif (function_exists('pagination_item_active') && function_exists('pagination_item_inactive')) {\n\t\t\t\t$itemOverride = true;\n\t\t\t}\n\t\t\tif (function_exists('pagination_list_render')) {\n\t\t\t\t$listOverride = true;\n\t\t\t}\n\t\t}\n\n\t\t// Build the select list\n\t\tif ($data->all->base !== null) {\n\t\t\t$list['all']['active'] = true;\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_active($data->all) : $this->_item_active($data->all);\n\t\t} else {\n\t\t\t$list['all']['active'] = false;\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);\n\t\t}\n\n\t\tif ($data->start->base !== null) {\n\t\t\t$list['start']['active'] = true;\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_active($data->start) : $this->_item_active($data->start);\n\t\t} else {\n\t\t\t$list['start']['active'] = false;\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);\n\t\t}\n\t\tif ($data->previous->base !== null) {\n\t\t\t$list['previous']['active'] = true;\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_active($data->previous) : $this->_item_active($data->previous);\n\t\t} else {\n\t\t\t$list['previous']['active'] = false;\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);\n\t\t}\n\n\t\t$list['pages'] = array(); //make sure it exists\n\t\tforeach ($data->pages as $i => $page)\n\t\t{\n\t\t\tif ($page->base !== null) {\n\t\t\t\t$list['pages'][$i]['active'] = true;\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_active($page) : $this->_item_active($page);\n\t\t\t} else {\n\t\t\t\t$list['pages'][$i]['active'] = false;\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_inactive($page) : $this->_item_inactive($page);\n\t\t\t}\n\t\t}\n\n\t\tif ($data->next->base !== null) {\n\t\t\t$list['next']['active'] = true;\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_active($data->next) : $this->_item_active($data->next);\n\t\t} else {\n\t\t\t$list['next']['active'] = false;\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);\n\t\t}\n\t\tif ($data->end->base !== null) {\n\t\t\t$list['end']['active'] = true;\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_active($data->end) : $this->_item_active($data->end);\n\t\t} else {\n\t\t\t$list['end']['active'] = false;\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);\n\t\t}\n\n\t\tif($this->total > $this->limit){\n\t\t\treturn ($listOverride) ? pagination_list_render($list) : $this->_list_render($list);\n\t\t}\n\t\telse{\n\t\t\treturn '';\n\t\t}\n\t}", "public static function paginado_usuario(){\n\t\t $page = 1; //inicializamos la variable $page a 1 por default\n\t\t if(array_key_exists('pg', $_GET)){\n\t\t $page = $_GET['pg']; //si el valor pg existe en nuestra url, significa que estamos en una pagina en especifico.\n\t\t }\n\t\t //ahora que tenemos en que pagina estamos obtengamos los resultados:\n\t\t // a) el numero de registros en la tabla\n\t\t $mysqli = new mysqli(\"localhost\",\"root\",\"slam2018\",\"corgran\");\n\t\t if ($mysqli->connect_errno) {\n\t\t\t\tprintf(\"Connect failed: %s\\n\", $mysqli->connect_error);\n\t\t\t\texit();\n\t\t\t}\n\n\n\t\t $conteo_query = $mysqli->query(\"SELECT COUNT(*) as conteo FROM usuarios\");\n\t\t $conteo = \"\";\n\t\t if($conteo_query){\n\t\t \twhile($obj = $conteo_query->fetch_object()){ \n\t\t \t \t$conteo =$obj->conteo; \n\t\t \t}\n\t\t }\n\t\t $conteo_query->close(); \n\t\t unset($obj); \n \t\t\n\t\t //ahora dividimos el conteo por el numero de registros que queremos por pagina.\n\t\t $max_num_paginas = intval($conteo/10); //en esto caso 10\n\t\t\t\n\t\t // ahora obtenemos el segmento paginado que corresponde a esta pagina\n\t\t $segmento = $mysqli->query(\"SELECT * FROM usuarios LIMIT \".(($page-1)*10).\", 10 \");\n $resultado=[];\n\t\t //ya tenemos el segmento, ahora le damos output.\n\t\t if($segmento){\n\t\t\t // echo '<table>';\n\t\t\t while($obj2 = $segmento->fetch_object())\n\t\t\t {\n\t\t\t \t$obj_usu = new usuario($obj2->id_usuario,$obj2->tipo_usu,$obj2->nombre,$obj2->clave);\n $resultado[]=$obj_usu;\n\t\t\t /* echo '<tr>\n\t\t\t <td>'.$obj2->id_usuario.'</td>\n\t\t\t <td>'.$obj2->tipo_usu.'</td>\n\t\t\t <td>'.$obj2->nombre.'</td>\n\t\t\t </tr>'; \n\t\t\t */ }\n\t\t\t // echo '</table><br/><br/>';\n\t\t\t}\n\t\n\t\t //ahora viene la parte importante, que es el paginado\n\t\t //recordemos que $max_num_paginas fue previamente calculado.\n\t\t for($i=0; $i<$max_num_paginas;$i++){\n\n\t\t echo '<a href=\"index.php?pg='.($i+1).'\">'.($i+1).'</a> | ';\n\t\t \n\t\t } \n\t\t echo '<div>-------------------------- PAginacion------------------------------------------------</div>'; \n return $resultado; \n \n }", "public function meCourses()\n {\n return Course::where('user_id', Auth::user()->id)->simplePaginate(10);\n }", "public function getPages()\n {\n list($page_id, $scope_pages, $scope_page_type) = array(\n $this['page_id'],\n $this['scope']['pages'],\n $this['scope']['page_type']\n );\n\n $result_pages = array();\n\n if ($scope_pages == 'this') {\n /**\n * Only current page\n */\n $result_pages[] = $page_id;\n } elseif (in_array($scope_pages, array('descendants', 'children'))) {\n /**\n * All descendants\n */\n $finder = fx::data('content')->descendantsOf($page_id);\n if ($scope_page_type) {\n $finder->where('type', $scope_page_type);\n }\n $result_pages = array_merge($result_pages, $finder->all()->getValues('id'));\n /**\n * With self page\n */\n if ($scope_pages == 'descendants') {\n $result_pages[] = $page_id;\n }\n }\n return array_unique($result_pages);\n }", "protected function paginator($queryBuilder)\n {\n // Paginator\n $adapter = new DoctrineORMAdapter($queryBuilder);\n $pagerfanta = new Pagerfanta($adapter);\n $currentPage = $this->getRequest()->get('page', 1);\n $pagerfanta->setCurrentPage($currentPage);\n $entities = $pagerfanta->getCurrentPageResults();\n\n // Paginator - route generator\n $me = $this;\n $routeGenerator = function($page) use ($me)\n {\n return $me->generateUrl('admin_obras', array('page' => $page));\n };\n\n // Paginator - view\n $translator = $this->get('translator');\n $view = new TwitterBootstrapView();\n $pagerHtml = $view->render($pagerfanta, $routeGenerator, array(\n 'proximity' => 3,\n 'prev_message' => $translator->trans('views.index.pagprev', array(), 'JordiLlonchCrudGeneratorBundle'),\n 'next_message' => $translator->trans('views.index.pagnext', array(), 'JordiLlonchCrudGeneratorBundle'),\n ));\n\n return array($entities, $pagerHtml);\n }", "protected function paginator($queryBuilder)\n {\n // Paginator\n $adapter = new DoctrineORMAdapter($queryBuilder);\n $pagerfanta = new Pagerfanta($adapter);\n $currentPage = $this->getRequest()->get('page', 1);\n $pagerfanta->setCurrentPage($currentPage);\n $entities = $pagerfanta->getCurrentPageResults();\n\n // Paginator - route generator\n $me = $this;\n $routeGenerator = function($page) use ($me)\n {\n return $me->generateUrl('chofer', array('page' => $page));\n };\n\n // Paginator - view\n $translator = $this->get('translator');\n $view = new TwitterBootstrapViewCustom();\n $pagerHtml = $view->render($pagerfanta, $routeGenerator, array(\n 'proximity' => 3,\n 'prev_message' => $translator->trans('views.index.pagprev', array(), 'JordiLlonchCrudGeneratorBundle'),\n 'next_message' => $translator->trans('views.index.pagnext', array(), 'JordiLlonchCrudGeneratorBundle'),\n ));\n\n return array($entities, $pagerHtml);\n }", "function get_all_gallery(){\n global $conn, $start_pos, $items_per_page ;\n\n pagination();\n $sql = \"SELECT * FROM gallery LIMIT $start_pos, $items_per_page\";\n\n $result = mysqli_query($conn, $sql);\n\n $galleries = [];\n // $galleries = array();\n\n if(mysqli_num_rows($result)> 0){\n\n while($row = mysqli_fetch_assoc($result)){\n array_push($galleries, $row);\n }\n return $galleries;\n } else {\n return false;\n }\n}", "public function fetchAll()\n {\n return Accessory::paginate(25);\n }", "public function getPaginator()\n\t{\n\t\treturn $this->paginator;\n\t}", "public function setPaginationLinks(Paginator $paginator);", "public function paginate()\n {\n }", "protected function paginator($query, Request $request)\n { \n // Paginator\n $adapter = new DoctrineORMAdapter($query);\n $pagerfanta = new Pagerfanta($adapter);\n $pagerfanta->setMaxPerPage($request->get('pcg_show' , 10));\n\n try {\n $pagerfanta->setCurrentPage($request->get('pcg_page', 1));\n } catch (\\Pagerfanta\\Exception\\OutOfRangeCurrentPageException $ex) {\n $pagerfanta->setCurrentPage(1);\n }\n \n $entities = $pagerfanta->getCurrentPageResults();\n\n // Paginator - route generator\n $me = $this;\n $routeGenerator = function($page) use ($me, $request)\n {\n $requestParams = $request->query->all();\n $requestParams['pcg_page'] = $page;\n return $me->generateUrl('reimpresion', $requestParams);\n };\n\n // Paginator - view\n $view = new TwitterBootstrap3View();\n $pagerHtml = $view->render($pagerfanta, $routeGenerator, array(\n 'proximity' => 3,\n 'prev_message' => 'anterior',\n 'next_message' => 'siguiente',\n ));\n\n return array($entities, $pagerHtml);\n }", "protected function paginator($queryBuilder)\n {\n // Paginator\n $adapter = new DoctrineORMAdapter($queryBuilder);\n $pagerfanta = new Pagerfanta($adapter);\n $currentPage = $this->getRequest()->get('page', 1);\n $pagerfanta->setCurrentPage($currentPage);\n $entities = $pagerfanta->getCurrentPageResults();\n\n // Paginator - route generator\n $me = $this;\n $routeGenerator = function($page) use ($me)\n {\n return $me->generateUrl('product_admin', array('page' => $page));\n };\n\n // Paginator - view\n $translator = $this->get('translator');\n $view = new TwitterBootstrapView();\n $pagerHtml = $view->render($pagerfanta, $routeGenerator, array(\n 'proximity' => 3,\n 'prev_message' => $translator->trans('views.index.pagprev', array(), 'JordiLlonchCrudGeneratorBundle'),\n 'next_message' => $translator->trans('views.index.pagnext', array(), 'JordiLlonchCrudGeneratorBundle'),\n ));\n\n return array($entities, $pagerHtml);\n }", "final public function getPages(): array\n {\n return $this->pages;\n }", "function get_objects($offset, $count, $order_property = null)\r\n {\r\n $order_property = $this->get_order_property($order_property);\r\n \r\n return $this->get_browser()->retrieve_profile_publications($this->get_condition(), $order_property, $offset, $count);\r\n }", "public function getPageNumbers();", "public function paginate($params = [])\n {\n return (new Paginator($this->album))->with('artist')->orderBy('release_date')->paginate($params);\n }", "public static function get_pagination( $prefs = array() ) {\n\t\treturn Pagination::get_pagination($prefs);\n\t}", "public function paging() {\n\t\t$pages = ceil($this->count('all') / $this->_page_length);\n\t\t$response = array('pages' => $pages, 'page' => $this->_on_page,'length' => $this->_page_length,'items' => $this->count('all'));\n\t\treturn (object) $response;\t\t\n\t}", "function fetchAllPages() {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT id, page, private FROM pages ORDER BY id DESC\");\n\t$pages = $query->results();\n\t//return $pages;\n\n\tif (isset($row)){\n\t\treturn ($row);\n\t}else{\n\t\treturn $pages;\n\t}\n}", "protected function buildPagination()\n {\n $this->calculateDisplayRange();\n $pages = [];\n for ($i = $this->displayRangeStart; $i <= $this->displayRangeEnd; $i++) {\n $pages[] = [\n 'number' => $i,\n 'offset' => ($i - 1) * $this->itemsPerPage,\n 'isCurrent' => $i === $this->currentPage\n ];\n }\n $pagination = [\n 'linkConfiguration' => $this->linkConfiguration,\n 'pages' => $pages,\n 'current' => $this->currentPage,\n 'numberOfPages' => $this->numberOfPages,\n 'lastPageOffset' => ($this->numberOfPages - 1) * $this->itemsPerPage,\n 'displayRangeStart' => $this->displayRangeStart,\n 'displayRangeEnd' => $this->displayRangeEnd,\n 'hasLessPages' => $this->displayRangeStart > 2,\n 'hasMorePages' => $this->displayRangeEnd + 1 < $this->numberOfPages\n ];\n if ($this->currentPage < $this->numberOfPages) {\n $pagination['nextPage'] = $this->currentPage + 1;\n $pagination['nextPageOffset'] = $this->currentPage * $this->itemsPerPage;\n }\n if ($this->currentPage > 1) {\n $pagination['previousPage'] = $this->currentPage - 1;\n $pagination['previousPageOffset'] = ($this->currentPage - 2) * $this->itemsPerPage;\n }\n return $pagination;\n }", "public function index()\n {\n $pages = Page::active()->orderBy('order' , 'DESC')->get();\n\n return PageResource::collection($pages);\n }", "public function index()\n {\n return PhotographResource::collection(Photograph::orderBy('sort', 'asc')->get());\n }", "public function getPaginated( array $params )\n {\n if ($this->isSortable($params))\n {\n return $this->model->with(['author'])\n ->orderBy($params['sortBy'], $params['direction'])\n ->paginate();\n }\n\n if ($this->isFilterable($params))\n {\n return $this->model->with(['author'])\n ->where(function($query) use ($params){\n foreach ($params['where'] as $where)\n {\n $query->where($where['column'], $where['is']);\n }\n })\n ->orderBy('published_at', 'desc')\n ->paginate();\n }\n\n return $this->model->with(['author'])\n ->orderBy('published_at', 'desc')\n ->paginate();\n }", "protected function load()\r\n {\r\n $this->ensureSorter();\r\n $posts = iterator_to_array($this->iterator);\r\n\r\n // Find the previous and next posts, if the parent page is in there.\r\n if ($this->page != null)\r\n {\r\n $pageIndex = -1;\r\n foreach ($posts as $i => $post)\r\n {\r\n if ($post === $this->page)\r\n {\r\n $pageIndex = $i;\r\n break;\r\n }\r\n }\r\n if ($pageIndex >= 0)\r\n {\r\n // Get the previous and next posts.\r\n $prevAndNextPost = array(null, null);\r\n if ($pageIndex > 0)\r\n $prevAndNextPost[0] = $posts[$pageIndex - 1];\r\n if ($pageIndex < count($posts) - 1)\r\n $prevAndNextPost[1] = $posts[$pageIndex + 1];\r\n\r\n // Get their template data.\r\n $prevAndNextPostData = $this->getPostsData($prevAndNextPost);\r\n\r\n // Posts are sorted by reverse time, so watch out for what's\r\n // \"previous\" and what's \"next\"!\r\n $this->previousPost = $prevAndNextPostData[1];\r\n $this->nextPost = $prevAndNextPostData[0];\r\n }\r\n }\r\n \r\n // Get the posts data, and use that as the items we'll return.\r\n $items = $this->getPostsData($posts);\r\n\r\n // See whether there's more than what we got.\r\n $this->hasMorePosts = false;\r\n $currentIterator = $this->iterator;\r\n while ($currentIterator != null)\r\n {\r\n if ($currentIterator instanceof SliceIterator)\r\n {\r\n $this->hasMorePosts |= $currentIterator->hadMoreItems();\r\n if ($this->hasMorePosts)\r\n break;\r\n }\r\n $currentIterator = $currentIterator->getInnerIterator();\r\n }\r\n\r\n return $items;\r\n }", "public function getPaginator()\n\t{\n\t\tif ($this->paginator instanceof Closure)\n\t\t{\n\t\t\t$this->paginator = call_user_func($this->paginator);\n\t\t}\n\n\t\treturn $this->paginator;\n\t}", "public function paginate()\n {\n return $this->configurationRepository->scopeQuery(function ($query) {\n return $query->orderBy('id', 'desc');\n })->paginate();\n }", "public function rangeToPaginate()\n {\n $pages = array();\n\n if ( $this->lastPage <= $this->maxPagesToList) {\n for ($i = 1; $i <= $this->lastPage; $i++) {\n $pages[] = $i;\n }\n } else if ($this->currentPage <= floor($this->maxPagesToList/2)+1) {\n for ($i = 1; $i <= $this->maxPagesToList; $i++) {\n $pages[] = $i;\n }\n } else if ($this->lastPage <= floor($this->maxPagesToList/2)+$this->currentPage) {\n $begin = $this->lastPage - $this->maxPagesToList + 1;\n for ($i = $begin; $i <= $this->lastPage; $i++) {\n $pages[] = $i;\n }\n } else {\n $begin = $this->currentPage - floor($this->maxPagesToList/2);\n $end = $this->currentPage + floor($this->maxPagesToList/2);\n for ($i = $begin; $i <= $end; $i++) {\n $pages[] = $i;\n }\n }\n return $pages;\n\n }", "public function fetchAllPaginated() {\r\n \r\n // Create a Paginator for the blog posts query\r\n \r\n $paginator = Zend_Paginator::factory($this->select());\r\n \r\n // $select = $db->select()->from('posts')->sort('date_created DESC');\r\n \r\n // Create a Paginator for the blog posts query\r\n \r\n \r\n return $paginator; \r\n \r\n }", "function createPaginatorOperative(array $criteria = null, array $orderBy = null) {\n $securityContext = $this->getSecurityContext();\n $user = $this->getUser();\n $queryBuilder = $this->getCollectionQueryBuilder();\n $queryBuilder->andWhere('i.enabled =:enabled');\n $queryBuilder->innerJoin('i.objetives', 'ob');\n $queryBuilder->andWhere('i.tmp =:false');\n $queryBuilder->andWhere('ob.enabled =:enabled ');\n $queryBuilder->setParameter('enabled', true);\n $queryBuilder->setParameter('false', false);\n //Filtro Objetivo Estratégico\n if (isset($criteria['description'])) {\n $description = $criteria['description'];\n unset($criteria['description']);\n $queryBuilder->andWhere($queryBuilder->expr()->orX($queryBuilder->expr()->like('i.description', \"'%\" . $description . \"%'\"), $queryBuilder->expr()->like('i.ref', \"'%\" . $description . \"%'\")));\n }\n\n if (isset($criteria['indicatorLevel'])) {\n $queryBuilder->andWhere(\"i.indicatorLevel = \" . $criteria['indicatorLevel']);\n }\n\n if ($securityContext->isGranted(array('ROLE_MANAGER_FIRST', 'ROLE_MANAGER_FIRST_AUX'))) {\n if (isset($criteria['gerenciaSecond'])) {\n if ((int) $criteria['gerenciaSecond'] == 0) {//En el caso que seleccione todas las Gerencias de 2da Línea\n $queryBuilder->andWhere('ob.gerencia = ' . $user->getGerencia()->getId());\n ;\n }\n } else {\n if ($user->getGerencia()) {\n $queryBuilder->andWhere('ob.gerencia = ' . $user->getGerencia()->getId());\n }\n }\n } elseif ($securityContext->isGranted(array('ROLE_MANAGER_SECOND', 'ROLE_MANAGER_SECOND_AUX'))) {\n $queryBuilder->andWhere('ob.gerenciaSecond = ' . $user->getGerenciaSecond()->getId());\n } elseif ($securityContext->isGranted(array('ROLE_GENERAL_COMPLEJO', 'ROLE_GENERAL_COMPLEJO_AUX'))) {\n if (isset($criteria['gerenciaSecond'])) {\n if ((int) $criteria['gerenciaSecond'] == 0) {//En caso que seleccione todas las Gerencias de 2da Línea\n $queryBuilder->leftJoin('ob.gerenciaSecond', 'gs');\n $queryBuilder->andWhere('gs.complejo = ' . $user->getComplejo()->getId());\n $queryBuilder->andWhere('gs.modular =:modular');\n $queryBuilder->setParameter('modular', true);\n }\n } else {\n $queryBuilder->leftJoin('ob.gerenciaSecond', 'gs');\n $queryBuilder->andWhere('gs.complejo = ' . $user->getComplejo()->getId());\n $queryBuilder->andWhere('gs.modular =:modular');\n $queryBuilder->setParameter('modular', true);\n }\n } elseif ($securityContext->isGranted(array('ROLE_INDICATOR_ADD_RESULT')) || $user->getGerencia()) {\n $queryBuilder->andWhere('ob.gerencia = ' . $user->getGerencia()->getId());\n }\n\n if (isset($criteria['gerenciaFirst'])) {\n if ((int) $criteria['gerenciaFirst'] == 0) {\n \n } else {\n $queryBuilder->andWhere('ob.gerencia = ' . (int) $criteria['gerenciaFirst']);\n }\n }\n\n if (isset($criteria['gerenciaSecond'])) {\n if ((int) $criteria['gerenciaSecond'] > 0) {\n $queryBuilder->andWhere(\"ob.gerenciaSecond = \" . (int) $criteria['gerenciaSecond']);\n } else {\n unset($criteria['gerenciaSecond']);\n }\n }\n $queryBuilder->groupBy('i.ref');\n $queryBuilder->orderBy('i.ref');\n\n $this->applyPeriodCriteria($queryBuilder);\n\n return $this->getPaginator($queryBuilder);\n }", "public function getPaginator()\n {\n if ( $this->paginator instanceof Closure ) {\n $this->paginator = call_user_func ( $this->paginator );\n }\n return $this->paginator;\n }", "public function PaginatedListOfUsers ()\n {\n $url = \"https://reqres.in/api/users\";\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_URL,$url);\n $result=curl_exec($ch);\n curl_close($ch);\n return $result;\n }", "public function getTabla() {\n // Create the adapter\n $adapter = new SelectableAdapter($this->entityManager->getRepository(Usuario::class)); // An object repository implements Selectable\n // Create the paginator itself\n $paginator = new Paginator($adapter);\n\n return ($paginator);\n }", "function getPagos() {\n $where = \" WHERE 1\";\n $array = \"\";\n $columns = \"`Id_pago`, `Nombre`, `Email`, `Fecha_anterior`, `Pago`, `Proxima_fecha`, `Estatus`, `Id_cliente`\";\n $response = $this->db->select3($columns, 'pagos', $where, $array);\n return $response;\n }", "public function index(): LengthAwarePaginator\n {\n return Payment::requestBuilder()->paginate(request('items_per_page'));\n }", "public function getPagesAction() {\n\n //FETCH\n $paramss = array();\n $paramss['title'] = $this->_getParam('text');\n $paramss['viewer_id'] = Engine_Api::_()->user()->getViewer()->getIdentity();\n $paramss['limit'] = $this->_getParam('limit', 40);\n $paramss['orderby'] = 'title ASC';\n $usersitepages = Engine_Api::_()->getDbtable('pages', 'sitepage')->getSuggestClaimPage($paramss);\n $data = array();\n $mode = $this->_getParam('struct');\n if ($mode == 'text') {\n foreach ($usersitepages as $usersitepage) {\n $content_photo = $this->view->itemPhoto($usersitepage, 'thumb.icon');\n $data[] = array(\n 'id' => $usersitepage->page_id,\n 'label' => $usersitepage->title,\n 'photo' => $content_photo\n );\n }\n } else {\n foreach ($usersitepages as $usersitepage) {\n $content_photo = $this->view->itemPhoto($usersitepage, 'thumb.icon');\n $data[] = array(\n 'id' => $usersitepage->page_id,\n 'label' => $usersitepage->title,\n 'photo' => $content_photo\n );\n }\n }\n return $this->_helper->json($data);\n }", "public function getBanners($perPage = 20, array $filter = array(), array $sort = array(), $paginate = true);" ]
[ "0.62979025", "0.6165122", "0.6155151", "0.61040735", "0.5817724", "0.5728571", "0.57275563", "0.5717619", "0.57031745", "0.56964433", "0.5673149", "0.5596236", "0.5568827", "0.55192745", "0.5514366", "0.5473531", "0.5468489", "0.5458858", "0.5447404", "0.54116285", "0.5402557", "0.53883886", "0.53765976", "0.53720754", "0.53703004", "0.5352323", "0.5348304", "0.5348304", "0.5337226", "0.53356063", "0.53343403", "0.5332787", "0.5323991", "0.53181726", "0.5313707", "0.5310049", "0.52984905", "0.5296784", "0.5289587", "0.52820325", "0.5276991", "0.52652305", "0.525512", "0.52421975", "0.52386826", "0.52330375", "0.5207858", "0.52053565", "0.5196056", "0.5185693", "0.5185672", "0.5181328", "0.5178305", "0.5175587", "0.5175198", "0.5161246", "0.51603097", "0.51603097", "0.5156259", "0.51488644", "0.5148692", "0.5147975", "0.5138934", "0.5134732", "0.5126601", "0.51184946", "0.51139873", "0.51111776", "0.5110252", "0.51100403", "0.5109107", "0.51002526", "0.50984836", "0.5086698", "0.5085761", "0.5082449", "0.50824475", "0.5073973", "0.5073267", "0.5070059", "0.50557435", "0.5052009", "0.5045576", "0.50453866", "0.504469", "0.50392956", "0.50275993", "0.5027505", "0.5023703", "0.50234073", "0.5022627", "0.5022276", "0.5018826", "0.5018081", "0.5015684", "0.50134057", "0.5012226", "0.5011025", "0.5007783", "0.50041986" ]
0.75844246
0
Fetches slides and returns a paginator array
public function fetchSlides($params = NULL) { $select = $this->registry->db->select(); $select->from(array('s' => 'rotators_slides')); if(isset($params['rotator'])) : $select->where('s.rots_rotator = ?', $params['rotator']); endif; $select->order('s.rots_title ASC'); if(isset($params['page']) && is_numeric($params['page'])) : $pagenum = $params['page']; else : $pagenum = 1; endif; if(isset($params['items']) && is_numeric($params['items'])) : $items = $params['items']; else : $items = 15; endif; if(isset($params['range']) && is_numeric($params['range'])) : $range = $params['range']; else : $range = 5; endif; $paginator = Zend_Paginator::factory($select); $paginator->setCurrentPageNumber($pagenum); $paginator->setItemCountPerPage($items); $paginator->setPageRange($range); return $paginator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSlides()\n {\n return Slide::all();\n }", "public function index()\n {\n $user = Auth::user();\n\n return $user->slides()->get();\n }", "public function getAllSlides(){\n\t\ttry{\n\t\t\tif($this->_apc && apc_exists($this->apc_slide_list_total)){\n\t\t\t\t$slides = apc_fetch($this->apc_slide_list_total);\n\t\t\t}else{\t\t\n\t\t\t\t$sql = \"SELECT * FROM slide\";\n\t\t\t\t$stmt = $this->_db->prepare($sql);\n\t\t\t\t$stmt->execute();\n\t\t\t\tif($stmt->errorCode() != 0){\n\t\t\t\t\t$error = $stmt->errorInfo();\n\t\t\t\t\tthrow new SQLException($error[2], $error[0], $sql, \"Impossible d'obtenir la liste des slides actifs.\");\n\t\t\t\t}\n\t\t\t\t$slides = array();\n\t\t\t\twhile ($data = $stmt->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t\t$slides[] = new Slide($data);\n\t\t\t\t}\n\t\t\t\tif($this->_apc){\n\t\t\t\t\tapc_store($this->apc_slide_list_total, $slides, 86000);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $slides;\n\t\t}catch(PDOException $e){\n\t\t\tthrow new DatabaseException($e->getCode(), $e->getMessage(), \"Impossible d'obtenir la liste des slides actifs.\");\n\t\t}\n\t}", "private function fill_slider(){\n\t\tglobal $DB;\n\t\t$slides= \"SELECT * FROM {theme_archaius} ORDER BY position ASC\";\n\t $slides= $DB->get_records_sql($slides);\n\t return $slides;\n\t}", "public function getPages();", "public function get()\n {\n $total_pages = ceil($this->total / $this->per_page);\n $begin = $this->page - $this->side_pages_n;\n $end = $this->page + $this->side_pages_n;\n $pagination = [];\n\n if ($begin <= 0) {\n $begin = 1;\n }\n\n for ($i = $begin; $i <= $end && $i <= $total_pages; $i++) {\n $pagination[] = $this->getNewPage($i);\n }\n\n if ($this->show_ends) {\n $this->addEnds($pagination);\n }\n\n return $pagination;\n }", "public function getPages() {}", "public function getPaginated();", "protected function buildSlides() {\n $this->sortSlidesByWeight();\n\n $slides = [];\n foreach ($this->configuration['slides'] as $slide) {\n if ($slide['mid'] !== NULL) {\n $slides[] = [\n 'image' => $this->fileUrlFromMediaId($slide['mid']),\n 'caption' => $slide['caption'],\n ];\n }\n }\n return $slides;\n }", "public function index()\n\t{\n\t\t$slides = Slide::paginate(10);\n\t\treturn $this->respondOK($slides);\n\t}", "public function getNewestSlides()\n {\n $returnValue = array();\n\n // section -64--88-0-2--2405a564:15f260ff61f:-8000:0000000000000B96 begin\n $this->Database = new Database();\n $sql = $this->Database->prepare(\"SELECT * FROM hopetrac_main.inspiration_quotes ORDER BY id DESC LIMIT 0,10\");\n $sql->setFetchMode(PDO::FETCH_ASSOC);\n $sql->execute();\n\n $returnValue = $sql->fetchAll();\n // section -64--88-0-2--2405a564:15f260ff61f:-8000:0000000000000B96 end\n\n return (array) $returnValue;\n }", "function getPages() {\n\t\t$sql = 'SELECT * FROM page WHERE vis = 1 ORDER BY psn';\n\t\t$qrh = mysqli_query($this->lnk, $sql);\n\t\t$i = 1;\n\t\t\n\t\t// iterate and extract data to be passed to view\n\t\twhile ( $res = mysqli_fetch_array($qrh)) {\n\t\t\t$results[] = array('id' => $res['id'],'name' => $res['nam']);\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\treturn $results;\n\t\t\n\t}", "protected function load()\r\n {\r\n $this->ensureSorter();\r\n $posts = iterator_to_array($this->iterator);\r\n\r\n // Find the previous and next posts, if the parent page is in there.\r\n if ($this->page != null)\r\n {\r\n $pageIndex = -1;\r\n foreach ($posts as $i => $post)\r\n {\r\n if ($post === $this->page)\r\n {\r\n $pageIndex = $i;\r\n break;\r\n }\r\n }\r\n if ($pageIndex >= 0)\r\n {\r\n // Get the previous and next posts.\r\n $prevAndNextPost = array(null, null);\r\n if ($pageIndex > 0)\r\n $prevAndNextPost[0] = $posts[$pageIndex - 1];\r\n if ($pageIndex < count($posts) - 1)\r\n $prevAndNextPost[1] = $posts[$pageIndex + 1];\r\n\r\n // Get their template data.\r\n $prevAndNextPostData = $this->getPostsData($prevAndNextPost);\r\n\r\n // Posts are sorted by reverse time, so watch out for what's\r\n // \"previous\" and what's \"next\"!\r\n $this->previousPost = $prevAndNextPostData[1];\r\n $this->nextPost = $prevAndNextPostData[0];\r\n }\r\n }\r\n \r\n // Get the posts data, and use that as the items we'll return.\r\n $items = $this->getPostsData($posts);\r\n\r\n // See whether there's more than what we got.\r\n $this->hasMorePosts = false;\r\n $currentIterator = $this->iterator;\r\n while ($currentIterator != null)\r\n {\r\n if ($currentIterator instanceof SliceIterator)\r\n {\r\n $this->hasMorePosts |= $currentIterator->hadMoreItems();\r\n if ($this->hasMorePosts)\r\n break;\r\n }\r\n $currentIterator = $currentIterator->getInnerIterator();\r\n }\r\n\r\n return $items;\r\n }", "public function getActiveSlides(){\n\t\ttry{\n\t\t\tif($this->_apc && apc_exists($this->apc_slide_list_active)){\n\t\t\t\t$slides = apc_fetch($this->apc_slide_list_active);\n\t\t\t}else{\t\t\n\t\t\t\t$sql = \"SELECT * FROM slide WHERE isactive = '1'\";\n\t\t\t\t$stmt = $this->_db->prepare($sql);\n\t\t\t\t$stmt->execute();\n\t\t\t\tif($stmt->errorCode() != 0){\n\t\t\t\t\t$error = $stmt->errorInfo();\n\t\t\t\t\tthrow new SQLException($error[2], $error[0], $sql, \"Impossible d'obtenir la liste des slides actifs.\");\n\t\t\t\t}\n\t\t\t\t$slides = array();\n\t\t\t\twhile ($data = $stmt->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t\t$slides[] = new Slide($data);\n\t\t\t\t}\n\t\t\t\tif($this->_apc){\n\t\t\t\t\tapc_store($this->apc_slide_list_active, $slides, 86000);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $slides;\n\t\t}catch(PDOException $e){\n\t\t\tthrow new DatabaseException($e->getCode(), $e->getMessage(), \"Impossible d'obtenir la liste des slides actifs.\");\n\t\t}\n\t}", "public function getSliderList()\n { \n $sliders = PageSlider::where('status', PageSlider::ACTIVE)->get();\n return $sliders;\n }", "public function getImages()\n {\n $res=array();\n $this->objTable = new Model($this->getLangAndID['lang'].'_slide_image');\n $select = array('id','title','description','slide_id','src_link','order_by','avatar');\n $this->objTable->where('slide_id',$this->id);\n $this->objTable->where('idw',$this->idw);\n $data = $this->objTable->get(null,null,$select);\n \n return $data; \n }", "public function getPagesAction() {\n\n //FETCH\n $paramss = array();\n $paramss['title'] = $this->_getParam('text');\n $paramss['viewer_id'] = Engine_Api::_()->user()->getViewer()->getIdentity();\n $paramss['limit'] = $this->_getParam('limit', 40);\n $paramss['orderby'] = 'title ASC';\n $usersitepages = Engine_Api::_()->getDbtable('pages', 'sitepage')->getSuggestClaimPage($paramss);\n $data = array();\n $mode = $this->_getParam('struct');\n if ($mode == 'text') {\n foreach ($usersitepages as $usersitepage) {\n $content_photo = $this->view->itemPhoto($usersitepage, 'thumb.icon');\n $data[] = array(\n 'id' => $usersitepage->page_id,\n 'label' => $usersitepage->title,\n 'photo' => $content_photo\n );\n }\n } else {\n foreach ($usersitepages as $usersitepage) {\n $content_photo = $this->view->itemPhoto($usersitepage, 'thumb.icon');\n $data[] = array(\n 'id' => $usersitepage->page_id,\n 'label' => $usersitepage->title,\n 'photo' => $content_photo\n );\n }\n }\n return $this->_helper->json($data);\n }", "protected function loadPage()\n\t{\n\t\t$this->_dataProvider->getPagination()->setCurrentPage($this->_currentPage);\n\t\treturn $this->_items = $this->dataProvider->getData(true);\n\t}", "function get_featured_slider() {\n $sql = \"SELECT * FROM slider WHERE publish='1'\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "public function articlesPaginated(){\n return Article::paginate(10);\n }", "function get_slider() {\n $sql = \"SELECT * FROM slider\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "public function index()\n {\n $slides = $this->Slides->find('all')\n ->order(['Slides.sorting' => 'ASC'])\n ;\n $this->set(['enable_fancy_box' => true]);\n $this->set('slides', $this->paginate($slides));\n $this->set('_serialize', ['slides']);\n }", "public function getPage();", "function get_all_slide()\r\n {\r\n \r\n \r\n $slide = $this->db->query(\"\r\n SELECT\r\n *\r\n\r\n FROM\r\n slide \r\n\r\n ORDER BY `slide_id` DESC\r\n\r\n \")->result_array();\r\n\r\n return $slide;\r\n }", "function sb_slideshow_slides( $sql ) {\n\tglobal $wpdb, $post, $sb_slideshow_interface, $sb_slideshow_slides;\n\n\t$slides = get_post_meta( ( ! isset( $post->ID ) ? absint( $_POST['id'] ) : $post->ID ), 'slide', false ); // set single (third parameter) to false to pull ALL records with key \"slide\"\n\n\t$attachments = $wpdb->get_results( $sql );\n\n\t// push all image attachments info into array\n\t$indexes = array();\n\tforeach( $attachments as $attachment ) {\n\t\tarray_push( $indexes, count( $sb_slideshow_slides ) );\n\n\t\t$box = 'library';\n\t\t$order = '';\n\t\tforeach( $slides as $slide ) {\n\t\t\tif( $slide['attachment_id'] == $attachment->ID ) {\n\t\t\t\t$box = 'slides';\n\t\t\t\t$order = $slide['order'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$metadata = wp_get_attachment_metadata( $attachment->ID );\n\n\t\tarray_push( $sb_slideshow_slides, array(\n\t\t\t'box' \t\t\t=> $box,\n\t\t\t'order'\t\t\t=> $order,\n\t\t\t'attachment'\t\t=> array(\n\t\t\t\t'id' \t\t=> $attachment->ID,\n\t\t\t\t'year' \t\t=> mysql2date( 'Y', $attachment->post_date ),\n\t\t\t\t'month' \t=> mysql2date( 'm', $attachment->post_date ),\n\t\t\t\t'width'\t\t=> $metadata['width'],\n\t\t\t\t'height' \t=> $metadata['height'],\n\t\t\t\t'type' \t\t=> $attachment->post_mime_type,\n\t\t\t\t'link'\t\t=> $attachment->post_excerpt,\n\t\t\t\t'content'\t=> $attachment->post_content ),\n\t\t\t\t'image' \t=> '<img src=\"' . sb_get_post_image_url( array( 'width' => $sb_slideshow_interface['slide_width'], 'height' => $sb_slideshow_interface['slide_height'], 'image_id' \t=> $attachment->ID, 'echo' \t=> false ) ) . '\" width=\"' . $sb_slideshow_interface['slide_width'] . '\" height=\"' . $sb_slideshow_interface['slide_height'] . '\" />'\n\t\t\t)\n\t\t);\n\t}\n\n\tusort( $sb_slideshow_slides, 'sb_slideshow_slide_sort' ); // order the elements of the array\n\n\treturn $indexes;\n}", "public function get_slides_for_slider() {\n return $this->slides_to_include;\n }", "private function loadPages()\n {\n $webClient = new WebClient();\n $allPages = [];\n $choppedUrls = array_chunk($this->newUrls, self::PAGES_PER_TIME);\n foreach ($choppedUrls as $iteration => $urlsChunk) {\n $currentPages = $webClient->multiGet($this->newUrls);\n $allPages = array_merge($allPages, $currentPages);\n\n $urlsChunkCount = count($urlsChunk);\n $pagesLoaded = $urlsChunkCount < self::PAGES_PER_TIME ?\n $urlsChunkCount\n : ($iteration + 1) * self::PAGES_PER_TIME;\n $this->outputMessage(sprintf('... loaded %s pages', $pagesLoaded));\n }\n\n return $allPages;\n }", "function get_all_gallery(){\n global $conn, $start_pos, $items_per_page ;\n\n pagination();\n $sql = \"SELECT * FROM gallery LIMIT $start_pos, $items_per_page\";\n\n $result = mysqli_query($conn, $sql);\n\n $galleries = [];\n // $galleries = array();\n\n if(mysqli_num_rows($result)> 0){\n\n while($row = mysqli_fetch_assoc($result)){\n array_push($galleries, $row);\n }\n return $galleries;\n } else {\n return false;\n }\n}", "private function getItems()\n\t{\n\t\tglobal $objPage;\n\t\t$objDatabase = \\Database::getInstance();\n\t\t\n\t\t$time = time();\n\t\t$strBegin;\n\t\t$strEnd;\n\t\t$arrArticles = array();\n\t\t\n\t\t// Create a new data Object\n\t\t$objDate = new \\Date();\n\t\t\n\t\t// Set scope of pagination\n\t\tif($this->pagination_format == 'news_year')\n\t\t{\n\t\t\t// Display current year only\n\t\t\t$strBegin = $objDate->__get('yearBegin');\n\t\t\t$strEnd = $objDate->__get('yearEnd');\n\t\t}\n\t\telseif ($this->pagination_format == 'news_month')\t\n\t\t{\n\t\t\t// Display current month only\n\t\t\t$strBegin = $objDate->__get('monthBegin');\n\t\t\t$strEnd = $objDate->__get('monthEnd');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Display all\n\t\t}\n\t\t\n\t\t$strCustomWhere = '';\n\t\t// HOOK: allow other extensions to modify the sql WHERE clause\n\t\tif (isset($GLOBALS['TL_HOOKS']['readerpagination']['customsql_where']) && count($GLOBALS['TL_HOOKS']['readerpagination']['customsql_where']) > 0)\n\t\t{\n\t\t\tforeach($GLOBALS['TL_HOOKS']['readerpagination']['customsql_where'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$strCustomWhere = $this->$callback[0]->$callback[1]('news',$this);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fetch all news that fit in the scope\n\t\t$objArticlesStmt = $objDatabase->prepare(\"\n \tSELECT * FROM tl_news\n \tWHERE \n \t\tpid IN(\" . implode(',', $this->archives) . \") AND published=1 AND hide_in_pagination!=1\n \t\t\" . (!BE_USER_LOGGED_IN ? \" AND (start='' OR start<$time) AND (stop='' OR stop>$time)\" : \"\") . \"\n \t\t\" . ($strBegin ? \" AND (date>$strBegin) AND (date<$strEnd)\" : \"\" ) .\" \".$strCustomWhere. \"\n \tORDER BY date DESC\");\n\t \n\t\t$objArticles = $objArticlesStmt->execute();\n\t\t\n\t\tif ($objArticles->numRows < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// get all articles\n\t\t$arrArticles = $objArticles->fetchAllAssoc();\n\t\t\n\t\t// HOOK: allow other extensions to modify the items\n\t\tif (isset($GLOBALS['TL_HOOKS']['readerpagination']['getItems']) && count($GLOBALS['TL_HOOKS']['readerpagination']['getItems']) > 0)\n\t\t{\n\t\t\tforeach($GLOBALS['TL_HOOKS']['readerpagination']['getItems'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$arrArticles = $this->$callback[0]->$callback[1]('news',$arrArticles,$this);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(count($arrArticles) < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// add keys for pagination (title, href)\n\t\tforeach($arrArticles as $i => $article)\n\t\t{\n\t\t\t// get alias\n \t\t$strAlias = (!$GLOBALS['TL_CONFIG']['disableAlias'] && $article['alias'] != '') ? $article['alias'] : $article['id'];\n \t\t\t\n \t\t\t$arrTmp = array\n \t\t\t(\n \t\t\t\t'href' => ampersand($this->generateFrontendUrl($objPage->row(), ((isset($GLOBALS['TL_CONFIG']['useAutoItem']) && $GLOBALS['TL_CONFIG']['useAutoItem']) ? '/' : '/items/') . $strAlias)),\n 'title' => specialchars($article['headline']),\n \t);\n \t\t\t\n \t\t\t$arrResult[] = array_merge($arrArticles[$i], $arrTmp);\n \t\t\tunset($arrTmp);\n\t\t}\n\t\t$arrArticles = $arrResult;\n\t\tunset($arrResult);\n\t\t\n\t\tif(count($arrArticles) < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// Higher the keys of the array by 1\n\t\t$arrTmp = array();\n\t\tforeach($arrArticles as $key => $value)\n\t\t{\n\t\t\t$arrTmp[$key+1] = $value;\n\t\t}\n\t\tksort($arrTmp);\n\t\t\n\t\t$arrArticles = $arrTmp;\n\t\tunset($arrTmp);\n\t\t\n\t\treturn $arrArticles;\n\t}", "public function getToPaginator();", "function slidesList($album=array(), $images=array(), $startnum=-1, $modvars=array(), $imagesCount=null)\n\t{\n\t\t// Create output object\n\t\t$pnRender = pnRender :: getInstance('crpCasa');\n\n\t\t$pnRender->assign('startnum',$startnum);\n\t\t$pnRender->assign($modvars);\n\t\t$pnRender->assign('album',$album);\n\t\t$pnRender->assign('images',$images);\n\t\t// Assign the information required to create the pager\n\t\t$pnRender->assign('pager', array (\n\t\t\t'numitems' => $imagesCount,\n\t\t\t'itemsperpage' => $modvars['albumsperpage']\n\t\t));\n\n\t\t// Return the output that has been generated by this function\n\t\treturn $pnRender->fetch('crpcasa_user_album_slideshow.htm');\n\t}", "public function slides()\n {\n return $this->hasMany('App\\ArticleSlider');\n }", "public function get(): array\n\t{\n\t\t$roundedNumber = $this->count();\n\t\t$page = 1;\n\t\t\n\t\t$arrayPage = array();\n\t\t\n\t\tfor ($i = 0; $i < $roundedNumber; $i++) {\n\t\t\t$arrayPage[] = $page;\n\t\t\t$page++;\n\t\t}\n\t\treturn $arrayPage;\n\t}", "public function getPhotos($page, $itemsPerPage);", "public function getSlider()\n\t{\n\t\t\n\t\t $sliders = Slider::where('deleted_at' , null )->inRandomOrder()->where('active' , 'yes')->orderBY('id','desc')->take(5)->get() ;\n\t\t \n\t\t $data = array() ;\n\t\t foreach($sliders as $slider){\n\t\t\t $slideData = array(\n\t\t\t 'name_ar' => $slider->name_ar ,\n\t\t\t 'name_en' => $slider->name_en ,\n\t\t\t 'description_ar' => strip_tags($slider->description_ar) ,\n\t\t\t 'description_en' => strip_tags($slider->description_en) ,\n\t\t\t 'photo' => url('/public').$slider->photo , \t\t\t \n\t\t\t ) ;\n\t\t\t array_push($data ,$slideData ) ;\n\t\t\t \n\t\t }\n\t\t return response()->json([\n 'status' => 1,\n 'data' => $data , \t\t\t\t\n ]); \n \n\t}", "function get_objects($offset, $count, $order_property = null)\r\n {\r\n $order_property = $this->get_order_property($order_property);\r\n return $this->get_browser()->retrieve_photo_gallery_publications($this->get_condition(), $order_property, $offset, $count);\r\n }", "public function index() {\n $slides = SlideImage::orderBy('created_at', 'DESC')->paginate(15);\n return View::make('admin.slide.index')->with(compact('slides'));\n }", "public function getPaginationDataSource();", "public function index()\n {\n $slides = Slides::all();\n return view('pages.slides.index', compact('slides'));\n }", "public function fetchAllPaginated() {\r\n \r\n // Create a Paginator for the blog posts query\r\n \r\n $paginator = Zend_Paginator::factory($this->select());\r\n \r\n // $select = $db->select()->from('posts')->sort('date_created DESC');\r\n \r\n // Create a Paginator for the blog posts query\r\n \r\n \r\n return $paginator; \r\n \r\n }", "public static function obtenerPaginate()\n {\n $rs = self::builder();\n return $rs->paginate(self::$paginate) ?? [];\n }", "protected function loadPage()\n {\n $this->getDataProvider()->getPagination()->setPage($this->getCurrentPage());\n $this->getDataProvider()->prepare(true);\n\n return $this->items = $this->getDataProvider()->getModels();\n }", "public function PaginatedArticles() {\n\t\t$pages = DOArticle::get()->sort('Date DESC');\n\t\t$list = new PaginatedList($pages, $this->request);\n\t\t$list->setPageLength(5);\n\t\treturn $list;\n\t}", "public function getEnabledSlides()\n {\n $slides = ArrayList::create();\n \n foreach ($this->getListItems() as $item) {\n \n if ($slide = $this->createSlide($item)) {\n $slides->push($slide);\n }\n \n }\n \n return $slides;\n }", "public function getCurrentPageResults(): array;", "function pagination(){}", "public function getPaginate ($p_rowsPerPage, $p_currentPage);", "function get_pager()\n\t{\n\t\tinclude_once('Pager/Pager.php');\n\t\t$pager_options = array();\n\t\t$pager_options['mode'] = 'Sliding';\n\t\t$pager_options['urlVar'] = 'page';\n\t\t$pager_options['delta'] = 2;\n\t\t$pager_options['perPage'] = (int) $this->rows_per_page;\n\t\t$pager_options['separator'] = '|';\n\t\t$pager_options['prev'] = '&laquo;';\n\t\t$pager_options['next'] = '&raquo;';\n\t\t$pager_options['append'] = false;\n\t\t$pager_options['fileName'] = $this->pager_file_name;\n\t\t\n\t\t$pager_options['totalItems'] = $this->totalItems;\n\t\t\n\t\t$currentPage = common::arg($this->pager_arg_no);\n\t\t//$this->content->debug .= ' currentPage: '.$currentPage .' argno: '.$this->pager_arg_no .' a:'.(int)common::arg(3);\n\t\tif (! isset($currentPage) || ! $currentPage) { $currentPage = 1; }\n\t\tif ($currentPage > ceil($this->totalItems/$this->rows_per_page)) { $currentPage = 1; }\n\t\t\n\t\t$pager_options['currentPage'] = $currentPage;\n\t\t\n\t\t$pager =& Pager::factory($pager_options);\n\t\treturn $pager->links;\n\t}", "public function index()\n {\n $pages = Page::active()->orderBy('order' , 'DESC')->get();\n\n return PageResource::collection($pages);\n }", "public function paginate($params = [])\n {\n return (new Paginator($this->album))->with('artist')->orderBy('release_date')->paginate($params);\n }", "public function getPage(): array\n {\n $postIdList = $this->getPostIdList();\n $postRepository = new PostRepository();\n $postsArray= $postRepository->getByIds($postIdList);\n foreach ($postsArray as $post)\n $post->picLinkMin = picHandler::getMin($post->pic_link);\n\n return $postsArray;\n }", "public function getSlides(){\r\n\t\treturn $this->getModel()->getSlides();\r\n\t}", "public function getPicturesInSlider(): PictureCollection;", "public function getPaginate(){ }", "public function pages() {\n\t\t// Build the MindTouch API URL to fetch the pages.\n\t\t$url = \"pages\";\n\n\t\t// Get output from API.\n\t\t$output = $this->get($url);\n\n\t\t// Parse the output.\n\t\t$output = $this->parseOutput($output);\n\n\t\treturn $output;\n\t}", "function getFeatureProducts(){\n \n $itemonpage = !empty($_GET['per_page'])?$_GET['per_page']:3;\n $page = !empty($_GET['page'])?$_GET['page']:1;\n $offset= ($page-1)*$itemonpage;\n\n $numberPage = ceil(30/$itemonpage);\n \n $sql = self::$connection->prepare(\"SELECT * FROM products limit \".$itemonpage.\" offset \".$offset);\n \n $sql->execute();//return an object\n $items = array();\n $items = $sql->get_result()->fetch_all(MYSQLI_ASSOC);\n include \"link.php\";\n return $items; //return an array\n }", "public function can_return_a_collection_of_paginated_products()\n {\n $product1 = $this->create('Product');\n $product2 = $this->create('Product');\n $product3 = $this->create('Product');\n\n $response = $this->actingAs($this->create('User', [], false), 'api')->json('GET', '/api/products');\n\n $response->assertStatus(200)\n ->assertJsonStructure([\n 'data' => [\n '*' => ['id','name','slug','price','created_at']\n ],\n\n 'links' => ['first', 'last', 'prev', 'next'],\n 'meta' => [\n 'current_page', 'last_page', 'from', 'to', 'path', 'per_page', 'total'\n ]\n ]);\n }", "public function getPages()\n {\n return $this->getTable('ExhibitPage')->findBy(array('exhibit' => $this->id, 'sort_field' => 'order'));\n }", "function get_slider($tipo,$idioma_id)\r\n {\r\n $sql = \"select * from slide s, pagina_web p \r\n where s.pagina_id = p.pagina_id and p.idioma_id=\".$idioma_id.\" and s.slide_tipo=\".$tipo;\r\n \r\n $resultado = $this->db->query($sql)->result_array();\r\n return $resultado; \r\n \r\n }", "protected function fetch()\n\t{\n\t\tif(isset($this->total_record_count) && !$this->valid())\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\tlist($page, $total_record_count) = $this->resource->fetchAll($this->url, array(\n\t\t\t'page_number' => $this->key(),\n\t\t\t'page_size' => $this->page_size,\n\t\t\t'sort' => $this->sort,\n\t\t\t'filters' => $this->filters\n\t\t));\n\n\t\tif(is_null($this->total_record_count))\n\t\t{\n\t\t\t$this->total_record_count = $total_record_count;\n\t\t}\n\n\t\tif($this->total_record_count != $total_record_count)\n\t\t{\n\t\t\tthrow new Exception('Concurrent Modification Occurred! The number of remote records changed.');\n\t\t}\n\n\t\treturn $page;\n\t}", "public function pages_list() {\n\n $all_pages = Page::select('id', 'type', 'title', 'heading')->get()->toArray();\n\n $all_pages = count($all_pages) > 0 ? array_chunk($all_pages, 4) : [];\n\n $all_pages = ['success'=>true, 'data'=>$all_pages];\n\n return response()->json($all_pages, 200);\n\n }", "public static function getList($currentPage=0, $order=\"uploadDate DESC\") {\n\t\t\n\t\t$x = $currentPage * NUM_PER_PAGE;\n\t\t$y = $x+NUM_PER_PAGE;\n\n\t\t$conn = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\n\t\t$sql = \"SELECT * FROM images WHERE published = 1 ORDER BY uploadDate DESC LIMIT :x, :y\";\n\n\t\t$st = $conn->prepare($sql);\n\t\t$st->bindValue(\":x\", $x, PDO::PARAM_INT);\n\t\t$st->bindValue(\":y\", $y, PDO::PARAM_INT);\n\t\t$st->execute();\n\t\t$list = array();\n\t\t\n\t\twhile ($row = $st->fetch()) {\n\t\t\t$image = new Image($row);\n\t\t\t$list[] = $image;\n\t\t}\n\t\t\n\t\t$sql = \"SELECT FOUND_ROWS() AS totalRows\";\n\t\t$totalRows = $conn->query($sql)->fetch();\n\t\t$conn = null;\n\t\t//$row = $st->fetch();\n\t\t//return json_encode($row);\n\t\treturn(array(\"results\"=>$list, \"totalRows\"=>$totalRows[0]));\n\t}", "public function articles()\n {\n $get = $this->getGet('pageSize', 'pageNumber');\n $result = Db::sharedDb()->articles($get['pageNumber'], $get['pageSize']);\n\n return $this->successResponse($result);\n }", "public function get_slides_from_meta($slider_metas){\r\n $slides = array();\r\n if(is_array($slider_metas)){\r\n foreach($slider_metas as $slider_meta){\r\n $attachment_id = (int) $slider_meta['id'];\r\n $image_url = wp_get_attachment_url($attachment_id);\r\n $image_url = ($image_url===false) ? '' : $image_url;\r\n $slides[] = $image_url;\r\n }\r\n }\r\n return $slides;\r\n }", "public function getPages()\n {\n return $this->getPosts();\n }", "public function paging() {\n\t\t$pages = ceil($this->count('all') / $this->_page_length);\n\t\t$response = array('pages' => $pages, 'page' => $this->_on_page,'length' => $this->_page_length,'items' => $this->count('all'));\n\t\treturn (object) $response;\t\t\n\t}", "public function getItems()\n {\n $arrLinks = array();\n\n $intNumberOfLinks = floor($this->intNumberOfLinks / 2);\n $intFirstOffset = ($this->intPage - $intNumberOfLinks - 1);\n\n if ($intFirstOffset > 0) {\n $intFirstOffset = 0;\n }\n\n $intLastOffset = ($this->intPage + $intNumberOfLinks - $this->intTotalPages);\n\n if ($intLastOffset < 0) {\n $intLastOffset = 0;\n }\n\n $intFirstLink = ($this->intPage - $intNumberOfLinks - $intLastOffset);\n\n if ($intFirstLink < 1) {\n $intFirstLink = 1;\n }\n\n $intLastLink = ($this->intPage + $intNumberOfLinks - $intFirstOffset);\n\n if ($intLastLink > $this->intTotalPages) {\n $intLastLink = $this->intTotalPages;\n }\n\n for ($i = $intFirstLink; $i <= $intLastLink; $i++) {\n $arrLinks[] = (object) array(\n 'page' => $i,\n 'current' => $i == $this->intPage,\n 'href' => $this->getItemLink($i)\n );\n }\n\n return $arrLinks;\n }", "public function getPaginator()\n {\n return $this->wallpaperMapper->getPaginator();\n }", "public function index()\n {\n //\n return sections::latest()->paginate(5);\n }", "public function GetByPaginated($offset, $limit);", "public function index()\n {\n $galleries = Gallery::with('images','user','comments')->paginate(10);\n\n return response()->json($galleries);\n }", "public function get_pages()\n\t{\n\t\treturn $this->_EE->db->select(array('heading', 'short_name'))\n\t\t\t ->get('exp_dd_doc_sections')\n\t\t\t ->result_array();\n\t}", "public static function getArticles()\n {\n // $url = \"https://n161.tech/api/dummyapi/post?page=1&limit=100\";\n // $curl = curl_init();\n // curl_setopt($curl, CURLOPT_URL, $url);\n // curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n // curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);\n // curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n // $response = curl_exec($curl);\n // $array_data = json_decode($response, true);\n // curl_close($curl);\n // return $array_data;\n return Article::orderBy('updated_at', 'desc')->paginate(5);\n }", "public function getPhotos();", "public function getPageData();", "public function index()\n {\n $sliders=Slider::get();\n return $sliders;\n }", "function getPagedElements() {\n return $this->page_object;\n }", "public function get_pages($args = [])\n {\n global $db, $system;\n /* initialize arguments */\n $user_id = !isset($args['user_id']) ? null : $args['user_id'];\n $offset = !isset($args['offset']) ? 0 : $args['offset'];\n $promoted = !isset($args['promoted']) ? false : true;\n $suggested = !isset($args['suggested']) ? false : true;\n $random = !isset($args['random']) ? false : true;\n $boosted = !isset($args['boosted']) ? false : true;\n $managed = !isset($args['managed']) ? false : true;\n $results = !isset($args['results']) ? $system['max_results_even'] : $args['results'];\n /* initialize vars */\n $pages = [];\n $offset *= $results;\n /* get suggested pages */\n if ($promoted) {\n $get_pages = $db->query(sprintf(\"SELECT * FROM pages WHERE page_boosted = '1' ORDER BY RAND() LIMIT %s\", $system['max_results'])) or _error(\"SQL_ERROR_THROWEN\");\n } elseif ($suggested) {\n $pages_ids = $this->get_pages_ids();\n $random_statement = ($random) ? \"ORDER BY RAND()\" : \"\";\n if (count($pages_ids) > 0) {\n /* make a list from liked pages */\n $pages_list = implode(',', $pages_ids);\n $get_pages = $db->query(sprintf(\"SELECT * FROM pages WHERE page_id NOT IN (%s) \" . $random_statement . \" LIMIT %s, %s\", $pages_list, secure($offset, 'int', false), secure($results, 'int', false))) or _error(\"SQL_ERROR_THROWEN\");\n } else {\n $get_pages = $db->query(sprintf(\"SELECT * FROM pages \" . $random_statement . \" LIMIT %s, %s\", secure($offset, 'int', false), secure($results, 'int', false))) or _error(\"SQL_ERROR_THROWEN\");\n }\n /* get the \"viewer\" boosted pages */\n } elseif ($boosted) {\n $get_pages = $db->query(sprintf(\"SELECT * FROM pages WHERE page_boosted = '1' AND page_boosted_by = %s LIMIT %s, %s\", secure($this->_data['user_id'], 'int'), secure($offset, 'int', false), secure($results, 'int', false))) or _error(\"SQL_ERROR_THROWEN\");\n /* get the \"taget\" all pages who admin */\n } elseif ($managed) {\n $get_pages = $db->query(sprintf(\"SELECT pages.* FROM pages_admins INNER JOIN pages ON pages_admins.page_id = pages.page_id WHERE pages_admins.user_id = %s ORDER BY page_id DESC\", secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n /* get the \"viewer\" pages who admin */\n } elseif ($user_id == null) {\n $get_pages = $db->query(sprintf(\"SELECT pages.* FROM pages_admins INNER JOIN pages ON pages_admins.page_id = pages.page_id WHERE pages_admins.user_id = %s ORDER BY page_id DESC LIMIT %s, %s\", secure($this->_data['user_id'], 'int'), secure($offset, 'int', false), secure($results, 'int', false))) or _error(\"SQL_ERROR_THROWEN\");\n /* get the \"target\" liked pages*/\n } else {\n /* get the target user's privacy */\n $get_privacy = $db->query(sprintf(\"SELECT user_privacy_pages FROM users WHERE user_id = %s\", secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n $privacy = $get_privacy->fetch_assoc();\n /* check the target user's privacy */\n if (!$this->check_privacy($privacy['user_privacy_pages'], $user_id)) {\n return $pages;\n }\n $get_pages = $db->query(sprintf(\"SELECT pages.* FROM pages INNER JOIN pages_likes ON pages.page_id = pages_likes.page_id WHERE pages_likes.user_id = %s LIMIT %s, %s\", secure($user_id, 'int'), secure($offset, 'int', false), secure($results, 'int', false))) or _error(\"SQL_ERROR_THROWEN\");\n }\n if ($get_pages->num_rows > 0) {\n while ($page = $get_pages->fetch_assoc()) {\n $page['page_picture'] = get_picture($page['page_picture'], 'page');\n /* check if the viewer liked the page */\n $page['i_like'] = $this->check_page_membership($this->_data['user_id'], $page['page_id']);\n $pages[] = $page;\n }\n }\n return $pages;\n }", "function get_data_slider()\n\t\t{\n\t\t\t$query = $this->db->query(\"SELECT * FROM `slider`\");\n\t\t\n\t\t\t$indeks = 0;\n\t\t\t$result = array();\n\t\t\t\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$result[$indeks++] = $row;\n\t\t\t}\n\t\t\n\t\t\treturn $result;\n\t\t}", "public function fetchData()\n {\n if (null === $this->data) {\n $adaptable = $this->getAdaptable();\n if ($adaptable instanceof \\ArrayObject) {\n $this->data = $adaptable->getArrayCopy();\n } else {\n $this->data = (array) $adaptable;\n }\n\n $page = $this->getPageNumber() - 1;\n $limit = $this->getItemsPerPage();\n $this->data = array_splice($this->data, $page * $limit, $limit);\n }\n }", "function getPaging($refUrl, $aryOpts, $pgCnt, $curPg) {\n $return = '';\n $return.='<div class=\"box-bottom\"><div class=\"paginate\">';\n if ($curPg > 1) {\n $aryOpts['pg'] = 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">First</a>';\n\n $aryOpts['pg'] = $curPg - 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Prev</a>';\n }\n for ($i = 1; $i <= $pgCnt; $i++) {\n $aryOpts['pg'] = $i;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\" class=\"';\n if ($curPg == $i)\n $return.='active';\n $return.='\" >' . $i . '</a>';\n }\n if ($curPg < $pgCnt) {\n $aryOpts['pg'] = $curPg + 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Next</a>';\n $aryOpts['pg'] = $pgCnt;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Last</a>';\n }\n $return.='<div class=\"clearfix\"></div></div></div>';\n return $return;\n}", "public function index()\n {\n return Article::latest()->paginate(20);\n }", "public function read()\n {\n return Contest::paginate(5);\n }", "function fetchAllPages() {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT id, page, private FROM pages ORDER BY id DESC\");\n\t$pages = $query->results();\n\t//return $pages;\n\n\tif (isset($row)){\n\t\treturn ($row);\n\t}else{\n\t\treturn $pages;\n\t}\n}", "public function getPaginator()\r\n {\r\n return $this->photoMapper->getPaginator();\r\n }", "public function getPage() {}", "public function getPage() {}", "public function index()\n {\n $slides = $this->SlideModel->all();\n\n return view('admin.slide_list', compact('slides'));\n }", "function getPageBanners($id) {\n $this->db->select(\"*\");\n $this->db->where(\"pageID\", $id);\n $this->db->order_by(\"slideOrder ASC\");\n \t$query = $this->db->get('banner');\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n return array();\n }", "public function getIndex()\n {\n $slides = Slides::where('active', '=', 1)->get();\n $carousel_slides = \"\";\n $carousel_html = \"\";\n if(!is_null($slides)){\n Log::info(\"Slides Found Not Using Default\");\n foreach($slides as $slide){\n $attributes = json_decode($slide->attributes);\n $speed = $attributes->speed * 1000;\n $carousel_slides .= \"<li\n data-transition='{$attributes->transition}'\n data-slotamount='{$attributes->slots}'\n data-masterspeed='{$speed}'>\n <!-- MAIN IMAGE -->\n <img src='/{$slide->file}'\n alt='slidebg1'\n data-bgfit='{$attributes->bg_fit}'\n data-bgrepeat='{$attributes->bg_repeat}'\n style='background-color: {$attributes->bg_color}'\n />\n </li>\";\n }\n }\n else{\n $carousel_slides = 0;\n Log::info(\"Using Default Carousel\");\n }\n # Get all Product Categories\n $categories = DB::select( DB::raw('SELECT\n DISTINCT `id`\n FROM\n `categories`'\n )\n );\n $product_listing = array();\n foreach($categories as $category){\n\n # Get lastest Product Added To Product + Image\n $product_query = DB::select( DB::raw(\"SELECT\n `products`.*,\n (\n SELECT\n `file`\n FROM\n `product_images`\n WHERE\n `product_images`.`product_id` = `products`.`id`\n ORDER BY\n `order` ASC\n LIMIT\n 1\n ) as file\n FROM\n `products`\n WHERE\n `products`.`category_id` = '{$category->id}'\n ORDER BY\n `products`.`created_at` DESC\n LIMIT\n 1\"\n )\n );\n $product_listing[] = $product_query;\n }\n\n # Convert Array to Object\n $product_data = (object)$product_listing;\n\n if(!is_null($product_data))\n {\n return View::make('home')->with('products',$product_data)->with(\"slides\",$carousel_slides);\n }\n else\n {\n $product_data = array();\n return View::make('home')->with('products',$product_data)->with(\"slides\",$carousel_slides);\n }\n }", "public function index()\n {\n // return collection of articles\n return ArticleResource::collection(Article::orderBy('created_at', 'desc')->paginate(6));\n }", "public function index()\n {\n $posts = Post::paginate(15);\n return $posts;\n }", "public function index()\n {\n if(Gate::denies('slides-view')){\n abort(403,\"Não autorizado!\");\n }\n\n $slides = Slide::where('deleted','=','N')->orderBy('order')->paginate(5);\n return view('painel.slides.index',compact('slides', 'form'));\n }", "public function getAllTheVideos($offset,$photos_per_page){\n\t\t try{\n\t\t $conn = DBConnection::GetConnection();\t\n\t\t\t$myquery= \"SELECT video_id,video_name,video_image,url,release_id from video LIMIT $offset,$photos_per_page\";\n\t\t\t$result= $conn->query($myquery);\n\t\t\t$videos=array();\n\t\t\tforeach($result as $video){\n\t\t\t\t$v1=new Video();\n\t\t\t\t$v1->setVideoId($video[\"video_id\"]);\n\t\t\t\t$v1->setVideoName($video[\"video_name\"]);\n\t\t\t\t$v1->setVideoImage($video[\"video_image\"]);\n\t\t\t\t$v1->setUrl($video[\"url\"]);\n\t\t\t\t$v1->setReleaseId($video[\"release_id\"]);\n\t\t\t\tarray_push($videos,$v1);\t\t\t\t\n\t\t\t}\n\t\t\t$conn =null;//To close the connection \n\t\t\treturn $videos;\n\t\t }catch(PDOException $e){\n\t\t\t echo 'Fail to connect';\n\t\t\t echo $e->getMessage();\n\t\t }\n }", "public function galleries(){\n\n $parameters = [\n 'sort' => 'position',\n 'sort_direction' => 'asc',\n 'page' => 1,\n 'cover_size' => 4,\n 'rpp' => 40\n ];\n\n $data = $this->api->get_galleries($parameters);\n\n return $data['galleries'];\n }", "public function index()\n {\n return Gallery::latest()->with('images','user','comments.user')->paginate(6);\n }", "public function get_imgs(){\n\t\treturn $this->db->select()->from(\"slide\")->get()->result();\n\t}", "public function index()\n {\n return Press::sorted()->paginate(6);\n }", "public function index()\n {\n return Container::paginate();\n }", "public function getSlideItems(Request $request) {\n $slideshow_image_id = $request['image'];\n\n $items = SlideShowItem::where('slide_show_image_id', $slideshow_image_id)->get();\n\n return view('admin::admin.layouts.slideshow-item-editable', compact(['items', 'slideshow_image_id']));\n }" ]
[ "0.6874107", "0.6742782", "0.6700479", "0.64704734", "0.6461192", "0.64561254", "0.6413705", "0.6401697", "0.6321626", "0.6203791", "0.618617", "0.6172811", "0.6135084", "0.6093218", "0.60679615", "0.6015203", "0.6014194", "0.5975106", "0.59717023", "0.597073", "0.5970278", "0.59581405", "0.59570515", "0.5950912", "0.5945522", "0.59154147", "0.58921367", "0.58914626", "0.5871017", "0.5869185", "0.5855101", "0.58337235", "0.5820668", "0.58033246", "0.57997185", "0.578649", "0.57800597", "0.57780904", "0.5763515", "0.57508546", "0.57280695", "0.5723546", "0.5704808", "0.567724", "0.56685406", "0.56643873", "0.565812", "0.5657017", "0.56517434", "0.5644327", "0.5636787", "0.5626125", "0.5623279", "0.5620676", "0.56151104", "0.5606799", "0.5605133", "0.560505", "0.55943936", "0.5581296", "0.55769825", "0.5574244", "0.55673075", "0.5565989", "0.5561871", "0.5560696", "0.55591935", "0.55505973", "0.5548477", "0.55453616", "0.5540088", "0.553272", "0.55219644", "0.55211496", "0.5519282", "0.55103886", "0.5504439", "0.54982936", "0.5495318", "0.54908204", "0.548487", "0.54829895", "0.5479718", "0.5477459", "0.5473203", "0.5472481", "0.5472481", "0.54699653", "0.5469616", "0.54683214", "0.546708", "0.5465647", "0.54623723", "0.54563904", "0.54471815", "0.54397744", "0.5427881", "0.5424575", "0.5423515", "0.542228" ]
0.7377342
0
Fetch rotator and return as array
public function fetchRotator($id) { if ($id != NULL && is_numeric($id)) : $select = $this->registry->db->select() ->from(array('r' => 'rotators')) ->where('r.rot_id = ?', $id) ->limit(1,0); $rotator = $this->registry->db->fetchall($select); return $rotator['0']; else : throw new Exception('Invalid rotator id'); endif; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRotation()\n {\n return self::accessPgArray($this->rotation);\n }", "public static function getRotasPermitidas(){\n $usucpf = $_SESSION['usucpf'];\n $sisid = $_SESSION['sisid'];\n $perfis = $_SESSION['perfil'][$usucpf][$sisid];\n\n $arrTmp = array();\n if(!empty($perfis)){\n $rotas = Rota::select('ds_rota')\n ->join('seguranca.tb_rota_perfil','seguranca.tb_rota_perfil.co_rota','=','seguranca.tb_rota.co_rota')\n ->where('sisid',$sisid)\n ->where('seguranca.tb_rota_perfil.st_habilitado',true)\n ->whereIn('seguranca.tb_rota_perfil.pflcod',$perfis)->get();\n\n\n\n if(!empty($rotas)){\n foreach ($rotas as $rota)\n $arrTmp[] = $rota->ds_rota;\n }\n }\n return $arrTmp;\n }", "public function getRotation() {}", "public function getRotation() {}", "function fetchRuta() {\n\n $rutas = array();\n\n $con = new DB();\n $sql = $con->prepare(\"SELECT * FROM ruta\");\n $result = $con->executeQuery($sql);\n\n foreach ($result as $row) {\n $id = $row['id'];\n $nombre = $row['nombre'];\n $descripcion = $row['descripcion'];\n $id_usuario = $row['id_usuario'];\n $ruta = new Ruta($id, $nombre, $descripcion, $id_usuario);\n array_push($rutas, $ruta);\n }\n\n return $rutas;\n }", "public function fetchRotators($params = NULL)\n\t{\n \t$select = $this->registry->db->select();\n \t$select->from(array('r' => 'rotators'));\n \t$select->order('r.rot_name ASC');\n \t\n \tif(isset($params['page']) && is_numeric($params['page'])) :\n \t\t$pagenum = $params['page'];\n \telse :\n \t\t$pagenum = 1;\n \tendif;\n \t\n \tif(isset($params['items']) && is_numeric($params['items'])) :\n \t\t$items = $params['items'];\n \telse :\n \t\t$items = 15;\n \tendif;\n \t\n \tif(isset($params['range']) && is_numeric($params['range'])) :\n \t\t$range = $params['range'];\n \telse :\n \t\t$range = 5;\n \tendif;\n \t\n \t$paginator = Zend_Paginator::factory($select);\n\t\t$paginator->setCurrentPageNumber($pagenum);\n\t\t$paginator->setItemCountPerPage($items);\n\t\t$paginator->setPageRange($range);\n\t \n \treturn $paginator;\n\t}", "public function recuperar(): array {\r\n \r\n $autorDao = new AutorDao();\r\n \r\n $livros = [];\r\n $query = \"SELECT livro.*, editora.nome \"\r\n . \"FROM livro \"\r\n . \"INNER JOIN editora ON \"\r\n . \"editora.id = livro.editora_id\";\r\n \r\n $statement = $this->pdo->prepare($query);\r\n $statement->execute();\r\n while($registro = $statement->fetch(\\PDO::FETCH_LAZY)){\r\n $livro = $this->hydrate((array) $registro);\r\n $livro->autores = $autorDao->recuperarPorLivro($livro->id);\r\n $livros[] = $livro;\r\n }\r\n return $livros;\r\n }", "public function GuardandoRotaciones($arraydatos){\n global $userid,$db;\n //$arraydatos[\"idrotacion\"]=$this->GuardarNuevaRotacion($arraydatos);\n $a_vectt=$this->GuardarNuevaRotacionEstudiante($arraydatos); \n return $a_vectt;\n }", "public function get()\n {\n $this->plasma = $this->load->database('plasma', TRUE);\n $this->plasma->order_by('descripcion', 'asc');\n $query = $this->plasma->get('rol');\n return $query->result_array();\n }", "public function getAuthInfoArray() {}", "public function getAuthDataFromResponse(): array;", "abstract public function spin(): array;", "public function read()\n {\n $data = array();\n // $result contains the output string\n $result = json_decode(curl_exec($this->connection));\n\n if($result){\n // Cycle through results\n foreach ($result as $row){\n $entity = new Vacancy($row);\n $data[] = $entity;\n }\n }\n return $data;\n }", "Function rotate($data, $length, $steps){\n$index=0;\n $result=array();\n for($i=$steps+1;$i<$length;$i++){\n $result[$index]=$data[$i];\n $index++;\n }\n for ($i=0;$i<=$steps;$i++){\n $result[$index]=$data[$i];\n $index++;\n }\n return $result;\n}", "public function toArray(): array\n {\n return $this->rut;\n }", "private function getSequence(): array\n {\n $ping = $this->results;\n\n $items_count = count($ping);\n\n // First remove items from final of the array\n for ($i = 6; $i > 0; $i--) {\n unset($ping[$items_count - $i]);\n }\n\n // Then remove first items\n unset($ping[1]);\n unset($ping[0]);\n\n $key = 0;\n\n $sequence = [];\n\n foreach ($ping as $row) {\n $sequence[$key] = $row;\n\n $key++;\n }\n\n return $sequence;\n }", "public function getAsArray();", "public function getOrientation()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ORIENTATION, $payload);\n\n $payload = unpack('v1roll/v1pitch/v1yaw', $data);\n\n $result['roll'] = IPConnection::fixUnpackedInt16($payload['roll']);\n $result['pitch'] = IPConnection::fixUnpackedInt16($payload['pitch']);\n $result['yaw'] = IPConnection::fixUnpackedInt16($payload['yaw']);\n\n return $result;\n }", "public function getAsArray()\n\t{\n\t\t\n\t\t$path = $this->get();\n\t\t\n\t\treturn self::toArray($path);\n\t\t\n\t}", "function getAdmittedRolesArray() {\n\n if ($this->connectToMySql()) {\n $query = sprintf(\"SELECT id_ruolo, ruolo FROM scuola.ruoli_utenti ORDER BY id_ruolo\");\n\n // Perform Query\n $result = mysql_query($query);\n //$array = mysql_fetch_assoc($result);\n }\n $this->closeConnection();\n return $result;\n }", "public function get(): array;", "public function get(): array;", "public function read(): array;", "public function gets() {\r\n $query = $this->db->query(\"SELECT o.*, f.fabrica, p.producto, a.articulo, a.posicion, pl.idplano, pl.plano, pl.revision\r\n FROM ((((ots o INNER JOIN fabricas f ON o.idfabrica = f.idfabrica AND o.activo = '1')\r\n INNER JOIN articulos a ON a.idarticulo = o.idarticulo)\r\n INNER JOIN productos p ON a.idproducto = p.idproducto)\r\n LEFT JOIN planos pl ON a.idplano = pl.idplano)\r\n ORDER BY\r\n o.numero_ot DESC\");\r\n \r\n return $query->result_array();\r\n }", "public static function get():array{\n $consulta=\"SELECT a.id AS idAccion, a.codigo AS codigoAcc, a.nombre AS nombreAcc,m.* \n\t\t\t\t\tFROM acciones a \n\t\t\t\t\t\tINNER JOIN modulos_acciones md ON a.id=md.idAccion\n\t\t\t\t\t RIGHT JOIN modulos m ON idModulo= m.id\"; //preparar la consulta\n return DB::selectAll($consulta,'Modulo');\n }", "public function asArray() : array\n {\n return $this->card;\n }", "abstract public function getArray();", "function read()\n\t{\n\t\t$content = $this->storage->read();\n\t\t$data = array();\n\t\tforeach($content['data'] as $key=>$value) {\n\t\t\t$storage = new \\Zentric\\Storage(array(\n\t\t\t\t'key' => $key\n\t\t\t\t, 'folder' => STORAGE\n\t\t\t\t, 'driver' => 'Array'\t\t\t\n\t\t\t));\t\t\t\n\t\t\t$data[] = $storage->read();\t\t\t \n\t\t}\n\t\treturn $data;\n\t}", "function rotate ($arr)\n{//rotate function is called in the right sidebar - an example of rotation (on day of month)\n\tif(is_array($arr))\n\t{//Generate item in array using date and modulus of count of the array\n\t\treturn $arr[((int)date(\"j\")) % count($arr)];\n\t}else{\n\t\treturn $arr;\n\t}\n}", "function rotate ($arr)\n{//rotate function is called in the right sidebar - an example of rotation (on day of month)\n\tif(is_array($arr))\n\t{//Generate item in array using date and modulus of count of the array\n\t\treturn $arr[((int)date(\"j\")) % count($arr)];\n\t}else{\n\t\treturn $arr;\n\t}\n}", "public function get() : array;", "public function fetchClassArm(){\t\t\t\n\t\t\t$query = $this->connection()->prepare(\"SELECT * FROM class_arm\");\n\t\t\t$query->execute();\n\t\t\treturn $query->fetchAll();\n\t\t}", "public function getRut(): array\n {\n return $this->rut;\n }", "function getArray();", "public function arr() {\n\t\t\treturn \\uri\\generate::to_array($this->object);\n\t\t}", "function toArray() ;", "function toArray() ;", "function obtenerArray(){\r\n\t\treturn mysql_fetch_array( $this->rs() );\r\n\t}", "public function getResponse(): array;", "public function fetch_array()\n\t{\n\t\t$array = array();\n\t\tif (current($this->result)) {\n\t\t\tforeach (current($this->result) AS $value) {\n\t\t\t\t$array[] = $value;\n\t\t\t}\n\t\t\tforeach (current($this->result) AS $key => $value) {\n\t\t\t\t$array[$key] = $value;\n\t\t\t}\n\t\t}else {\n\t\t\t$array = FALSE;\n\t\t}\n\t\tnext($this->result);\n\t\treturn $array;\n\t}", "public function to_array() /*array*/\n {\n return $_SESSION[self::KEY];\n }", "public abstract function FetchArray();", "private function resultToArray($res) {\r\n\r\n $lista = array();\r\n $i = 0;\r\n\r\n\t\t\tif($this->response) {\r\n\r\n\t while ($fila = mysql_fetch_assoc($this->response)) {\r\n\t $lista[$i] = $fila;\r\n\t $i = $i + 1;\r\n\t }\r\n\r\n\t\t\t}\r\n\r\n return $lista;\r\n\r\n }", "public function fetchArray();", "public function fetchArray();", "public function read(){\n $sql = 'SELECT * FROM wp_operatore_museale';\n $result = $this->conn->query($sql);\n $operatori = array();\n $i = 0;\n if($result->num_rows > 0){\n while($row = $result->fetch_assoc()){\n $operatore = new OperatoreMuseale($row['id_operatore_museale'], $row['nome'], $row['username'], $row['password'], $row['email'], $row['museo']);\n $operatori[$i] = $operatore;\n $i++;\n }\n }\n return $operatori;\n }", "public function getRol()\n {\n $roles = array();\n $abmUR = new abmUsuarioRol();\n $abmR = new abmRol();\n $uss = $this->getUsuario();\n $list = $abmUR->buscar(['idUsuario' => $uss->getIdUsuario()]);\n\n if (count($list) > 0) {\n foreach ($list as $UR) {\n $objRol = $abmR->buscar(['idRol' => $UR->getObjRol()->getIdRol()]);\n\n array_push($roles, $objRol[0]);\n }\n }\n return $roles;\n }", "function toArray() {\n # This may use up all your RAM if you aren't careful.\n $arr = array();\n while (($i = $this->next()) !== NULL) {\n $arr[] = $i;\n }\n return $arr;\n }", "function unity_query_r_gen() {\r\n $count = 1;\r\n $encoded_avatars = func_arg(0);\r\n\r\n $pairs = explode(\".\", $encoded_avatars);\r\n \r\n $result = array();\r\n \r\n foreach ($pairs as $avatar) {\r\n $ret = generate_redeem_avatar($avatar, $count);\r\n $result[] = $ret;\r\n }\r\n \r\n return json_encode($result);\r\n}", "public function read(): array\n {\n }", "public function read(): array\n {\n }", "public function fetchArray() : array\n\t{\n\t\treturn $this->handle->fetchArray($this->result);\n\t}", "public function index ()\n {\n $json = $this->publisher->orderByRaw('RAND()')->with(['orientation'])->get();\n $json = $json->groupBy('orientation.type');\n\n return $json;\n }", "function FetchArray() {\n\t\t\t$this->ConnectServer();\n\t\t\t$array = pg_fetch_array($this->result, NULL, PGSQL_ASSOC);\n\t\t\t$this->DisconnectServer();\n\t\t\treturn $array;\n\t\t}", "public function gets() {\r\n $query = $this->db->query(\"SELECT *\r\n FROM\r\n articulos a,\r\n productos p\r\n WHERE\r\n a.idproducto = p.idproducto AND\r\n a.activo = '1'\r\n ORDER BY\r\n a.articulo\");\r\n return $query->result_array();\r\n }", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "abstract protected function initRotues();", "function Array_Get_Trabajadores()\n{\n\n\t$clubs = consultar(\"SELECT `id_trabajadores`, `nombre`, `apellido` FROM `tb_trabajadores` order by apellido \");\t\n\n\n\t$datos = array();\n\twhile ($valor = mysqli_fetch_array($clubs)) {\n\t\t$id_trabajadores = $valor['id_trabajadores'];\n\t\t$nombre = $valor['nombre'];\n\t\t$apellido = $valor['apellido'];\n\n\n\t\t$vector = array(\n\t\t\t'id_trabajadores'=>\"$id_trabajadores\",\n\t\t\t'nombre'=>\"$nombre\",\n\t\t\t'apellido'=>\"$apellido\"\n\n\t\t\t);\n\t\tarray_push($datos, $vector);\n\t}\n\n\treturn $datos;\t\n}", "function getCamPlaybacksResult() {\n\treturn db_query(\"SELECT nodename, recordfolder FROM Playbacks\");\n}", "public function readAutores()\n\t{\n\t\t$sql = 'SELECT idAutor, nombre, apellido, pais FROM autor ORDER BY idAutor';\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}", "public function plazo_restante_derivaciones(){\r\n //Tomamos los datos de la persona logueada\r\n $usuario_logueado = $this->datos_persona_logueada();\r\n foreach ($usuario_logueado as $usuario) {\r\n $id_cargo_logueado = $usuario->id_cargo;\r\n }\r\n\r\n //Tomamos las derivaciones recibidas del usuario logueado\r\n $derivaciones = $this->derivaciones_recibidas();\r\n\r\n //Tomamos la fecha actual\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n\r\n $array_plazo = array();\r\n\r\n //Obtenemos el plazo para obtener el tiempo restante de cada derivacion, armamos un array y lo mandamos\r\n foreach ($derivaciones as $derivacion) {\r\n $plazo = $derivacion->plazo;\r\n $fecha_creacion = $derivacion->fecha_creacion;\r\n\r\n //Ponemos en el formato correcto\r\n $fecha_creacion = Carbon::parse($fecha_creacion);\r\n\r\n //Restamos la fecha actual menos la de envio\r\n $dif_fechas = $fecha_creacion->diffInDays($hoy);\r\n\r\n //Verificamos el plazo restante\r\n $plazo_restante = $plazo - $dif_fechas;\r\n\r\n //Agregamos al array\r\n $array_plazo[] = $plazo_restante;\r\n }\r\n\r\n return $array_plazo;\r\n }", "public function getResponse() : array;", "public function getContents()\n {\n $all = $this->redis->zRange('prd', 0, -1);\n\n return array_map(function($i)\n {\n return unserialize($i);\n }, $all);\n }", "function get() {\r\n\t\tif ($array = @mysql_fetch_array($this->result, MYSQL_ASSOC)) return $array;\r\n\t\telse return false;\t\t\r\n\t}", "public function fetch_array() {\n\t\treturn $this->FetchArray();\n\t}", "function getRaces(){\n\t$JSONObj = file_get_contents(\"Races.json\");\n\t$JSONArray = json_decode($JSONObj, true);\n\t$RacesArray;\n#\tvar_dump($JSONArray);\n\t$RacesArray = $JSONArray['races'];\n\treturn $RacesArray;\n}", "public function get(): array\n {\n \n }", "public function getAkas() {\n if (true === $this->isReady) {\n // Does a cache of this movie exist?\n $sCacheFile = $this->sRoot . '/cache/' . md5($this->iId) . '_akas.cache';\n $bUseCache = false;\n\n if (is_readable($sCacheFile)) {\n $iDiff = round(abs(time() - filemtime($sCacheFile)) / 60);\n if ($iDiff < $this->iCache || false) {\n $bUseCache = true;\n }\n }\n\n if ($bUseCache) {\n $aRawReturn = file_get_contents($sCacheFile);\n $aReturn = unserialize($aRawReturn);\n\n return IMDBHelper::arrayOutput($this->bArrayOutput, $this->sSeparator, self::$sNotFound, $aReturn);\n } else {\n $fullAkas = sprintf('http://www.imdb.com/title/tt%s/releaseinfo', $this->iId);\n $aCurlInfo = IMDBHelper::runCurl($fullAkas);\n $sSource = $aCurlInfo['contents'];\n\n if (false === $sSource) {\n if (true === self::IMDB_DEBUG) {\n echo '<pre><b>cURL error:</b> ' . var_dump($aCurlInfo) . '</pre>';\n }\n\n return false;\n }\n\n $aReturned = IMDBHelper::matchRegex($sSource, \"~<td>(.*?)<\\/td>\\s+<td>(.*?)<\\/td>~\");\n\n if ($aReturned) {\n $aReturn = array();\n foreach ($aReturned[1] as $i => $strName) {\n if (strpos($strName, '(') === false) {\n $aReturn[] = array('title' => IMDBHelper::cleanString($aReturned[2][$i]),\n 'country' => IMDBHelper::cleanString($strName));\n }\n }\n\n file_put_contents($sCacheFile, serialize($aReturn));\n\n return IMDBHelper::arrayOutput($this->bArrayOutput, $this->sSeparator, self::$sNotFound, $aReturn);\n }\n }\n }\n\n return IMDBHelper::arrayOutput($this->bArrayOutput, $this->sSeparator, self::$sNotFound);\n }", "public function getReplayResults()\n {\n return $this->replay_results;\n }", "public function rotate()\n {\n // not possible in php?\n }", "public function toArray()\n {\n return $this->fetchData;\n }", "public function getDataprotArray() {\n\t\t$arr = array();\n\t\t$ds = $this->getDataprotXML();\n\t\tif (strlen($ds) > 1) {\n\t\t\t$arr = GeneralUtility::xml2array($ds);\n\t\t}\n\n\t\treturn $arr;\n\t}", "public function fetch(){\n $qry = $this->db->query(\"SELECT * FROM \".$this->tbl_specialOffers);\n $array = array();\n while($r = $qry->fetch_assoc()){\n $array[] = new ArrToObj($r) ;\n }\n if(count($array) > 0){\n return $array;\n }else{\n return null ;\n }\n }", "function load_portfolio_array () {\n $portfolio = json_decode(stripslashes($_COOKIE[\"portfolio\"]));\n $result = array();\n foreach ($portfolio as $object) {\n $result[] = (array) $object;\n }\n return $result;\n}", "abstract protected function toArray();", "public function rotateBy($rotation) {}", "public function getInternalArray() {}", "private static function getArmor(): array\n {\n return [\n PlayerEquipment::create('No armor', 0, 0, 0),\n\n PlayerEquipment::create('Leather', 13, 0, 1),\n PlayerEquipment::create('Chainmail', 31, 0, 2),\n PlayerEquipment::create('Splintmail', 53, 0, 3),\n PlayerEquipment::create('Bandedmail', 75, 0, 4),\n PlayerEquipment::create('Platemail', 102, 0, 5),\n\n ];\n }", "public function getArray()\n {\n return $this->get(self::_ARRAY);\n }", "public function getLastRoll(): array\n {\n return $this->result;\n }", "public function getReplay()\n {\n return $this->get(self::_REPLAY);\n }", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();" ]
[ "0.64496", "0.60473377", "0.58581704", "0.5856109", "0.5747421", "0.5529521", "0.5526295", "0.5508594", "0.5403864", "0.54000205", "0.53869605", "0.53606033", "0.5348937", "0.5344911", "0.5332998", "0.53192157", "0.5307372", "0.53050417", "0.52944946", "0.5268138", "0.52050066", "0.52050066", "0.51818854", "0.5174234", "0.51093256", "0.51028687", "0.5076435", "0.50698864", "0.5047335", "0.5047335", "0.5042731", "0.50250643", "0.5003673", "0.49965322", "0.4990959", "0.4989449", "0.4989449", "0.4987067", "0.4984409", "0.49828747", "0.49810836", "0.49554077", "0.49498925", "0.49496573", "0.49496573", "0.492981", "0.4919667", "0.49094486", "0.49090636", "0.49070215", "0.49070215", "0.49044463", "0.49008772", "0.48955914", "0.48902896", "0.48886216", "0.48886216", "0.48886216", "0.48886216", "0.48872733", "0.48872733", "0.48872665", "0.48872665", "0.48872665", "0.48872665", "0.48872665", "0.48872665", "0.48872665", "0.48872665", "0.48872665", "0.48872665", "0.48851824", "0.48774755", "0.48753625", "0.4872328", "0.48702288", "0.48689914", "0.4865186", "0.48621768", "0.4861522", "0.48467293", "0.48411578", "0.483968", "0.48303643", "0.48219344", "0.48206574", "0.48186556", "0.4815475", "0.48120013", "0.48077163", "0.48067674", "0.48064727", "0.48050088", "0.4801176", "0.47966146", "0.47946608", "0.479333", "0.479333", "0.479333", "0.479333" ]
0.5978086
2
Fetch slide and return as array
public function fetchSlide($id) { if ($id != NULL && is_numeric($id)) : $select = $this->registry->db->select() ->from(array('s' => 'rotators_slides')) ->where('s.rots_id = ?', $id) ->limit(1,0); $slide = $this->registry->db->fetchall($select); return $slide['0']; else : throw new Exception('Invalid slide id'); endif; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_featured_slider() {\n $sql = \"SELECT * FROM slider WHERE publish='1'\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "function get_slider() {\n $sql = \"SELECT * FROM slider\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "public function getSlides()\n {\n return Slide::all();\n }", "public function getNewestSlides()\n {\n $returnValue = array();\n\n // section -64--88-0-2--2405a564:15f260ff61f:-8000:0000000000000B96 begin\n $this->Database = new Database();\n $sql = $this->Database->prepare(\"SELECT * FROM hopetrac_main.inspiration_quotes ORDER BY id DESC LIMIT 0,10\");\n $sql->setFetchMode(PDO::FETCH_ASSOC);\n $sql->execute();\n\n $returnValue = $sql->fetchAll();\n // section -64--88-0-2--2405a564:15f260ff61f:-8000:0000000000000B96 end\n\n return (array) $returnValue;\n }", "public function getAllSlides(){\n\t\ttry{\n\t\t\tif($this->_apc && apc_exists($this->apc_slide_list_total)){\n\t\t\t\t$slides = apc_fetch($this->apc_slide_list_total);\n\t\t\t}else{\t\t\n\t\t\t\t$sql = \"SELECT * FROM slide\";\n\t\t\t\t$stmt = $this->_db->prepare($sql);\n\t\t\t\t$stmt->execute();\n\t\t\t\tif($stmt->errorCode() != 0){\n\t\t\t\t\t$error = $stmt->errorInfo();\n\t\t\t\t\tthrow new SQLException($error[2], $error[0], $sql, \"Impossible d'obtenir la liste des slides actifs.\");\n\t\t\t\t}\n\t\t\t\t$slides = array();\n\t\t\t\twhile ($data = $stmt->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t\t$slides[] = new Slide($data);\n\t\t\t\t}\n\t\t\t\tif($this->_apc){\n\t\t\t\t\tapc_store($this->apc_slide_list_total, $slides, 86000);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $slides;\n\t\t}catch(PDOException $e){\n\t\t\tthrow new DatabaseException($e->getCode(), $e->getMessage(), \"Impossible d'obtenir la liste des slides actifs.\");\n\t\t}\n\t}", "private function fill_slider(){\n\t\tglobal $DB;\n\t\t$slides= \"SELECT * FROM {theme_archaius} ORDER BY position ASC\";\n\t $slides= $DB->get_records_sql($slides);\n\t return $slides;\n\t}", "function get_all_slide()\r\n {\r\n \r\n \r\n $slide = $this->db->query(\"\r\n SELECT\r\n *\r\n\r\n FROM\r\n slide \r\n\r\n ORDER BY `slide_id` DESC\r\n\r\n \")->result_array();\r\n\r\n return $slide;\r\n }", "public function convertToArray()\n {\n $data = array(\n $this->theme->getOption('ef-slide-img'),\n $this->theme->getOption('ef-slide-title'),\n $this->theme->getOption('ef-slide-caption'),\n $this->theme->getOption('ef-slide-link'),\n $this->theme->getOption('ef-slide-position'),\n );\n\n $count = count(Serializer::unserialize($this->theme->getOption('ef-slide-img')));\n\n return $convertedData = Serializer::merge($data, $count);\n }", "protected function buildSlides() {\n $this->sortSlidesByWeight();\n\n $slides = [];\n foreach ($this->configuration['slides'] as $slide) {\n if ($slide['mid'] !== NULL) {\n $slides[] = [\n 'image' => $this->fileUrlFromMediaId($slide['mid']),\n 'caption' => $slide['caption'],\n ];\n }\n }\n return $slides;\n }", "function get_data_slider()\n\t\t{\n\t\t\t$query = $this->db->query(\"SELECT * FROM `slider`\");\n\t\t\n\t\t\t$indeks = 0;\n\t\t\t$result = array();\n\t\t\t\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$result[$indeks++] = $row;\n\t\t\t}\n\t\t\n\t\t\treturn $result;\n\t\t}", "function get_slider_item() {\n $picture = $this->db->order_by(\"act\", \"desc\")->get('slider');\n return $picture->result_array();\n }", "public function index()\n {\n $user = Auth::user();\n\n return $user->slides()->get();\n }", "public function getActiveSlides(){\n\t\ttry{\n\t\t\tif($this->_apc && apc_exists($this->apc_slide_list_active)){\n\t\t\t\t$slides = apc_fetch($this->apc_slide_list_active);\n\t\t\t}else{\t\t\n\t\t\t\t$sql = \"SELECT * FROM slide WHERE isactive = '1'\";\n\t\t\t\t$stmt = $this->_db->prepare($sql);\n\t\t\t\t$stmt->execute();\n\t\t\t\tif($stmt->errorCode() != 0){\n\t\t\t\t\t$error = $stmt->errorInfo();\n\t\t\t\t\tthrow new SQLException($error[2], $error[0], $sql, \"Impossible d'obtenir la liste des slides actifs.\");\n\t\t\t\t}\n\t\t\t\t$slides = array();\n\t\t\t\twhile ($data = $stmt->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t\t$slides[] = new Slide($data);\n\t\t\t\t}\n\t\t\t\tif($this->_apc){\n\t\t\t\t\tapc_store($this->apc_slide_list_active, $slides, 86000);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $slides;\n\t\t}catch(PDOException $e){\n\t\t\tthrow new DatabaseException($e->getCode(), $e->getMessage(), \"Impossible d'obtenir la liste des slides actifs.\");\n\t\t}\n\t}", "public function get_imgs(){\n\t\treturn $this->db->select()->from(\"slide\")->get()->result();\n\t}", "public function getImages()\n {\n $res=array();\n $this->objTable = new Model($this->getLangAndID['lang'].'_slide_image');\n $select = array('id','title','description','slide_id','src_link','order_by','avatar');\n $this->objTable->where('slide_id',$this->id);\n $this->objTable->where('idw',$this->idw);\n $data = $this->objTable->get(null,null,$select);\n \n return $data; \n }", "function get_single_slider($pid) {\n $sql = \"SELECT * FROM slider WHERE id='$pid'\";\n $res = $this->mysqli->query($sql);\n return $res->fetch_array(MYSQLI_ASSOC);\n }", "function get_slider($tipo,$idioma_id)\r\n {\r\n $sql = \"select * from slide s, pagina_web p \r\n where s.pagina_id = p.pagina_id and p.idioma_id=\".$idioma_id.\" and s.slide_tipo=\".$tipo;\r\n \r\n $resultado = $this->db->query($sql)->result_array();\r\n return $resultado; \r\n \r\n }", "function get_slide($slide_id)\r\n {\r\n $slide = $this->db->query(\"\r\n SELECT\r\n *\r\n\r\n FROM\r\n `slide`\r\n\r\n WHERE\r\n `slide_id` = ?\r\n \",array($slide_id))->row_array();\r\n\r\n return $slide;\r\n }", "public function getSlider()\n\t{\n\t\t\n\t\t $sliders = Slider::where('deleted_at' , null )->inRandomOrder()->where('active' , 'yes')->orderBY('id','desc')->take(5)->get() ;\n\t\t \n\t\t $data = array() ;\n\t\t foreach($sliders as $slider){\n\t\t\t $slideData = array(\n\t\t\t 'name_ar' => $slider->name_ar ,\n\t\t\t 'name_en' => $slider->name_en ,\n\t\t\t 'description_ar' => strip_tags($slider->description_ar) ,\n\t\t\t 'description_en' => strip_tags($slider->description_en) ,\n\t\t\t 'photo' => url('/public').$slider->photo , \t\t\t \n\t\t\t ) ;\n\t\t\t array_push($data ,$slideData ) ;\n\t\t\t \n\t\t }\n\t\t return response()->json([\n 'status' => 1,\n 'data' => $data , \t\t\t\t\n ]); \n \n\t}", "public function getSlides(){\r\n\t\treturn $this->getModel()->getSlides();\r\n\t}", "function sb_slideshow_slides( $sql ) {\n\tglobal $wpdb, $post, $sb_slideshow_interface, $sb_slideshow_slides;\n\n\t$slides = get_post_meta( ( ! isset( $post->ID ) ? absint( $_POST['id'] ) : $post->ID ), 'slide', false ); // set single (third parameter) to false to pull ALL records with key \"slide\"\n\n\t$attachments = $wpdb->get_results( $sql );\n\n\t// push all image attachments info into array\n\t$indexes = array();\n\tforeach( $attachments as $attachment ) {\n\t\tarray_push( $indexes, count( $sb_slideshow_slides ) );\n\n\t\t$box = 'library';\n\t\t$order = '';\n\t\tforeach( $slides as $slide ) {\n\t\t\tif( $slide['attachment_id'] == $attachment->ID ) {\n\t\t\t\t$box = 'slides';\n\t\t\t\t$order = $slide['order'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$metadata = wp_get_attachment_metadata( $attachment->ID );\n\n\t\tarray_push( $sb_slideshow_slides, array(\n\t\t\t'box' \t\t\t=> $box,\n\t\t\t'order'\t\t\t=> $order,\n\t\t\t'attachment'\t\t=> array(\n\t\t\t\t'id' \t\t=> $attachment->ID,\n\t\t\t\t'year' \t\t=> mysql2date( 'Y', $attachment->post_date ),\n\t\t\t\t'month' \t=> mysql2date( 'm', $attachment->post_date ),\n\t\t\t\t'width'\t\t=> $metadata['width'],\n\t\t\t\t'height' \t=> $metadata['height'],\n\t\t\t\t'type' \t\t=> $attachment->post_mime_type,\n\t\t\t\t'link'\t\t=> $attachment->post_excerpt,\n\t\t\t\t'content'\t=> $attachment->post_content ),\n\t\t\t\t'image' \t=> '<img src=\"' . sb_get_post_image_url( array( 'width' => $sb_slideshow_interface['slide_width'], 'height' => $sb_slideshow_interface['slide_height'], 'image_id' \t=> $attachment->ID, 'echo' \t=> false ) ) . '\" width=\"' . $sb_slideshow_interface['slide_width'] . '\" height=\"' . $sb_slideshow_interface['slide_height'] . '\" />'\n\t\t\t)\n\t\t);\n\t}\n\n\tusort( $sb_slideshow_slides, 'sb_slideshow_slide_sort' ); // order the elements of the array\n\n\treturn $indexes;\n}", "public abstract function FetchArray();", "public function fetchArray();", "public function fetchArray();", "public function fetchSlides($params = NULL)\n\t{\n \t$select = $this->registry->db->select();\n \t$select->from(array('s' => 'rotators_slides'));\n \t\n \tif(isset($params['rotator'])) :\n \t $select->where('s.rots_rotator = ?', $params['rotator']);\n \tendif;\n \t\n \t$select->order('s.rots_title ASC');\n \t\n \tif(isset($params['page']) && is_numeric($params['page'])) :\n \t\t$pagenum = $params['page'];\n \telse :\n \t\t$pagenum = 1;\n \tendif;\n \t\n \tif(isset($params['items']) && is_numeric($params['items'])) :\n \t\t$items = $params['items'];\n \telse :\n \t\t$items = 15;\n \tendif;\n \t\n \tif(isset($params['range']) && is_numeric($params['range'])) :\n \t\t$range = $params['range'];\n \telse :\n \t\t$range = 5;\n \tendif;\n \t\n \t$paginator = Zend_Paginator::factory($select);\n\t\t$paginator->setCurrentPageNumber($pagenum);\n\t\t$paginator->setItemCountPerPage($items);\n\t\t$paginator->setPageRange($range);\n\t \n \treturn $paginator;\n\t}", "public function get_slides_from_meta($slider_metas){\r\n $slides = array();\r\n if(is_array($slider_metas)){\r\n foreach($slider_metas as $slider_meta){\r\n $attachment_id = (int) $slider_meta['id'];\r\n $image_url = wp_get_attachment_url($attachment_id);\r\n $image_url = ($image_url===false) ? '' : $image_url;\r\n $slides[] = $image_url;\r\n }\r\n }\r\n return $slides;\r\n }", "public function getSliderList()\n { \n $sliders = PageSlider::where('status', PageSlider::ACTIVE)->get();\n return $sliders;\n }", "public function getPicturesInSlider(): PictureCollection;", "function stock_toolkit_get_slide_as_list(){\n\n\t$args = wp_parse_args( \n\t\tarray(\n\t\t\t'post_type' => 'slide',\n\t\t\t'numberposts' => -1,\n\t\t)\n\t);\n\n\t$posts = get_posts($args);\n\n\t$post_options = array(esc_html__('-- Select Slide --', 'stock-toolkit')=> '');\n\n\tif($posts){\n\t\tforeach ($posts as $post) {\n\t\t\t$post_options[ $post->post_title ] = $post->ID;\n\t\t}\n\t}\n\n\treturn $post_options;\n}", "function the1slider_fetch_slider($id){\n\t\t\n\t\t# check if this is a Themes1_Slider post\n\t\tif ( get_post_type($id) !== 'the1_slider' ) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t# get slides from post\n\t\t$slides = get_post_meta($id,'slides',true);\n\t\t\n\t\t# if no slides available, stop the function\n\t\tif ( !is_array($slides) || empty($slides) ) return false;\n\t\t\n\t\t# get slider settings. If any option not set, default will be used\n\t\t$settings_defaults = array(\n\t\t\t'width' \t\t=> '',\n\t\t\t'height'\t\t=> '',\n\t\t\t'overlayer-use'\t=> '',\n\t\t\t'fx'\t\t\t=> '',\n\t\t\t'autoplay'\t\t=> '',\n\t\t\t'autoplay_delay'=> '',\n\t\t\t'arrows'\t\t=> '',\n\t\t\t'bottom_bar'\t=> '',\n\t\t\t'thumb_width'\t=> '',\n\t\t\t'thumb_height'\t=> '',\n\t\t\t'tabs_color'\t=> '',\n\t\t);\n\t\t$settings = get_post_meta($id,'settings',true);\n\t\t$settings = ( is_array($settings) ? array_merge($settings_defaults,$settings) : $settings_defaults );\n\t\t\n\t\t# merge $slides and $settings in a single array\n\t\t$slider = array(\n\t\t\t'settings' \t=> $settings,\n\t\t\t'slides' \t=> $slides,\n\t\t);\n\t\t\n\t\t# return $slider\n\t\treturn $slider;\n\t\t\n\t}", "public function get_slides_for_slider() {\n return $this->slides_to_include;\n }", "public function fetchArray() : array\n\t{\n\t\treturn $this->handle->fetchArray($this->result);\n\t}", "function fetchPoi() {\n\n $pois = array();\n\n $con = new DB();\n $sql = $con->prepare(\"SELECT * FROM poi\");\n $result = $con->executeQuery($sql);\n\n foreach ($result as $row) {\n $id = $row['id'];\n $nombre = $row['nombre'];\n $foto = $row['foto'];\n $descripcion = $row['descripcion'];\n $url = $row['url'];\n $precio = $row['precio'];\n $horario = $row['horario'];\n $id_tipo = $row['id_tipo'];\n $id_transporte = $row['id_transporte'];\n $id_entorno = $row['id_entorno'];\n $id_ciudad = $row['id_ciudad'];\n $id_pais = $row['id_pais'];\n $id_usuario = $row['id_usuario'];\n $poi = new Poi($id, $nombre, $foto, $descripcion, $url, $precio, $horario, $id_tipo, $id_transporte, $id_entorno, $id_ciudad, $id_pais, $id_usuario);\n array_push($pois, $poi);\n }\n\n return $pois;\n }", "public function toArray()\n {\n return $this->fetchData;\n }", "public function fetch(): array\n {\n }", "public function getEnabledSlides()\n {\n $slides = ArrayList::create();\n \n foreach ($this->getListItems() as $item) {\n \n if ($slide = $this->createSlide($item)) {\n $slides->push($slide);\n }\n \n }\n \n return $slides;\n }", "public function getSlideData( $uid ){\n\n $slide = $this->find( 'first', [\n 'conditions' => [\n 'HeaderSlide.uid' => $uid\n ]\n ]);\n\n return $slide;\n\n }", "public function fetch_array() {\n\t\treturn $this->FetchArray();\n\t}", "public function get(): array\n\t{\n\t\t$roundedNumber = $this->count();\n\t\t$page = 1;\n\t\t\n\t\t$arrayPage = array();\n\t\t\n\t\tfor ($i = 0; $i < $roundedNumber; $i++) {\n\t\t\t$arrayPage[] = $page;\n\t\t\t$page++;\n\t\t}\n\t\treturn $arrayPage;\n\t}", "public function getAllForParsing(): array\n {\n return $this->model->newQuery()->orderBy('disporder')->pluck('image', 'find')->toArray();\n }", "function get_image() {\n $sql = \"SELECT * FROM photos\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "public function toArray(){\n return $this->content;\n }", "function FetchArray() {\n\t\t\t$this->ConnectServer();\n\t\t\t$array = pg_fetch_array($this->result, NULL, PGSQL_ASSOC);\n\t\t\t$this->DisconnectServer();\n\t\t\treturn $array;\n\t\t}", "public function toArray() \n {\n\t return $this->page_array;\n\t}", "public function fetch_array()\n\t{\n\t\t$array = array();\n\t\tif (current($this->result)) {\n\t\t\tforeach (current($this->result) AS $value) {\n\t\t\t\t$array[] = $value;\n\t\t\t}\n\t\t\tforeach (current($this->result) AS $key => $value) {\n\t\t\t\t$array[$key] = $value;\n\t\t\t}\n\t\t}else {\n\t\t\t$array = FALSE;\n\t\t}\n\t\tnext($this->result);\n\t\treturn $array;\n\t}", "function get_all_gallery(){\n global $conn, $start_pos, $items_per_page ;\n\n pagination();\n $sql = \"SELECT * FROM gallery LIMIT $start_pos, $items_per_page\";\n\n $result = mysqli_query($conn, $sql);\n\n $galleries = [];\n // $galleries = array();\n\n if(mysqli_num_rows($result)> 0){\n\n while($row = mysqli_fetch_assoc($result)){\n array_push($galleries, $row);\n }\n return $galleries;\n } else {\n return false;\n }\n}", "public function slides()\n {\n return $this->hasMany('App\\ArticleSlider');\n }", "public function toArray()\n {\n return $this->getContent();\n }", "public function get()\n {\n $total_pages = ceil($this->total / $this->per_page);\n $begin = $this->page - $this->side_pages_n;\n $end = $this->page + $this->side_pages_n;\n $pagination = [];\n\n if ($begin <= 0) {\n $begin = 1;\n }\n\n for ($i = $begin; $i <= $end && $i <= $total_pages; $i++) {\n $pagination[] = $this->getNewPage($i);\n }\n\n if ($this->show_ends) {\n $this->addEnds($pagination);\n }\n\n return $pagination;\n }", "function getpexelsimages($arr_data)\n{\n require_once INCLUDES_DIR .'/api.php';\n $class = new RFI\\API\\API();\n $arr_pexels = json_decode($class->pexels($arr_data));\n $arr_pex=[];\n if (isset($arr_pexels->photos) && !empty($arr_pexels->photos)) {\n foreach ($arr_pexels->photos as $data) {\n $arr_pex[] = array(\n 'imageurl' => $data->src->large2x,\n 'imageurlsmall' => $data->src->medium,\n 'username' => $data->photographer,\n 'landing' => $data->url,\n 'userimage' => 'https://cdn.pixabay.com/photo/2017/07/18/23/23/user-2517433_960_720.png',\n 'credit' => 'pexels', \n 'userlink' => $data->photographer_url \n );\n }\n }\n return $arr_pex;\n}", "public function get_img($img_id){\n\t\treturn $this->db->select()\n\t\t\t->from(\"slide\")\n\t\t\t->where(\"sli_id\",$img_id)\n\t\t\t->get()\n\t\t\t->row();\n\t}", "public function get_slideshow()\n\t{\n\t\treturn $this->getByType('slideshow');\n\t}", "function fetchPais() {\n\n $paises = array();\n\n $con = new DB();\n $sql = $con->prepare(\"SELECT * FROM pais\");\n $result = $con->executeQuery($sql);\n\n foreach ($result as $row) {\n $id = $row['id'];\n $nombre = $row['nombre'];\n $pais = new Pais($id, $nombre);\n array_push($paises, $pais);\n }\n\n return $paises;\n }", "public function getAsArray();", "public function getData() : array{\n $this->collection->rewind();\n $data = [];\n while($this->collection->valid()){\n $data[] = $this->collection->current()->getData();\n $this->collection->next();\n }\n return $data;\n }", "function getPageContent(PDO $connection) : array\n{\n $queryStr = \"\n SELECT\n `title`,\n `id`,\n `h1`,\n `p`,\n `span-class`,\n `span-text`,\n `img-alt`,\n `img-src`\n FROM\n `page`\n WHERE\n `id` = \" . $_GET[\"id\"];\n $stmt = $connection->prepare($queryStr);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC)[0];\n}", "function get_single_image($pid) {\n $sql = \"SELECT * FROM photos WHERE album_id='$pid'\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "public function index()\n {\n $sliders=Slider::get();\n return $sliders;\n }", "public function toArray($deep=true)\n {\n return $this->getContent();\n }", "public function get_images()\r\n\t\t{\r\n\t\t\t$images = $this->obj->result;\r\n\t\t\treturn $images;\r\n\t\t}", "public function toArray()\n {\n return $this->content;\n }", "function getData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_data = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit'));\n\n\t\t\t$total = count($this->_data);\n\t\t\tfor($i = 0; $i < $total; $i++)\n\t\t\t{\n\t\t\t\t$item =& $this->_data[$i];\n\t\t\t\t$item->slug = $item->id.':'.$item->alias;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_data;\n\t}", "function getData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_data = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit'));\n\n\t\t\t$total = count($this->_data);\n\t\t\tfor($i = 0; $i < $total; $i++)\n\t\t\t{\n\t\t\t\t$item =& $this->_data[$i];\n\t\t\t\t$item->slug = $item->id.':'.$item->alias;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_data;\n\t}", "public function featimage()\n {\n $res = $this->db->get('feat_gallery')->result_array();\n\n // print_r($res);\n return $res;\n }", "public function getPageData();", "public function fetch($asArray = false) {\r\n $a = $this->getArrayCopy();\r\n $r = array_shift($a);\r\n $this->exchangeArray($a);\r\n return $asArray ? $r->asArray() : $r;\r\n }", "public function getPhotosData() {\n\t\t// 画像データ取得\n\t\t$results = $this->HttpSocket->get(FLICKR_API_URL,\n\t\t\tarray(\n\t\t\t\t'method' => PHOTOSSEARCH,\n\t\t\t\t'format' => DATAFORMAT,\n\t\t\t\t'api_key' => $this->api_key,\n\t\t\t\t'sort' => SORTTYPE,\n\t\t\t\t'accuracy' => ACCURACY,\n\t\t\t\t'content_type' => CONTENTTYPE,\n\t\t\t\t'license' => LICENSE,\n\t\t\t\t'privacy_filter' => PRIVACYFILTER,\n\t\t\t\t'per_page' => PERPAGE,\n\t\t\t\t'safe_search' => SAFESEARCH,\n\t\t\t\t'tags' => TAGS,\n\t\t\t));\n\n\t\t$body = $results->body;\n\t\treturn unserialize($body);\n\t}", "private function getExpo()\n\t{\n\n\t\t$query = '\n\t\t\tSELECT * FROM \n\t\t\t\texpo\n\t\t\tWHERE \n\t\t\t\texpo.publish = \"publish\"\n\t\t';\n\t\t$result = $mysqli->query($query);\n\t\twhile ($row = $result->fetch_assoc()) \n\t\t{\n\t\t\t$expo['id'] = $row['id'];\n\t\t\t$expo['title'] = $row['title'];\n\t\t\t$expo['image'] = $row['image'];\n\t\t\t$expo['teaser'] = $row['teaser'];\n\t\t\t$expo['fecha_inicio'] = $row['fecha_inicio'];\t\n\t\t\t$expo['dias_vigente'] = $row['dias_vigente'];\n\t\t\t$expos[] = $expo;\n\t\t}\n\t\t$result->free();\n\t\t$mysqli->close();\n return $expos;\n\t}", "function getSlideTitles() {\n global $slides;\n\n foreach ($slides[\"slides\"] as $slide) {\n $id = $slide[\"id\"];\n $title = $slide[\"title\"];\n echo \"<p class='sliderTitle' id='title$id'>$title</p>\";\n }\n }", "protected function get_public_slide() {\n\n // get the image url (and handle cropping)\n // disable wp_image_editor if metadata does not exist for the slide\n $imageHelper = new MetaSliderImageHelper(\n $this->slide->ID,\n $this->settings['width'],\n $this->settings['height'],\n isset($this->settings['smartCrop']) ? $this->settings['smartCrop'] : 'false',\n $this->use_wp_image_editor()\n );\n\n $thumb = $imageHelper->get_image_url();\n $attachment_id = get_post_thumbnail_id($this->slide->ID);\n $attachment = get_post($attachment_id);\t\n\t\tif ($this->is_field_inherited('caption')) {\n\t\t\t$caption = $attachment->post_excerpt;\n } else {\n\t\t\t$caption = $this->slide->post_excerpt;\n\t\t}\n if ($this->detect_self_metaslider_shortcode($this->slide->post_excerpt)) {\n $caption = str_replace(array(\"[metaslider\", \"[ml-slider\"), \"[metaslider-disabled\", $this->slide->post_excerpt);\n\t\t}\n\n if ($this->is_field_inherited('title')) {\n $title = $attachment->post_title;\n } else {\n $title = get_post_meta($this->slide->ID, 'ml-slider_title', true);\n }\n\t\t\n if ($this->is_field_inherited('alt')) {\n $alt = get_post_meta($attachment_id, '_wp_attachment_image_alt', true);\n } else {\n $alt = get_post_meta($this->slide->ID, '_wp_attachment_image_alt', true);\n }\n \n\n\n // store the slide details\n $slide = array(\n 'id' => $this->slide->ID,\n 'url' => get_post_meta($this->slide->ID, 'ml-slider_url', true),\n 'title' => $title,\n 'target' => get_post_meta($this->slide->ID, 'ml-slider_new_window', true) ? '_blank' : '_self',\n 'src' => $thumb,\n 'thumb' => $thumb, // backwards compatibility with Vantage\n 'width' => $this->settings['width'],\n 'height' => $this->settings['height'],\n 'alt' => $alt,\n 'caption' => html_entity_decode(do_shortcode($caption), ENT_NOQUOTES, 'UTF-8'),\n 'caption_raw' => do_shortcode($caption),\n 'class' => \"slider-{$this->slider->ID} slide-{$this->slide->ID}\",\n 'rel' => \"\",\n 'data-thumb' => \"\"\n );\n\n // fix slide URLs\n if (strpos($slide['url'], 'www.') === 0) {\n $slide['url'] = 'http://' . $slide['url'];\n }\n\n $slide = apply_filters('metaslider_image_slide_attributes', $slide, $this->slider->ID, $this->settings);\n\n // return the slide HTML\n switch ($this->settings['type']) {\n case \"coin\":\n return $this->get_coin_slider_markup($slide);\n case \"flex\":\n return $this->get_flex_slider_markup($slide);\n case \"nivo\":\n return $this->get_nivo_slider_markup($slide);\n case \"responsive\":\n return $this->get_responsive_slides_markup($slide);\n default:\n return $this->get_flex_slider_markup($slide);\n }\n\n }", "public function toArray()\n\t{\n\t\t$data = [];\n\t\tforeach ($this->pages as $page) {\n\t\t\t$data[] = $page->toArray();\n\t\t}\n\t\treturn $data;\n\t}", "public static function fetchAll() {\n $db = new PDO(DB_SERVER, DB_USER, DB_PW);\n // 2. Prepare the query\n $sql = 'SELECT * FROM pd_time_series';\n $statement = $db->prepare($sql);\n // 3. Run the query\n $success = $statement->execute();\n // 4. Handle the results\n $arr = [];\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n $thePdSeries = new PdSeries($row);\n array_push($arr, $thePdSeries);\n }\n\n return $arr;\n }", "public function get_data(): array;", "public function get_data(): array;", "public function getCatalogue()\n {\n\n $json = file_get_contents($this->getBaseURL());\n\n if ($json !== null) {\n $data = json_decode($json, true);\n\n if (count($data) > 0) {\n\n // On enregistre les tableaux dans lesquels on va se \"promener\"\n $tabResults = $data['response']['docs'];\n\n if (count($tabResults) > 0) {\n\n // Pour chaque tableau (dans le tableau \"docs\"), on enregistre le Label, l'URI et les auteurs (nom/prenom)\n foreach ($tabResults as $key => $element) {\n $publication = new Publication($element['label_s'], $element['authFullName_s'], $element['uri_s'], $element['modifiedDate_s']);\n\n $this->addPublication($publication);\n }\n\n } else {\n echo MESSAGE_NO_RESULTS_AVAILABLE_ERROR;\n }\n } else {\n die(MESSAGE_NO_DATA_AVAILABLE_ERROR);\n }\n } else {\n die(MESSAGE_PROBLEM_WITH_URL_ERROR);\n }\n\n return $this->publications;\n\n }", "private function getData()\n\t{\n\t\t// get the gallery record\n\t\t$this->record = BackendSlideshowModel::getImage($this->id);\n\t\t$this->record2 = BackendSlideshowModel::getGallery($this->galleryId);\n\t\t\n\t}", "public function fetchData()\n {\n if (null === $this->data) {\n $adaptable = $this->getAdaptable();\n if ($adaptable instanceof \\ArrayObject) {\n $this->data = $adaptable->getArrayCopy();\n } else {\n $this->data = (array) $adaptable;\n }\n\n $page = $this->getPageNumber() - 1;\n $limit = $this->getItemsPerPage();\n $this->data = array_splice($this->data, $page * $limit, $limit);\n }\n }", "function getData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_data = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit'));\n\t\t}\n\n\t\treturn $this->_data;\n\t}", "function get_album() {\n $sql = \"SELECT * FROM album\";\n $res = $this->mysqli->query($sql);\n $data = array();\n while ($row = $res->fetch_array(MYSQLI_ASSOC)) {\n $data[] = $row;\n }\n return $data;\n }", "public function get($pid)\n {\n $this->db->where('pid', (int) $pid);\n $this->db->order_by('id', 'DESC');\n $query = $this->db->get('images');\n return $query->result_array();\n }", "public function get(): array;", "public function get(): array;", "public function getCat() {\n return DB::q_array(\"SELECT id, title, image FROM news_category WHERE published = 1\");\n }", "public function getSlideItem()\n {\n if(!$this->safeUpdate())\n return 'errorUpdate';\n $this->objTable = new Model($this->getLangAndID['lang'].'_slide');\n $this->objTable->where($this->getLangAndID['field_id'],$this->id);\n $this->objTable->where('idw',$this->idw);\n $result = $this->objTable->getOne();\n //if($this->checkPostTime($result['post_time']))\n //$result['post_time']='';\n if ($result) {\n return $result;\n }\n }", "public function execute(): array\n {\n $this->log->info('publication:list', []);\n\n $list = $this->publications->getPublicationList();\n\n $this->log->debug('publication:list', ['result' => $list]);\n\n return $list;\n }", "function load_portfolio_array () {\n $portfolio = json_decode(stripslashes($_COOKIE[\"portfolio\"]));\n $result = array();\n foreach ($portfolio as $object) {\n $result[] = (array) $object;\n }\n return $result;\n}", "function getPages() {\n\t\t$sql = 'SELECT * FROM page WHERE vis = 1 ORDER BY psn';\n\t\t$qrh = mysqli_query($this->lnk, $sql);\n\t\t$i = 1;\n\t\t\n\t\t// iterate and extract data to be passed to view\n\t\twhile ( $res = mysqli_fetch_array($qrh)) {\n\t\t\t$results[] = array('id' => $res['id'],'name' => $res['nam']);\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\treturn $results;\n\t\t\n\t}", "function data() {\n $result = $this->fetcher->get($this->url);\n\n if ($result->getStatusCode() == 200) {\n $xml = new SimpleXMLElement($result->getBody());\n\n // WorkflowMax API's standard for error reporting\n if((string)$xml->Status !== 'OK') {\n throw new \\LogicException((string)$xml->ErrorDescription);\n }\n\n $array = json_decode(json_encode($xml), true);\n\n if($this->dataProcessor) {\n $dp = $this->dataProcessor;\n $array = $dp($array);\n }\n\n return $array;\n }\n\n throw new \\LogicException('URL returned status code ' . $result->getStatusCode());\n }", "function getImages() \t{\n \t\treturn $this->images_array;\n \t}", "public function fetch()\n {\n return (array)$this->query();\n }", "function get_slider($limit = null,$status = null){\n\t\t$this->db->select('*,sha1(id) as ref');\n\t\t$this->db->where(array(\"status\"=>$status));\n\t\tif($limit != null){\n\t\t\t$this->db->limit($limit);\n\t\t}\n\t\t$hasil = $this->db->get('__slider_news');\n\t\treturn $hasil->result();\n\t}", "public function getData(){\n\t\t$sql = \"SELECT * FROM hr_score_content\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result_array();\n\t}", "private function getThumbnailsArray(): array {\n $connection = new Connection();\n $link = $connection->connect();\n $result = $link->query(\"SELECT filename, id FROM image WHERE id <> '1' AND id <> '2' ORDER BY RAND() LIMIT \" . $this->rowsCount * 2);\n $thumbnails = array();\n while ($record = $result->fetch()){\n $thumbnails[] = $record;\n }\n $connection = null;\n return $thumbnails;\n }", "function loadAds(){\n\t\t$adsStmt = $this->dbc->query('SELECT id FROM items');\n\t\t//creates new array $ads\n\t\t$ads = [];\n\n\t\t//calls fetch and stores new ad as a new row\n\t\twhile($row = $adsStmt->fetch(PDO::FETCH_ASSOC)){\n\n\t\t\t$ad = new Ad($this->dbc, $row['id']);\n\t\t\t//stores the row into new array\n\t\t\t$ads[] = $ad;\n\t\t}\n\t\treturn $ads;\n\t}", "function show_slide(){\n\n\t$get_slide = \"select * from slide\";\n\t$run_slide = mysql_query($get_slide);\n\n\twhile($my_slide = mysql_fetch_array($run_slide)) {\n\t\t$slide_id = $my_slide['slide_id'];\n\t\t$slide_img = $my_slide['home_slide'];\n\n\t\t//echo \"hi: $slide_id\";\n\t\techo \"<img id=$slide_id src=$slide_img width=100% height=100% >\";\n\t}\n}", "abstract public function getArray();", "public function getImageArray();", "public function do()\n\t{\n\t\t// caching to avoid further request\n\t\tConfigs::get();\n\n\t\t// Initialize return var\n\t\t$return = [];\n\n\t\t$albumIDs = resolve(PublicIds::class)->getPublicAlbumsId();\n\n\t\t$query = Photo::with('album')->whereIn('album_id', $albumIDs);\n\n\t\t$full_photo = Configs::get_value('full_photo', '1') == '1';\n\t\t$return['photos'] = $this->photosLocationData($query, $full_photo);\n\n\t\treturn $return;\n\t}", "public static function retrieveAll(){\n\n $myDataAccess = aContentAreaDataAccess::getInstance();\n\n $myDataAccess->connectToDB();\n\n $myDataAccess->selectDivs();\n\n $numberOfRecords = 0;\n\n while($row = $myDataAccess->fetchDivs())\n {\n $currentDiv = new self(\n $myDataAccess->fetchAlias($row),\n //$myDataAccess->fetchCreated($row),\n //$myDataAccess->fetchCreatedBy($row),\n $myDataAccess->fetchDescription($row),\n $myDataAccess->fetchDivId($row),\n $myDataAccess->fetchDivOrder($row),\n //$myDataAccess->fetchLastModified($row),\n //$myDataAccess->fetchModifiedBy($row),\n $myDataAccess->fetchName($row)\n );\n\n $arrayOfDivs[] = $currentDiv;\n\n }\n\n $myDataAccess->closeDB();\n\n return $arrayOfDivs;\n }", "public static function getImage($id)\n {\n return (array) BackendModel::getContainer()->get('database')->getRecord(\n 'SELECT i.*\n FROM slideshow_images AS i\n WHERE i.id = ?',\n array((int) $id)\n );\n }" ]
[ "0.69258493", "0.68535674", "0.65980726", "0.65956813", "0.65890867", "0.65774953", "0.6458247", "0.64092255", "0.6372187", "0.63272506", "0.62476355", "0.6210284", "0.6204001", "0.61834514", "0.616892", "0.6100503", "0.60158336", "0.59924597", "0.5967866", "0.59636927", "0.5934611", "0.58217984", "0.58210546", "0.58210546", "0.5807641", "0.579962", "0.57645386", "0.57414573", "0.5720547", "0.5709844", "0.5661953", "0.56175643", "0.5605546", "0.5545399", "0.55411994", "0.552382", "0.5506148", "0.55013597", "0.54998606", "0.5494885", "0.5493297", "0.5492379", "0.5485903", "0.5475386", "0.54626495", "0.54494286", "0.54359746", "0.5432803", "0.54053783", "0.5386806", "0.5381318", "0.5381056", "0.53809744", "0.53792", "0.5375835", "0.53703755", "0.5349227", "0.53355676", "0.5324602", "0.53171414", "0.5316341", "0.53149563", "0.53149563", "0.5312087", "0.53048575", "0.52979034", "0.5290676", "0.5287045", "0.5284682", "0.52822554", "0.52695334", "0.52641755", "0.525715", "0.525715", "0.5251566", "0.5250459", "0.5247123", "0.5244478", "0.5237047", "0.52349406", "0.52336705", "0.52336705", "0.52334434", "0.52318823", "0.5231727", "0.5224819", "0.52193636", "0.52181137", "0.521753", "0.52118665", "0.5209058", "0.5208837", "0.5200332", "0.51976377", "0.5192745", "0.5192743", "0.5169981", "0.516885", "0.51685256", "0.51664186" ]
0.5668295
30
Run the database seeds.
public function run() { DB::table('bodegas')->insert([ 'nombre_bodega' => "Volcanes", ]); DB::table('bodegas')->insert([ 'nombre_bodega' => "Santa Lucia", ]); DB::table('bodegas')->insert([ 'nombre_bodega' => "Monumento", ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Whether to allow to edit the cart
public function canEdit() { return $this->is_locked == 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function can_edit() {\n return true;\n }", "public function canEdit()\n {\n return true;\n }", "protected function canEdit() {}", "function canEdit() {\n\t\t\treturn true;\n\t\t}", "public function edit(Product $product)\n {\n // Admin Only \n }", "public function edit(Cart $cart)\n {\n //\n }", "public function edit(Cart $cart)\n {\n //\n }", "public function edit(Cart $cart)\n {\n //\n }", "public function edit(Cart $cart)\n {\n //\n }", "public function edit(Cart $cart)\n {\n //\n }", "public function edit(Cart $cart)\n {\n //\n }", "public function edit(Cart $cart)\n {\n //\n }", "public function edit(Cart $cart)\n {\n //\n }", "public function edit(cart $cart)\n {\n //\n }", "public function edit(cart $cart)\n {\n //\n }", "public function canEdit()\n {\n if(!Auth::check())\n {\n return false;\n }\n //If the user is active/logged in, return true so that we can display user's specific objects\n if(Auth::user()->id===$this->user_id)\n {\n return true;\n }\n //By default\n return false;\n }", "protected function allowEdit($data=array(),$key='id'){\n return parent::allowEdit($data=array(),$key='id');\n /*\n $user=JFactory::getUser();\n $recordId=(int)isset($data[$key])?$data[$key]:0;\n $categoryId=0;\n\n if($recordId){\n $categoryId=(int)$this->getModel()->getItem($recordId)->catid;\n }\n\n if($categoryId){\n // The category has been set. Check the category permissions.\n return $user->authorise('core.edit',$this->option.'.category.'.$categoryId);\n }else{\n // Since there is no asset tracking, revert to the component permissions.\n return parent::allowEdit($data,$key);\n }\n */\n }", "public function authorize(): bool\n {\n return Gate::allows('update', $this->product);\n }", "public function canEdit()\n {\n if ($this->isOptionsUpdated()) {\n return true;\n }\n if (!$this->getRequisitionListProduct()) {\n return false;\n }\n\n try {\n $product = $this->requisitionListItemProduct->getProduct($this->getItem());\n return $this->productChangesAvailabilityChecker->isProductEditable($product);\n } catch (\\Magento\\Framework\\Exception\\NoSuchEntityException $e) {\n return false;\n }\n }", "public function edit(UserCart $userCart) {\n\t\t//\n\t}", "public function authorize()\n {\n $user = \\Auth::user();\n \n if($user->can('update', \\App\\Product::class)){\n return true;\n }\n \n return false;\n }", "protected function _isAllowed()\n {\n switch ($this->getRequest()->getActionName()) {\n case 'new':\n case 'save':\n return Mage::getSingleton('admin/session')->isAllowed('requestprice/manage/save');\n break;\n case 'delete':\n return Mage::getSingleton('admin/session')->isAllowed('requestprice/manage/delete');\n default:\n return Mage::getSingleton('admin/session')->isAllowed('requestprice/manage');\n }\n }", "protected function allowEdit($data = array(), $key = 'id')\n\t{\n\t\treturn JFactory::getUser()->authorise('core.manage', $this->option);\n\t}", "protected function _isAllowed()\r\n {\r\n return Mage::getSingleton('admin/session')->isAllowed('catalog/productsupdater');\r\n }", "protected function _isAllowed()\r\n {\r\n return $this->_authorization->isAllowed('AAllen_PriceUpdate::update');\r\n }", "protected function allowEdit($data = array(), $key = 'id')\n {\n return true;\n }", "public function isAllowInCart() {\n return !$this->isEnabled();\n }", "public function canEdit() {\n\t\treturn $this->_perms->checkModuleItem ( $this->_tbl_module, 'edit' );\n\t}", "protected function allowEdit($data = array(), $key = 'a_id')\n\t{\n\t\treturn true;\n\t}", "public function validateCatalogProductEdit()\n {\n // redirect from disallowed scope\n if (!$this->_isAllowedStoreInRequest()) {\n $this->_redirect(['*/*/*', 'id' => $this->_request->getParam('id')]);\n }\n }", "abstract function allowEditAction();", "function canEdit() {\r\n\t\t$user\t=& JFactory::getUser();\r\n\r\n\t\tif (!JAccess::check($user->id, 'core.admin', 'root.1')) {\r\n\t\t\t\t$permission = FlexicontentHelperPerm::getPerm();\r\n\t\t\t\t$id = $this->getState($this->getName().'.id');\r\n\t\t\t\tif ($id) {\r\n\t\t\t\t\t$rights \t= FlexicontentHelperPerm::checkAllItemAccess($uid, 'item', $id);\r\n\t\t\t\t\t$canEdit \t= in_array('flexicontent.editall', $rights) || $permission->CanEdit;\r\n\t\t\t\t\t$canEditOwn\t= (in_array('flexicontent.editown', $rights) && ($item->created_by == $user->id));\r\n\t\t\t\t\tif ($canEdit || $canEditOwn) return true;\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function isEditOnlyMode();", "public function user_can_edit() {\n if (has_capability('mod/swipe:manage', $this->context)) {\n return true;\n }\n }", "public function authorize()\n {\n return Cart::load()->getTotalQuantity() > 1;\n }", "public function edit(User $user, Product $product)\n {\n return $user->isAbleTo('product.edit');\n }", "public function can_edit() {\n\t\t$can_edit = false;\n\t\t\n\t\t// is the user the owner of the package and the package is in edit mode?\n\t\tif ( ($this->get_user_id() == get_current_user_id()) && ($this->status == 1) ) {\n\t\t\t$can_edit = true;\n\t\t} else {\n\t\t\t// is the user an admin (has the right to edit all packages)\n\t\t\tif ( current_user_can( 'pvm_edit_other_packages' ) ) {\n\t\t\t\t$can_edit = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $can_edit;\n\t}", "public function edit(){\r\n\t\t//$this->auth->set_access('edit');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "function edit($cart_item_id)\n\t{\n\t\t$design = $this->load_cart_design($cart_item_id);\n\t\t$this->Session->write(\"Design\", $design);\n\n\t\t$this->setAction('add');\n\n\t\t#$this->action = 'add'; # Keep side param...\n\n\t\t#$this->redirect(array('action'=>'add'));\n\t}", "public function isEditAction() {}", "protected function _isAllowed()\n\t{\n\t\treturn Mage::getSingleton('admin/session')->isAllowed('dropship360/inventory');\n\t}", "public function edit(ProductsInShoppingCart $productsInShoppingCart)\n {\n //\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('sales/order');\n }", "public function canBeEdited()\n {\n return false;\n }", "public function isFrontendEditingActive() {}", "function canEdit() {\r\n\t\tif($this->owner->ID == Member::currentUserID())\r\n\t\t\treturn true;\r\n\r\n\t\t$member = Member::currentUser();\r\n\t\tif($member)\r\n\t\t\treturn $member->isAdmin();\r\n\r\n\t\treturn false;\r\n\t}", "public function canBeEdited() {}", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webkul_Marketplace::product');\n }", "public function edit()\n {\n $per = self::get_permission();\n $all = product::all();\n return view('dashboard.product.edit',compact('per','all'));\n }", "public function edit($id)\n {\n $this->cpAuthorize();\n }", "public function edit(carts $carts)\n {\n //\n }", "public function beforeSave()\n {\n //Cannot edit role id == 1 because Supper Administrator access all permission\n $auth = Users::getCurrentUser();\n if ($this->is_super_admin == 1 && $auth['is_super_admin'] != 1) {\n return false;\n }\n return true;\n }", "public function authorize()\n {\n // who can update ??\n // 1- admin\n if (auth()->user()->isAdmin()) {\n return true;\n }\n\n // 2- creator\n if ($this->offerItem->created_by == auth()->user()->id) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n { \n $this->shop = Auth::user()->shop;\n\n if($this->method() == 'PUT' || $this->method() == 'PATCH') {\n $product = Product::findorFail($this->route('product'));\n\n return $product->shop_id == $this->shop->id;\n }\n\n return true;\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/emag_upload_invoice');\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_kst/kstitem');\n }", "public function authorize()\n {\n return Gate::allows('admin.shipment.edit', $this->shipment);\n }", "public function getUserCanEditAttribute()\n {\n return AccessControl::check($this, 'edit_post', false);\n }", "public function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('shopgate_menu/manage');\n }", "function canEdit(User $user) {\n return $user->isFinancialManager();\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_material/curriculumdoc');\n }", "public function authorize() : bool\n {\n return auth()->user()->can('edit', $this->invoice);\n }", "public function edit(CartModel $cartModel)\n {\n //\n }", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_logistics/equipment');\n }", "public function edit(Cartas $cartas)\n {\n //\n }", "public function canAddToCart($product)\n {\n return (!$product->getData('personalization_allowed') || !$product->getData('personalization_required'));\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Magestore_InventorySuccess::adjuststock');\n }", "public function enabledInEditMode()\n\t{\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->can('update')) {\n return true;\n }\n\t\t\n\t\treturn false;\n }", "protected function allowEdit($data = array(), $key = 'id')\n {\n $id = isset( $data[ $key ] ) ? $data[ $key ] : 0;\n if( !empty( $id ) )\n {\n return JFactory::getUser()->authorise( \"core.edit\", \"com_mkarta.analysis.\" . $id );\n }\n }", "public function isOrderEditable()\n {\n return !\\XLite::isFreeLicense();\n }", "public function _addOrEdit() {\n\t\tif($this->getRequest()->getParam('id')) { return true; } else { return false; }\n\t}", "public function canEdit()\n {\n if (!$this->site) {\n return false;\n }\n\n if (!$this->current_user) {\n return false;\n }\n\n if ($this->site->userIsVerified($this->current_user)) {\n return true;\n }\n\n return false;\n }", "public function canEditQty()\n {\n $item = $this->getItem();\n\n try {\n $product = $this->requisitionListItemProduct->getProduct($item);\n return $this->requisitionListItemProduct->isProductAttached($item)\n || $this->productChangesAvailabilityChecker->isQtyChangeAvailable($product);\n } catch (\\Magento\\Framework\\Exception\\NoSuchEntityException $e) {\n return false;\n }\n }", "public function authorize()\n {\n return auth()->user()->can('store', [Product::class]);\n }", "public function canBeEdited()\n {\n return true; ///< Every client sees only it's own information\n }", "public function getEditingAttribute()\n {\n return false;\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Codilar_Image360::image360_settings_edit');\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_kst/ifeedback');\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('customer/manage');\n }", "protected function isFrontendEditActive() {}", "protected function isFrontendEditActive() {}", "public function edit(Product $product)\n {\n // \n }", "public function isEditable()\n\t{\n\t\tif (($this->getName() === 'publicid') || ($this->getName() === 'posturl')) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function isAdmin()\n {\n $p = User::getUser();\n if($p)\n {\n if($p->canAccess('Edit products') === TRUE)\n {\n return TRUE;\n }\n }\n return FALSE;\n }", "public function authorize() {\n\t\t$this->competitor = $this->route('competitor');\n\t\treturn $this->user()->can('update', $this->competitor);\n\t}", "public function edit(Request $request, $id)\r\n {\r\n $product = Product::find($id);\r\n $producttypes = Brand::orderBy('id','desc')->get();\r\n $category = Category::where('parent_id',0)->orderBy('id','desc')->get();\r\n $childcategory =Category::where('parent_id',$product->parent_category_id)->orderBy('id','desc')->get();\r\n $stores = User::role('store')->where('status','active')->get();\r\n return view('admin.product.edit', compact('product','producttypes','category','childcategory'));\r\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Lof_Outlet::outlet_edit');\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_material/coursedoc');\n }", "public function allowModify($item)\n {\n if ($this->getAdminSession()->isAllowed('system/trashcan/all' === true)) {\n return true;\n }\n\n if ($this->getAdminSession()->isAllowed('system/trashcan/owner') === true) {\n if ($this->isCurrentAdminId($item->getData('trashed_by'))) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n return Gate::allows('employee.edit');\n }", "protected function allowEdit($data = array(), $key = id)\n\t{\n\t\treturn parent::allowEdit($data, $key, array(\n\t\t\t'key_author' => 'created_by'\n\t\t));\n\t}", "public function authorize()\n {\n return Gate::allows('add_to_dos') ? true : false;\n }", "public function is_editable() {\n\t\treturn false;\n\t}", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('sales/mfb_myflyingbox/offer');\n }", "public function canItemsAddToCart()\n {\n foreach ($this->getItems() as $item) {\n if (!$item->isComposite() && $item->isSaleable() && !$item->getRequiredOptions()) {\n return true;\n }\n }\n return false;\n }", "public function edit($id)\n {\n $product = Product::with('product_category','product_category.org')->where('id',$id)->first();\n\n if(auth()->user()->id !== $product->product_category->org->user_id){\n return redirect('/home')->with('error', \"Unauthorized Page\");\n }\n return view('product::edit')->with('product', $product);\n }" ]
[ "0.7390565", "0.71734506", "0.71510863", "0.70753753", "0.6976297", "0.69338936", "0.69338936", "0.69338936", "0.69338936", "0.69338936", "0.69338936", "0.69338936", "0.69338936", "0.69310635", "0.69310635", "0.6792577", "0.67002165", "0.6683583", "0.66596663", "0.66590285", "0.6598893", "0.65151966", "0.65113354", "0.64698166", "0.6453812", "0.6433334", "0.6430073", "0.642227", "0.64161986", "0.64046925", "0.63958293", "0.6391567", "0.6390066", "0.6363263", "0.633549", "0.62987864", "0.6279376", "0.6256094", "0.6254773", "0.62413216", "0.62297666", "0.62262833", "0.62185514", "0.6194913", "0.6187967", "0.6167436", "0.61583775", "0.6155585", "0.61382854", "0.6137341", "0.6115309", "0.610847", "0.6097609", "0.6096335", "0.6082013", "0.6067983", "0.606471", "0.606298", "0.6048397", "0.60457975", "0.6041991", "0.6035581", "0.6026625", "0.6026079", "0.6024728", "0.6022093", "0.6013662", "0.6000287", "0.5985593", "0.59789693", "0.5976373", "0.59733075", "0.59621876", "0.5959796", "0.5956771", "0.594436", "0.59438795", "0.5941731", "0.59378606", "0.5927534", "0.5925983", "0.5925019", "0.59157926", "0.59157926", "0.5903557", "0.5900455", "0.5895095", "0.58809614", "0.587086", "0.58652586", "0.58636785", "0.58622575", "0.5852", "0.5850823", "0.58444494", "0.58433807", "0.5827989", "0.58200043", "0.58124304", "0.5810153" ]
0.64773816
23
Get order via OrderItem
public function getOrder() { if ($this->_order === false) { $items = $this->items; $first = reset($items); $this->_order = $first !== null ? $first->order : null; } return $this->_order; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function orderItem(): OrderItem\n {\n return $this->order_item;\n }", "protected function getOrderItem()\n\t{\n\t\t$search = $this->object->createSearch();\n\n\t\t$expr = [];\n\t\t$expr[] = $search->compare( '==', 'order.base.rebate', 14.50 );\n\t\t$expr[] = $search->compare( '==', 'order.base.sitecode', 'unittest' );\n\t\t$expr[] = $search->compare( '==', 'order.base.price', 53.50 );\n\t\t$expr[] = $search->compare( '==', 'order.base.editor', $this->editor );\n\t\t$search->setConditions( $search->combine( '&&', $expr ) );\n\t\t$results = $this->object->searchItems( $search );\n\n\t\tif( ( $item = reset( $results ) ) === false ) {\n\t\t\tthrow new \\RuntimeException( 'No order found' );\n\t\t}\n\n\t\treturn $item;\n\t}", "public function item($order)\n {\n return SiteMaintenanceItem::where('main_id', $this->id)->where('order', $order)->first();\n }", "public function getCustomerOrderItem()\n {\n return $this->customerOrderItem;\n }", "public function getOrder(string $order_id): \\GDAX\\Types\\Response\\Authenticated\\Order;", "public function getOrderById($orderId)\n {\n }", "public function getOrder() { \n if ($this->hasOrder()) {\n return $this->getData('order');\n }\n if (Mage::registry('current_order')) {\n return Mage::registry('current_order');\n }\n if (Mage::registry('order')) {\n return Mage::registry('order');\n }\n Mage::throwException(Mage::helper('sales')->__('Can\\'t get order instance'));\n }", "public function getInvoiceOrder();", "public function show($orderItem)\n {\n }", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder()\n {\n\n }", "protected function getOrderItemObjectByIdOrUuid($id)\n {\n \n if ($this->orderItem == null) {\n \n if (preg_match('/^\\d{1,}$/', $id, $res)) {\n $orderItem = OrderItemPeer::retrieveById($id);\n }\n else {\n $orderItem = OrderItemPeer::retrieveByUuid($id);\n }\n \n $this->forward404Unless($orderItem);\n $this->forward404Unless($orderItem->getMemberId() == $this->getUser()->getUserId());\n $this->orderItem = $orderItem;\n }\n \n return $this->orderItem;\n }", "function getOrder()\n{\n\n}", "public function getById($orderlineId);", "private function getOrder($orderoid){\n $rs = selectQuery('select * from WTSORDER where KOID=\"'.$orderoid.'\"');\n if ($rs->rowcount() == 1){\n $ors = $rs->fetch();\n foreach($ors as $k=>$v){\n\t$order->{$k} = $v;\n }\n } else {\n $order = null;\n XLogs::critical(get_class($this), 'Impossible de trouver la commande ayant pour KOID : '.$orderoid);\n }\n return $order;\n }", "public function getOrder()\n {\n return $this->hasOne(Orders::className(), ['id' => 'order_id']);\n }", "protected function _getOrder()\n {\n if (empty($this->_order)) {\n // get proper order\n $id = $this->_request['track_id'];\n $this->_order = Mage::getModel('sales/order')->loadByIncrementId($id);\n if (!$this->_order->getId()) {\n $this->_debugData['exception'] = sprintf('Wrong order ID: \"%s\".', $id);\n $this->_debug();\n Mage::app()->getResponse()\n ->setHeader('HTTP/1.1','503 Service Unavailable')\n ->sendResponse();\n exit;\n }\n }\n return $this->_order;\n }", "function getOrder($orderId) {\n\techo \"Getting Order: \" . $orderId . \"</br>\";\n\t$response = getRequest('/api/order/' . $orderId);\n\tprintInfo($response);\n}", "public function getorderitembyid($orderid){\n\t\t$this->db->where('OrdId', $orderid);\n\t\t$this->db->select('LintItemId,OrdId,ItemId,ItemName,ItemEdition,ItemAuther,ItemQuantity,ItemRetailPrice,ItemSellingPrice,ItemDiscount,ProductThumbImage,ProductLanguage');\n\t\t$this->db->from('tbl_order_lineitems');\n\t\t$this->db->join('tbl_products', 'tbl_products.ProductId = tbl_order_lineitems.ItemId', 'inner');\n\t\t$query=$this->db->get();\n\t\treturn $query->result();\n\t\t// $query=$this->db->get('tbl_order_lineitems');\n\t\t// return $query->result();\n\t}", "public function orderItem()\n {\n return $this->belongsTo(OrderItem::class)->withTrashed();\n }", "function get_order()\n{\n\n}", "function get ($id) {\n // PARAM $id : order ID\n\n $order = $this->fetch(\n \"SELECT * FROM `orders` WHERE `order_id`=?\", [$id]\n );\n $order['items'] = $this->fetch(\n \"SELECT * FROM `orders_items` LEFT JOIN `products` USING (`product_id`) WHERE `orders_items`.order_id=?\", \n [$id], \"product_id\"\n );\n return $order;\n }", "public function show(OrderItem $orderItem)\n {\n return OrderItemResource($orderItem);\n }", "function getOrder();", "public function getOrder()\n {\n return $this->hasOne(Order::className(), ['id' => 'order_id']);\n }", "public function getOrder()\n {\n return $this->hasOne(Order::className(), ['id' => 'order_id']);\n }", "public function getOrderId();", "public function getOrder()\n {\n return $this->getItem()->getOrder();\n }", "public function show(TxShopDomainModelOrderItem $order)\n {\n //\n }", "public function get_order( $order_id ) {\n\t\treturn $this->request( \"orders/{$order_id}\" );\n\t}", "public function getDeliveryOrder();", "private function getOrder($order_id){\r\n\r\n if($this->flow_woocommerce_version_check()){\r\n return new WC_Order($order_id);\r\n }\r\n else{\r\n return wc_get_order($order_id);\r\n }\r\n }", "public function getOrder($id) {\n return Order::fetch($id);\n }", "static public function getOrderById($order_id) {\n $order = DB::table('orders')->where('id', $order_id)->get();\n return $order;\n }", "abstract public function getOrderAble();", "public function getOrder()\n {\n return $this->orderFactory->create()->load($this->getReservedOrderId(), 'increment_id');\n }", "public function getOrder()\n {\n $orderId = $this->getData(self::ORDER_ID);\n\n return $this->order->load($orderId);\n }", "public function getOneOrder($orderId) {\n\n $this->load->model('account/order');\n return $this->model_account_order->getOrder($orderId);\n }", "private function _getOrder()\n {\n if (!is_null($this->_order)) {\n return $this->_order;\n }\n \n $orderId = $this->getRequest()->getParam('orderId');\n if (!empty($orderId)) {\n $this->_order = Mage::getSingleton('sales/order')->loadByIncrementId($orderId);\n return $this->_order;\n }\n \n Mage::throwException('Forbidden');\n }", "function getOrder(){\n\t\treturn $this->order;\n\t}", "public function processOrderItem(OrderItem $item)\n {\n // since we are create a subscription, we delegate the subscription creation to that model\n Subscription::createFromOrderItem($item);\n\n return $item;\n }", "static public function getOrderById($id) {\n $rq = \"SELECT * FROM \" . PREFIX . \"sales.`order` \n WHERE `id` =\" . $id . \" LIMIT 1;\";\n\n $aItem = Sql::Get($rq, 1);\n \n return $aItem[0];\n }", "public function read($order_id) {\n\n global $user;\n\n //watchdog('musth_restws', 'W7D001 5DXS OrderResourceController start read (!i) (!p) ',\n // array('!i' => print_r($order_id, true),\n // '!p' => print_r('', true)),\n // WATCHDOG_DEBUG);\n\n $order_as_array = entity_load('commerce_order', array($order_id));\n $order = $order_as_array[$order_id];\n\n // The order total, which is in the field commerce_order_total, is calculated\n // automatically when the order is refreshed, which happens at least when we\n // call the line item api to get all the line items of an order\n\n // Refreshing the order in case any product changed its price or there are other\n // changes to take care of\n\n // Since we refresh the order here, there is no need to do it when we load\n // line items. Just call the order query api first and then the line item query api\n\n if ($order->status == 'cart')\n commerce_cart_order_refresh($order);\n\n $order_wrapper = entity_metadata_wrapper('commerce_order', $order);\n\n //watchdog('musth_restws', 'W7D001 71788 kkk OrderResourceController read (!i) (!p) ',\n // array('!i' => print_r('', true),\n // '!p' => print_r('', true)),\n // WATCHDOG_DEBUG);\n\n if (isset($order->commerce_customer_billing[LANGUAGE_NONE]))\n $customer_profile_id = $order->commerce_customer_billing[LANGUAGE_NONE][0]['profile_id'];\n else\n $customer_profile_id = 0;\n\n if ($user->uid) {\n // For logged-in users we can send back the email address\n\n $user_email = $order->mail;\n\n } else {\n // For anonymous users we can't\n\n $user_email = 'Cant send you the email address for privacy';\n }\n\n $order_to_return = new Order($order->order_id,\n $order->order_number,\n $order->uid,\n $user_email,\n $customer_profile_id,\n $order->status,\n $order_wrapper->commerce_order_total->amount->value(),\n $order_wrapper->commerce_order_total->currency_code->value(),\n $order->created,\n $order->changed\n );\n\n //watchdog('musth_restws', 'W7D001 7171 OrderResourceController read (!i) (!p) ',\n // array('!i' => print_r('', true),\n // '!p' => print_r('', true)),\n // WATCHDOG_DEBUG);\n\n // Sending back the Order object\n\n return $order_to_return;\n }", "public function getOrder($user_id, $order_id)\n {\n $where = [\n 'user_id' => $user_id,\n 'order_id' =>$order_id,\n ];\n $result = $this->where($where)->find(); \n\n return $result;\n }", "public function getOrder($orderId) {\n\t\t$action = new EventerraActionMyOrders($this);\n\t\ttry {\n\t\t\t$array = $action->request($orderId);\n\t\t} catch (\\Eventerra\\Exceptions\\EventerraSDKException $exception) {\n\t\t\tif ($exception->getCode() == 5) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tthrow $exception;\n\t\t\t}\n\t\t}\n\t\treturn array_shift($array);\n\t}", "public function orderItem($param) { \n if (!$this->aaa->has_right('openruth', 500))\n $res->orderItemError->_value = 'authentication_error';\n else {\n $targets = $this->config->get_value('ruth', 'ztargets');\n $agencyId = self::strip_agency($param->agencyId->_value);\n if ($tgt = $targets[$agencyId]) {\n // build order\n $ord = &$order->Reservation->_value;\n $ord->LibraryNo->_value = $agencyId;\n $ord->BorrowerTicketNo->_value = $param->userId->_value;\n $ord->DisposalNote->_value = $param->orderNote->_value;\n $ord->LastUseDate->_value = self::to_zruth_date($param->orderLastInterestDate->_value);\n $ord->ServiceCounter->_value = $param->agencyCounter->_value;\n $ord->Override->_value = (self::xs_true($param->agencyCounter->_value) ? 'Y' : 'N');\n $ord->Priority->_value = $param->orderPriority->_value;\n // ?????? $ord->DisposalType->_value = $param->xxxx->_value;\n $itemIds = &$param->orderItemId;\n if (is_array($itemIds))\n foreach ($itemIds as $oid) {\n $mrid->ID->_value = $oid->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $oid->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID[]->_value = $mrid;\n }\n else {\n $mrid->ID->_value = $itemIds->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $itemIds->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID->_value = $mrid;\n }\n $xml = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?'.'>' . utf8_decode($this->objconvert->obj2xml($order));\n \n//print_r($ord);\n//print_r($xml);\n \n $z = new z3950();\n $z->set_target($tgt['host']);\n $z->set_database($tgt['database'].'-ophelia');\n $z->set_authentication($tgt['authentication']);\n if ($tgt['proxy']) {\n $z->set_proxy($tgt['proxy']);\n }\n $xml_ret = $z->z3950_xml_update($xml, $tgt['timeout']);\n if ($z->get_errno() == 0 && $xml_ret['xmlUpdateDoc']) {\n $dom = new DomDocument();\n $dom->preserveWhiteSpace = false;\n if ($dom->loadXML($xml_ret['xmlUpdateDoc'])) {\n if ($err = &$dom->getElementsByTagName('ErrorResponse')->item(0)) {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') errno: ' . $err->getAttribute('Err') . \n ' error: ' . $err->nodeValue);\n $res->orderItemError->_value = 'unspecified error, order not possible';\n } else {\n // order at least partly ok \n foreach ($dom->getElementsByTagName('MRID') as $mrid) {\n unset($ir);\n $ir->orderItemId->_value->itemId->_value = $mrid->getAttribute('Id');\n if ($mrid->getAttribute('Tp'))\n $ir->orderItemId->_value->itemSerialPartId->_value = $mrid->getAttribute('Tp');\n if (!$mrid->nodeValue)\n $ir->orderItemOk->_value = 'true';\n elseif (!($ir->orderItemError->_value = $this->errs[$mrid->nodeValue])) \n $ir->orderItemError->_value = 'unknown error: ' . $mrid->nodeValue;\n $res->orderItem[]->_value = $ir;\n }\n }\n }\n } else {\n self::log_z_error(__FUNCTION__, __LINE__, $agencyId, $z->get_errno(), $z->get_error_string());\n $res->orderItemError->_value = 'system error';\n }\n//echo \"\\n\";\n//print_r($xml_ret);\n//print_r(\"\\nError: \" . $z->get_errno());\n } else\n $res->orderItemError->_value = 'unknown agencyId';\n }\n\n $ret->orderItemResponse->_value = $res;\n //var_dump($param); var_dump($res); die();\n return $ret;\n }", "public function getOrderItems()\n {\n return $this->hasMany(OrderItems::class, ['oi_order_id' => 'id']);\n }", "public function get_order() {\n return wc_get_order( $this->get_order_id() );\n }", "protected function getOrder($orderId) {\n $order = Order::with('items.catalog.product')->where('id', '=', $orderId)->where('status', '=', Order::PENDING)->first();\n return $order;\n }", "public function getOrderByReference(string $order_reference): OrderInterface;", "public static function order($orderId) {\n //Return an object with the information about $orderId\n\t\t\treturn self::get(self::order_index() . '/' . $orderId);\n\t\t}", "function getSelectedOrder($orderId) {\n try {\n // get DB connection\n $db = new DbOperation();\n $orders = $db->getSelectedOrder ($orderId);\n if ( $orders != null ) {\n echo '{\"gotOrder\":' . json_encode ( $orders ) . '}';\n } else {\n echo '{\"error\":{\"text\":' . \"Failed to get orders data\" . '}}';\n }\n } catch ( Exception $e ) {\n echo '{\"error\":{\"text\":' . $e->getMessage () . '}}';\n }\n}", "public function orderItem()\n {\n /* @var $customerAccount MagentoComponents_Pages_CustomerAccount */\n $customerAccount = Menta_ComponentManager::get('MagentoComponents_Pages_CustomerAccount');\n $customerAccount->login();\n\n /* @var $cart MagentoComponents_Pages_Cart */\n $cart = Menta_ComponentManager::get('MagentoComponents_Pages_Cart');\n $cart->clearCart();\n\n /* @var $productSingleView MagentoComponents_Pages_ProductSingleView */\n $productSingleView = Menta_ComponentManager::get('MagentoComponents_Pages_ProductSingleView');\n $productSingleView->putProductsIntoCart($this->getConfiguration()->getValue('testing.simple.product.id'));\n\n /* @var $onePageCheckout MagentoComponents_Pages_OnePageCheckout */\n $onePageCheckout = Menta_ComponentManager::get('MagentoComponents_Pages_OnePageCheckout');\n\n $onePageCheckout->goThroughCheckout();\n\n $this->getHelperAssert()->assertTextNotPresent(\"There was an error capturing the transaction.\");\n $orderNumber = $onePageCheckout->getOrderNumberFromSuccessPage();\n\n return $orderNumber;\n }", "public function getOrderById($id_order)\n {\n return $this->orderRepository->getOrderById($id_order);\n }", "public function getOrder($url, $orderUUID);", "public function getOrder()\n {\n return $this->__get(\"order\");\n }", "public function getOrderItems()\n {\n return $this->hasMany(OrderItem::className(), ['order_id' => 'id'])->inverseOf('order');\n }", "public function getQuotationItemData($order_id = null)\n\t{\n\t\t$selected_financial_year = $this->session->userdata(\"selected_financial_year\");\n\n\t\tif (!$order_id) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$sql = \"SELECT * FROM quotation_item JOIN item_master WHERE quotation_item.quotation_no = ? AND item_master.Item_ID=quotation_item.item_id AND financial_year_id=$selected_financial_year AND quotation_item.status=1\";\n\t\t$query = $this->db->query($sql, array($order_id));\n\t\treturn $query->result_array();\n\t}", "protected function getShopOrder(){\n if($this->oShopOrder===null){\n $this->oShopOrder = new Order($this->get('current_orders_id'));\n }\n if(!$this->oShopOrder instanceof Order){\n throw new Exception(\"order is not found. shop order id : \".$this->get('current_orders_id'));\n }\n return $this->oShopOrder;\n }", "public function getOrderById($id){\n $this->db->query(\"SELECT * FROM orders WHERE id = :id\");\n\n $this->db->bind(':id', $id);\n \n $row = $this->db->single();\n\n return $row;\n }", "public static function get_pre_order_item( $order ) {\n\n\t\tif ( ! is_object( $order ) )\n\t\t\t$order = new WC_Order( $order );\n\n\t\t// get 1st order item\n\t\treturn array_pop( array_values( $order->get_items() ) );\n\t}", "public function GetItem()\r\n\t{\r\n\t\treturn $this->_phreezer->GetManyToOne($this, \"fk_reference_item1\");\r\n\t}", "public function getOrder()\n {\n \treturn $this->_order;\n }", "public function getOrderline() {\n return $this->orderline;\n}", "private function fetchOrder()\n {\n $this->oOrder = Mage::getSingleton('sales/order');\n try {\n $this->oOrder->load($this->getParameter('orderid',self::REGEX_INTEGER));\n } catch (Exception $e) {\n $this->returnMessage = self::MESSAGE_INVALID_ORDER_ID;\n $this->returnStatus = self::STATUS_ERROR;\n $this->sendStatus();\n }\n\n if(!$this->oOrder->getPayment() || substr($this->oOrder->getPayment()->getMethod(),0,3) != 'mcp') {\n $this->returnMessage = self::MESSAGE_NOT_MICROPAYMENT_ORDER;\n $this->returnStatus = self::STATUS_ERROR;\n $this->sendStatus();\n }\n }", "public function order()\n {\n return $this->belongsTo(SellerOrderProxy::modelClass());\n }", "public function getExistingOrder($orderid = '') {\n $orderid = isset($orderid) ? $orderid : '';\n\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId($orderid);\n\n // if no order found\n if (!$order->getId())\n return FALSE;\n else\n return $order;\n}", "public function get($id)\n {\n header('Access-Control-Allow-Origin: *'); \n $order = Order::find($id);\n \n return $order;\n }", "public function getOrderDetail()\n {\n return $this->orderDetail;\n }", "public function getOrderFromSession(): Order\n {\n $id = Session::pull('mall.payment.order');\n\n return Order::findOrFail($id);\n }", "public function retrieve($item);", "public function show(Order $order)\n {\n return $order;\n }", "public function model()\n {\n return OrderItem::class;\n }", "public function model()\n {\n return OrderItem::class;\n }", "public function get_order_by_id($id) {\n if(!$id) {\n throw new Exception('id should not be empty');\n }\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/orders/$id.json\");\n }", "public function getOrder()\n {\n return $this->order;\n }", "public function getOrder()\n {\n return $this->order;\n }", "public function getOrder()\n {\n return $this->order;\n }", "public function getOrder()\n {\n return $this->order;\n }", "public function getOrder()\n {\n return $this->order;\n }", "public function getOrder()\n {\n return $this->order;\n }", "public function getOrder()\n {\n return $this->order;\n }", "public function getOrder()\n {\n return $this->order;\n }", "public function getOrder()\n {\n return $this->order;\n }", "public function getOrder()\n {\n return $this->order;\n }", "public function getOrder()\n {\n return $this->order;\n }", "public function getId()\n {\n return $this->source['order_item_id'];\n }", "public function orderQueryAction()\n {\n // https://api.weixin.qq.com/pay/orderquery?access_token=xxxxxx\n $orderId = $this->params()->fromRoute('id', '0');\n\n $order = $this->getOrderTable()->getOrder($orderId);\n if ($orderId == '0' || !$order) {\n return $this->errorViewModel(array('code' => 1, 'msg' => 'order '.$orderId.' not exist.'));\n }\n\n $postResult = $this->orderQuery($orderId);\n // echo $postResult;\n echo '<br>errcode:';\n echo $postResult->errcode;\n echo '<br>errmsg:';\n echo $postResult->errmsg;\n if ($postResult->errcode == 0) {\n echo '<br>orderinfo:';\n var_dump($postResult->order_info);\n }\n\n return $this->viewModel();\n }", "public function getOrderById($order_id)\n {\n $client = $this->httpClientFactory->create();\n $client->setUri($this->chronos_url.\"orders/$order_id/detail/\");\n $client->setMethod(\\Zend_Http_Client::GET);\n $client->setHeaders([\n 'Content-Type: application/json', \n 'Accept: application/json',\n \"Authorization: Token $this->token\"\n ]);\n try {\n $response = $client->request();\n $body = $response->getBody();\n $string = json_decode(json_encode($body),true);\n $order_data=json_decode($string);\n \n return $order_data;\n } catch (\\Zend_Http_Client_Exception $e) {\n $this->logger->addInfo('Chronos order save helper', [\"Get order error\"=>$e->getMessage()]);\n return false;\n }\n }", "abstract function get ($item);", "public function getOrdersItemData($order_id = null)\n\t{\n\t\tif(!$order_id) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$sql = \"SELECT * FROM orders_item WHERE order_id = ?\";\n\t\t$query = $this->db->query($sql, array($order_id));\n\t\treturn $query->result_array();\n\t}", "function getOrderDetails($id)\n {\n }", "public function getOrderLineItems($orderID)\n {\n \n }", "function invokeGetOrder(MarketplaceWebServiceOrders_Interface $service, $request, $request_item)\n {\n try {\n $response = $service->getOrder($request);\n\n /*item*/\n\n \t$request_item->setAmazonOrderId(\"102-2843002-9986658\");\n\n\n//\t\t\t \t$response_item = $service->listOrderItems($request_item);\n// $listOrderItemsResult = $response_item->getListOrderItemsResult();\n// $orderItems = $listOrderItemsResult->getOrderItems();\n// $orderItemList = $orderItems->getOrderItem();\n//\n//\t\t\t\techo '<pre>'.print_r($orderItemList,1).'</pre>';\n//\n//\t\t\t\techo $orderItemList['0']->getSellerSKU();\n//\t\t\t\texit();\n\n\t\t\t\t//$request_item->setAmazonOrderId(\"002-6565335-7985002\");\n\t\t\t\t$orderItemList =$service->listOrderItems($request_item)->getListOrderItemsResult()->getOrderItems()->getOrderItem();\n\n\t\t\t\techo count($orderItemList).'<br>';\n\t\t\t\tforeach($orderItemList as $val){\n\n\t\t\t\t\techo 'sku:'.$val->getSellerSKU();\n\t\t\t\t\t $itemPrice = $val->getItemPrice();\n\t\t\t\t\techo 'price:'.$itemPrice->getAmount();\n\t\t\t\t}\n\t\t\t//\texit();\n\n\n// foreach ($orderItemList as $orderItem) {\n// \t if ($orderItem->isSetSellerSKU())\n// {\n// echo(\" SellerSKU��<br>\");\n// echo(\" \" . $orderItem->getSellerSKU() . \"��<br>\");\n// }\n// }\n /*item*/\n\n echo (\"Service Response��<br>\");\n echo (\"=============================================================================��<br>\");\n\n echo(\" GetOrderResponse��<br>\");\n if ($response->isSetGetOrderResult()) {\n echo(\" GetOrderResult��<br>\");\n $getOrderResult = $response->getGetOrderResult();\n if ($getOrderResult->isSetOrders()) {\n echo(\" Orders��<br>\");\n $orders = $getOrderResult->getOrders();\n $orderList = $orders->getOrder();\n foreach ($orderList as $order) {\n echo(\" Order��<br>\");\n if ($order->isSetAmazonOrderId())\n {\n echo(\" AmazonOrderId��<br>\");\n echo(\" \" . $order->getAmazonOrderId() . \"��<br>\");\n }\n if ($order->isSetSellerOrderId())\n {\n echo(\" SellerOrderId��<br>\");\n echo(\" \" . $order->getSellerOrderId() . \"��<br>\");\n }\n\n //echo \"SKU��<br>\";\n \t//echo $order->getSellerSKU().'��<br>';\n\n\n if ($order->isSetPurchaseDate())\n {\n echo(\" PurchaseDate��<br>\");\n echo(\" \" . $order->getPurchaseDate() . \"��<br>\");\n }\n if ($order->isSetLastUpdateDate())\n {\n echo(\" LastUpdateDate��<br>\");\n echo(\" \" . $order->getLastUpdateDate() . \"��<br>\");\n }\n if ($order->isSetOrderStatus())\n {\n echo(\" OrderStatus��<br>\");\n echo(\" \" . $order->getOrderStatus() . \"��<br>\");\n }\n if ($order->isSetFulfillmentChannel())\n {\n echo(\" FulfillmentChannel��<br>\");\n echo(\" \" . $order->getFulfillmentChannel() . \"��<br>\");\n }\n if ($order->isSetSalesChannel())\n {\n echo(\" SalesChannel��<br>\");\n echo(\" \" . $order->getSalesChannel() . \"��<br>\");\n }\n if ($order->isSetOrderChannel())\n {\n echo(\" OrderChannel��<br>\");\n echo(\" \" . $order->getOrderChannel() . \"��<br>\");\n }\n if ($order->isSetShipServiceLevel())\n {\n echo(\" ShipServiceLevel��<br>\");\n echo(\" \" . $order->getShipServiceLevel() . \"��<br>\");\n }\n if ($order->isSetShippingAddress()) {\n echo(\" ShippingAddress��<br>\");\n $shippingAddress = $order->getShippingAddress();\n if ($shippingAddress->isSetName())\n {\n echo(\" Name��<br>\");\n echo(\" \" . $shippingAddress->getName() . \"��<br>\");\n }\n if ($shippingAddress->isSetAddressLine1())\n {\n echo(\" AddressLine1��<br>\");\n echo(\" \" . $shippingAddress->getAddressLine1() . \"��<br>\");\n }\n if ($shippingAddress->isSetAddressLine2())\n {\n echo(\" AddressLine2��<br>\");\n echo(\" \" . $shippingAddress->getAddressLine2() . \"��<br>\");\n }\n if ($shippingAddress->isSetAddressLine3())\n {\n echo(\" AddressLine3��<br>\");\n echo(\" \" . $shippingAddress->getAddressLine3() . \"��<br>\");\n }\n if ($shippingAddress->isSetCity())\n {\n echo(\" City��<br>\");\n echo(\" \" . $shippingAddress->getCity() . \"��<br>\");\n }\n if ($shippingAddress->isSetCounty())\n {\n echo(\" County��<br>\");\n echo(\" \" . $shippingAddress->getCounty() . \"��<br>\");\n }\n if ($shippingAddress->isSetDistrict())\n {\n echo(\" District��<br>\");\n echo(\" \" . $shippingAddress->getDistrict() . \"��<br>\");\n }\n if ($shippingAddress->isSetStateOrRegion())\n {\n echo(\" StateOrRegion��<br>\");\n echo(\" \" . $shippingAddress->getStateOrRegion() . \"��<br>\");\n }\n if ($shippingAddress->isSetPostalCode())\n {\n echo(\" PostalCode��<br>\");\n echo(\" \" . $shippingAddress->getPostalCode() . \"��<br>\");\n }\n if ($shippingAddress->isSetCountryCode())\n {\n echo(\" CountryCode��<br>\");\n echo(\" \" . $shippingAddress->getCountryCode() . \"��<br>\");\n }\n if ($shippingAddress->isSetPhone())\n {\n echo(\" Phone��<br>\");\n echo(\" \" . $shippingAddress->getPhone() . \"��<br>\");\n }\n }\n if ($order->isSetOrderTotal()) {\n echo(\" OrderTotal��<br>\");\n $orderTotal = $order->getOrderTotal();\n if ($orderTotal->isSetCurrencyCode())\n {\n echo(\" CurrencyCode��<br>\");\n echo(\" \" . $orderTotal->getCurrencyCode() . \"��<br>\");\n }\n if ($orderTotal->isSetAmount())\n {\n echo(\" Amount��<br>\");\n echo(\" \" . $orderTotal->getAmount() . \"��<br>\");\n }\n }\n if ($order->isSetNumberOfItemsShipped())\n {\n echo(\" NumberOfItemsShipped��<br>\");\n echo(\" \" . $order->getNumberOfItemsShipped() . \"��<br>\");\n }\n if ($order->isSetNumberOfItemsUnshipped())\n {\n echo(\" NumberOfItemsUnshipped��<br>\");\n echo(\" \" . $order->getNumberOfItemsUnshipped() . \"��<br>\");\n }\n if ($order->isSetPaymentExecutionDetail()) {\n echo(\" PaymentExecutionDetail��<br>\");\n $paymentExecutionDetail = $order->getPaymentExecutionDetail();\n $paymentExecutionDetailItemList = $paymentExecutionDetail->getPaymentExecutionDetailItem();\n foreach ($paymentExecutionDetailItemList as $paymentExecutionDetailItem) {\n echo(\" PaymentExecutionDetailItem��<br>\");\n if ($paymentExecutionDetailItem->isSetPayment()) {\n echo(\" Payment��<br>\");\n $payment = $paymentExecutionDetailItem->getPayment();\n if ($payment->isSetCurrencyCode())\n {\n echo(\" CurrencyCode��<br>\");\n echo(\" \" . $payment->getCurrencyCode() . \"��<br>\");\n }\n if ($payment->isSetAmount())\n {\n echo(\" Amount��<br>\");\n echo(\" \" . $payment->getAmount() . \"��<br>\");\n }\n }\n if ($paymentExecutionDetailItem->isSetSubPaymentMethod())\n {\n echo(\" SubPaymentMethod��<br>\");\n echo(\" \" . $paymentExecutionDetailItem->getSubPaymentMethod() . \"��<br>\");\n }\n }\n }\n if ($order->isSetPaymentMethod())\n {\n echo(\" PaymentMethod��<br>\");\n echo(\" \" . $order->getPaymentMethod() . \"��<br>\");\n }\n if ($order->isSetMarketplaceId())\n {\n echo(\" MarketplaceId��<br>\");\n echo(\" \" . $order->getMarketplaceId() . \"��<br>\");\n }\n if ($order->isSetBuyerEmail())\n {\n echo(\" BuyerEmail��<br>\");\n echo(\" \" . $order->getBuyerEmail() . \"��<br>\");\n }\n if ($order->isSetBuyerName())\n {\n echo(\" BuyerName��<br>\");\n echo(\" \" . $order->getBuyerName() . \"��<br>\");\n }\n if ($order->isSetShipmentServiceLevelCategory())\n {\n echo(\" ShipmentServiceLevelCategory��<br>\");\n echo(\" \" . $order->getShipmentServiceLevelCategory() . \"��<br>\");\n }\n }\n }\n }\n if ($response->isSetResponseMetadata()) {\n echo(\" ResponseMetadata��<br>\");\n $responseMetadata = $response->getResponseMetadata();\n if ($responseMetadata->isSetRequestId())\n {\n echo(\" RequestId��<br>\");\n echo(\" \" . $responseMetadata->getRequestId() . \"��<br>\");\n }\n }\n\n } catch (MarketplaceWebServiceOrders_Exception $ex) {\n echo(\"Caught Exception: \" . $ex->getMessage() . \"��<br>\");\n echo(\"Response Status Code: \" . $ex->getStatusCode() . \"��<br>\");\n echo(\"Error Code: \" . $ex->getErrorCode() . \"��<br>\");\n echo(\"Error Type: \" . $ex->getErrorType() . \"��<br>\");\n echo(\"Request ID: \" . $ex->getRequestId() . \"��<br>\");\n echo(\"XML: \" . $ex->getXML() . \"��<br>\");\n }\n }", "protected function getOrderItemRequest($order_id, $order_item_id)\n {\n // verify the required parameter 'order_id' is set\n if ($order_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $order_id when calling getOrderItem'\n );\n }\n if ($order_id < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$order_id\" when calling DefaultApi.getOrderItem, must be bigger than or equal to 1.');\n }\n // verify the required parameter 'order_item_id' is set\n if ($order_item_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $order_item_id when calling getOrderItem'\n );\n }\n if ($order_item_id < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$order_item_id\" when calling DefaultApi.getOrderItem, must be bigger than or equal to 1.');\n }\n $resourcePath = '/orders/{orderId}/items/{orderItemId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // path params\n if ($order_id !== null) {\n $resourcePath = str_replace(\n '{' . 'orderId' . '}',\n ObjectSerializer::toPathValue($order_id),\n $resourcePath\n );\n }\n // path params\n if ($order_item_id !== null) {\n $resourcePath = str_replace(\n '{' . 'orderItemId' . '}',\n ObjectSerializer::toPathValue($order_item_id),\n $resourcePath\n );\n }\n // body params\n $_tempBody = null;\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n \n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n \n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "private function getOrderById(int $orderId): OrderInterface\n {\n return $this->orderRepository->get($orderId);\n }" ]
[ "0.79775673", "0.7709103", "0.7270492", "0.67805743", "0.66949904", "0.65179837", "0.6491721", "0.646457", "0.64298713", "0.64253235", "0.64253235", "0.64253235", "0.64253235", "0.64253235", "0.64253235", "0.64241093", "0.6380101", "0.6374588", "0.63639975", "0.6361472", "0.6344341", "0.6320779", "0.6316955", "0.6306805", "0.63027865", "0.6300222", "0.62963784", "0.6295703", "0.62842387", "0.6270311", "0.6270311", "0.6248188", "0.6242993", "0.6236387", "0.62328535", "0.62017536", "0.61983085", "0.6194217", "0.61835545", "0.6159409", "0.6153848", "0.614347", "0.61387527", "0.6138399", "0.61330175", "0.61073035", "0.61062735", "0.61021376", "0.6078874", "0.6071472", "0.606567", "0.60618234", "0.60573256", "0.60436076", "0.6038253", "0.6030151", "0.6022839", "0.6017448", "0.59704125", "0.59449846", "0.5941386", "0.5936369", "0.59337056", "0.5931653", "0.5928764", "0.59281415", "0.59091306", "0.5906326", "0.5899909", "0.5893437", "0.5885063", "0.5877915", "0.58728606", "0.585963", "0.5855832", "0.5851063", "0.5849292", "0.58446974", "0.58446974", "0.58438766", "0.58425283", "0.58425283", "0.58425283", "0.58425283", "0.58425283", "0.58425283", "0.58425283", "0.58425283", "0.58425283", "0.58425283", "0.58425283", "0.5839729", "0.5830237", "0.5827795", "0.58222365", "0.58190924", "0.5815242", "0.5814982", "0.5808217", "0.5806963", "0.58031875" ]
0.0
-1
////////////////////////////////////////////////////////////////////////// CONVERT THIS OBJECT TO A STRING //////////////////////////////////////////////////////////////////////////
public function __toString() { return $this->query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function objectToString($obj);", "public function toString()\n {\n return json_encode($this->obj);\n }", "abstract function objectAsString($object);", "public function to_string() { return $this->__toString(); }", "function objectToString( &$object ) {\n\n\t}", "public function __toString() : string\n {\n return \\json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString() : string\n {\n return \\json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString() : string\n {\n return \\json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString() : string\n {\n return \\json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString() : string\n {\n return \\json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString() : string\n {\n return \\json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString()\n {\n return (string) $this->exportTo(JadwalPeer::DEFAULT_STRING_FORMAT);\n }", "public function __toString() : string\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString() : string\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }", "public function __toString(){\n return $this->convert();\n }", "public function SerializeObject () {\n return serialize ($this);\n }", "public function __tostring();", "public function __toString() { return $this->as_string(); }", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "public function __toString();", "function __toString() \n {\n $str = \"\";\n foreach(get_object_vars($this) as $name => $obj) {\n if ($obj != NULL) {\n $obj->name = $name; #nombre de la variable que hace de nombre de objecto\n $str .= $obj->label();\n $str .= $obj;\n $str .= \"<br />\\n\";\n }\n }\n return $str;\n }", "public function __toString()\n\t{\n\t\treturn $this->serialize();\n\t}", "public function __tostring() {\n\n\t\t\t//convet to string\n\t\t\treturn \"{\".\n\t\t\t\t\t\t\"id:\".$this->_id.\n\t\t\t\t\t\t\"type:\".$this->_type.\n\t\t\t\t\t\t\"path:\".$this->_path.\n\t\t\t\t\t\t\"name:\".$this->_name.\n\t\t\t\t\t\"}\";\n\n\t\t}", "public function __toString() {\n\t\tif (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n\t\t\treturn json_encode(\\Wallee\\Sdk\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n\t\t}\n\n\t\treturn json_encode(\\Wallee\\Sdk\\ObjectSerializer::sanitizeForSerialization($this));\n\t}", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n } else {\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\MuhimbiPDFOnline\\Client\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString() {\n\t\treturn get_class($this) . '-object ' . \"\\n\" .\n\t\t\t 'attributes: ' . print_r($this->attributes, 1) . \"\\n\";\n\t}", "public function toString() : void\n {\n $out = serialize($this);\n \n }", "public function __toString(): string\n {\n return $this->toJson();\n }", "function dataToString($object=null) {\r\n\t\treturn $object->__toString();\r\n\t}", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\SquareConnect\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Dcm\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Dcm\\ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\n {\n //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n // return json_encode(\n // ObjectSerializer::sanitizeForSerialization($this),\n // JSON_PRETTY_PRINT\n // );\n //}\n\n return json_encode(ObjectSerializer::sanitizeForSerialization($this));\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }", "public function __toString()\r\n {\r\n return json_encode(\r\n ObjectSerializer::sanitizeForSerialization($this),\r\n JSON_PRETTY_PRINT\r\n );\r\n }" ]
[ "0.7949348", "0.76995915", "0.7502178", "0.7483433", "0.74777883", "0.74508584", "0.74508584", "0.74508584", "0.74508584", "0.74508584", "0.74508584", "0.74363697", "0.7421616", "0.7421616", "0.74210876", "0.74118394", "0.74014544", "0.7378918", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.73684096", "0.7357219", "0.7341811", "0.7301426", "0.729899", "0.7295092", "0.7295092", "0.72913915", "0.7284418", "0.726773", "0.7265481", "0.7256081", "0.72547936", "0.7253027", "0.72530246", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617", "0.72518617" ]
0.0
-1
////////////////////////////////////////////////////////////////////////// CONVERT THIS OBJECT TO A PUDLVALUE //////////////////////////////////////////////////////////////////////////
public function pudlValue(pudl $pudl, $quote=true) { return $this->query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function convertToUserIntObject() {}", "public function toNative()\n {\n return $this->value;\n }", "public function convertToObject(\\SetaPDF_Core_Type_Raw $data) {}", "abstract protected function to_primitive($res);", "abstract public function convertFromRawValue($value);", "public function valueOf() {\n return $this->_value;\n }", "public function &getValue();", "public function getValue()\n {\n return new TDProject_Core_Common_ValueObjects_System_UserValue($this);\n }", "public function toObject()\r\n\t{\r\n\t\treturn (object)$this->m_data;\r\n\t}", "public function toObject();", "public function convert();", "public function value() { return $this->_m_value; }", "public static function convert($value)\n {\n switch (gettype($value)) {\n case 'NULL':\n // Support for the <nil> extension\n // (http://ontosys.com/xml-rpc/extensions.php)\n return new \\fpoirotte\\XRL\\Types\\Nil(null);\n\n case 'boolean':\n return new \\fpoirotte\\XRL\\Types\\Boolean($value);\n\n case 'integer':\n try {\n return new \\fpoirotte\\XRL\\Types\\I4($value);\n } catch (\\InvalidArgumentException $e) {\n }\n return new \\fpoirotte\\XRL\\Types\\I8($value);\n\n case 'double':\n return new \\fpoirotte\\XRL\\Types\\Double($value);\n\n case 'string':\n // We try to encode it as a regular string if possible.\n if (static::isBinaryString($value)) {\n return new \\fpoirotte\\XRL\\Types\\Base64($value);\n }\n return new \\fpoirotte\\XRL\\Types\\StringType($value);\n\n case 'array':\n $newValue = array_map(\"static::convert\", $value);\n try {\n return new \\fpoirotte\\XRL\\Types\\ArrayType($newValue);\n } catch (\\InvalidArgumentException $e) {\n }\n return new \\fpoirotte\\XRL\\Types\\Struct($newValue);\n\n case 'resource':\n throw new \\InvalidArgument('Cannot encode PHP resource as XML-RPC type');\n\n case 'object':\n // A special treatment is applied afterwards.\n break;\n }\n\n // Only objects & resources remain after this point.\n if ($value instanceof \\fpoirotte\\XRL\\Types\\AbstractType) {\n return $value;\n }\n\n if ($value instanceof \\GMP) {\n $candidates = array(\n '\\\\fpoirotte\\\\XRL\\\\Types\\\\I4',\n '\\\\fpoirotte\\\\XRL\\\\Types\\\\I8',\n '\\\\fpoirotte\\\\XRL\\\\Types\\\\BigInteger',\n );\n foreach ($candidates as $candidate) {\n try {\n return new $candidate($value);\n } catch (\\InvalidArgumentException $e) {\n }\n }\n }\n\n if ($value instanceof \\DateTime) {\n return new \\fpoirotte\\XRL\\Types\\DateTimeIso8601($value);\n }\n\n if (($value instanceof \\DOMNode) ||\n ($value instanceof \\XMLWriter) ||\n ($value instanceof \\SimpleXMLElement)) {\n return new \\fpoirotte\\XRL\\Types\\Dom($value);\n }\n\n if ($value instanceof \\Exception) {\n return new \\fpoirotte\\XRL\\Types\\Struct(\n array(\n 'faultCode' => new \\fpoirotte\\XRL\\Types\\IntType($value->getCode()),\n 'faultString' => new \\fpoirotte\\XRL\\Types\\StringType(\n get_class($value).': '.$value->getMessage()\n ),\n )\n );\n }\n\n if (is_object($value) && (\n ($value instanceof \\Serializable) ||\n method_exists($value, '__sleep'))) {\n $value = serialize($value);\n\n // We try to encode it as a regular string if possible.\n if (static::isBinaryString($value)) {\n return new \\fpoirotte\\XRL\\Types\\Base64($value);\n }\n return new \\fpoirotte\\XRL\\Types\\StringType($value);\n }\n\n throw new \\InvalidArgumentException('Cannot convert the given object to an XML-RPC type');\n }", "public function getValue() {\n \n return $this->toScalar();\n }", "public function getValue()\n {\n return self::decodeValue($this->value);\n }", "public function toValue ()\n\t{\n\t\t// Execute and get params\n\t\t$params = $this->parse();\n\n\t\t// Return params\n\t\treturn $params;\n\t}", "abstract public function cast($value);", "public function toNative()\n {\n $value = parent::toNative();\n\n return \\intval($value);\n }", "public function convertToDrupalValue($value);", "public function getFormattedValue()\n {\n return $this->dbObject('Value');\n }", "public function getValue(): mixed;", "public function getValue(): mixed;", "public function toReal()\n {\n $value = $this->toNative();\n $real = new Real($value);\n\n return $real;\n }", "public function GetValue() {\n\t\treturn $this->_value;\n\t}", "private function convertObjToType($obj){\n\t\t$output = new Type();\n\t\t\n\t\tif(!empty($obj->id)){\n\t\t\t$output->id = $obj->id;\n\t\t}\n\t\t\n\t\tif(!empty($obj->img_presents)){\n\t\t\t$output->img_present = $obj->img_presents;\n\t\t}\n\t\t\n\t\tif(!empty($obj->color_overlay)){\n\t\t\t$output->color_overlay = $obj->color_overlay;\n\t\t}\n\t\t\n\t\tif(!empty($obj->label)){\n\t\t\t$output->label = $obj->label;\n\t\t}\n\t\t\n\t\treturn($output);\n\t\t\n\t}", "public function convertToPhpValue($data);", "abstract public function convertFromDb($value, Entity\\ScalarField $field);", "public function value();", "public function value();", "public function value();", "abstract protected function getValue();", "abstract function toEntity($value);", "abstract public function getValue();", "abstract public function getValue();", "public function getValue()\n {\n return $this->_db->prepareStringToOut($this->_value);\n }", "abstract public function getValue();", "public function toValue() {\r\n\t\treturn $this->PDOStatement->fetchColumn();\r\n\t}", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function convertToPHPValue($value);", "private function buildValueObject($theval,$tab,$proptab,$Document,$lng){\r\n\t\t\t$prop = $this->getTabItemById($proptab, (int)$tab[1]);\r\n\t\t\t$propDAO = $this->factory->getPropertyDAO();\r\n\t\t\t$value = null;\r\n\t\t\tif(is_null($prop)){\r\n\t\t\t\t$prop = $propDAO->getById($tab[1]);\r\n\t\t\t\tarray_push($proptab, $prop);\r\n\t\t\t}\r\n\t\t\tif(FormManager::validateProperty((int)$tab[1],$theval)){\r\n\t\t\t\t$value = new PropertyValue(0);\r\n\t\t\t\t$value->setPropertyId((int)$tab[1]);\r\n\t\t\t\t$value->setLangue($lng);\r\n\t\t\t\t$value->setDocumentId($Document->getId());\r\n\t\t\t\t$meth = \"set\".$prop->getTypeProperty()->getMethod();\r\n\t\t\t\t$value->$meth($theval);\r\n\t\t\t\t//$value=$valDAO->add($value);\t\r\n\t\t\t}else{\r\n\t\t\t\ttrigger_error(\"ERR_BAD_FORMAT\", E_USER_ERROR);\r\n\t\t\t}\r\n\t\t\treturn $value;\r\n\t\t\t\r\n\t}", "public function toDson(): CBORObject\n {\n /** @var PrimitiveSerializer $serializer */\n $serializer = radix()->get(PrimitiveSerializer::class);\n return $serializer->toDson($this);\n }", "public function valueOf() {\n return $this->_values;\n }", "public function encodedValue()\n\t{\n\t\treturn $this->definition\n\t\t\t? $this->definition->encode($this->value)\n\t\t\t: $this->value;\n\t}", "public function getValueType();", "protected function value_get(){\n\t\t\n\t\tif ( is_serialized( $this->value ) ) {\n\t\t\t$this->value = unserialize( $this->value );\n\t\t} elseif ( is_string( $this->value ) && 0 === strpos( $this->value, '{' ) && is_object( $_value = json_decode( $this->value ) ) ) {\n\t\t\t$this->value = (array) $_value;\n\t\t}\n\n\t\treturn $this->value;\n\t\t\n\t}", "abstract public function getValueType();", "public function value() {\n if ($this->_m_value !== null)\n return $this->_m_value;\n $this->_m_value = $this->lookupTable()[($this->tag() - 213)];\n return $this->_m_value;\n }", "public function value()\r\n\t{\r\n\t\tif ($this->isFetched() && $this->isValid())\r\n\t\t{\r\n\t\t\treturn $this->normalizedValue;\r\n\t\t}\t\r\n\t\treturn null;\r\n\t}", "function get_value_db()\n\t{\n\t\treturn $this->value;\n\t}", "protected static function makeValueObject($item): ValueObjectInterface\n {\n if ($item instanceof ValueObjectInterface) {\n return $item;\n }\n\n if (is_iterable($item)) {\n return self::isAssocArray($item) ? Dictionary::fromNative($item) : self::fromNative($item);\n }\n\n if (is_int($item)) {\n $item = Integer::fromNative($item);\n } elseif (is_float($item)) {\n $item = Real::fromNative($item);\n } elseif (null === $item) {\n $item = new NullValue();\n } else {\n $item = StringLiteral::fromNative((string) $item);\n }\n\n return $item;\n }", "abstract protected function doActualConvert();", "abstract public function Convert($data);", "public function getValue(){\n \treturn $this->value;\n }", "public function getRawValue();", "protected function _convertValue ($value) {\n switch ($value) {\n case 'null':\n # Null value\n $value = null;\n break;\n\n case 'true':\n # Boolean\n $value = true;\n break;\n\n case 'false':\n # Boolean\n $value = false;\n break;\n\n default:\n if (is_numeric ($value)) {\n\n # Number\n if (preg_match ('/^-?[1-9][0-9]*$/', $value)) {\n\n # Regular 10-base integer\n $value = intval ($value, 10);\n\n } else if (preg_match ('/^-?0[0-7]*$/', $value)) {\n\n # 8-base integer\n $value = intval ($value, 8);\n\n } else if (preg_match ('/^-?0x[0-9a-z]*$/i', $value)) {\n\n # 16-base integer\n $value = intval ($value, 16);\n\n } else {\n\n # Floating point number\n $value = $value + 0;\n\n }\n\n } else {\n\n # String\n /*NOP*/;\n\n }\n }\n return $value;\n }", "private function dtoValue($value, BasePrimitive $primitive)\n\t\t{\n\t\t\t$result = null;\n\t\t\t\n\t\t\tif ($value instanceof DTOClass) {\n\t\t\t\t\n\t\t\t\t$result = $value; // have been already built\n\t\t\t\t\n\t\t\t} elseif ($primitive instanceof PrimitivePolymorphicIdentifier) {\n\t\t\t\t\n\t\t\t\t$result = PrimitivePolymorphicIdentifier::export($value);\n\t\t\t\t\n\t\t\t} elseif ($primitive instanceof PrimitiveBoolean) {\n\t\t\t\t\n\t\t\t\t$result = (boolean)$value;\n\t\t\t\t\n\t\t\t} elseif ($value instanceof Identifiable) {\n\t\t\t\t\n\t\t\t\t$result = $value->getId();\n\t\t\t\t\n\t\t\t} elseif (\n\t\t\t\t$value instanceof Stringable\n\t\t\t) {\n\t\t\t\t$result = $value->toString();\n\t\t\t\t\n\t\t\t} else\n\t\t\t\tthrow new WrongArgumentException(\n\t\t\t\t\t'don\\'t know how to convert to DTO value of class '\n\t\t\t\t\t.get_class($value)\n\t\t\t\t);\n\t\t\t\n\t\t\treturn $result;\n\t\t}", "function uv ($v) {\n return OMap::isa($v) || OList::isa($v) ? $v->val : $v;\n}", "public function toMixed();", "public abstract function makeValue($value);", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }", "public function value()\n {\n if ($args = func_get_args()) {\n $this->__value = $args[0];\n }\n return $this->__value;\n }" ]
[ "0.65030134", "0.6242483", "0.59319115", "0.58512574", "0.5768277", "0.57326555", "0.5703738", "0.5703442", "0.5666044", "0.5577412", "0.5571459", "0.55501133", "0.5544163", "0.5531154", "0.5449392", "0.5438295", "0.53932387", "0.53904474", "0.5387725", "0.5382515", "0.53785545", "0.53785545", "0.53767663", "0.537493", "0.53654736", "0.5356331", "0.5347742", "0.5329056", "0.5329056", "0.5329056", "0.53233355", "0.5322519", "0.5314855", "0.5314855", "0.5314802", "0.5313265", "0.5298788", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5289588", "0.5276813", "0.5261592", "0.5245675", "0.5234168", "0.523101", "0.5228327", "0.52168524", "0.52099985", "0.51877105", "0.5184875", "0.51836944", "0.51833296", "0.5179786", "0.51760846", "0.5140266", "0.51381004", "0.5136761", "0.5128644", "0.51144147", "0.51033187", "0.5102086", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356", "0.5093356" ]
0.0
-1
////////////////////////////////////////////////////////////////////////// RETURN DEFAULT VALUES //////////////////////////////////////////////////////////////////////////
public function free() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDefaults(){\n\t\treturn array();\n\t}", "public function getDefaults();", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "private function getDefault(){\n\t\treturn array(\n\t\t\t'id' => \t'', \n\t\t\t'name' => \t'',\n\t\t\t'date' => \t'', \n\t\t\t'lvl' => \t'', \n\t\t\t'exp' => \t''\n\t\t);\n\t}", "public function getDefaultValues() {\n\t\treturn $this->defaultValues;\n\t}", "abstract protected function defaults(): array;", "protected function _getDefaultValues()\n {\n return array(\n );\n }", "public function getDefaultValues()\n {\n return $this->defaultValues;\n }", "public function getDefaultValues()\n {\n return $this->defaultValues;\n }", "public function getDefaults(): array;", "public function getDefaultValue();", "public function getDefaultValue();", "function defaults() {\n\t\t$ret = array();\n\t\tforeach($this->schema() as $key => $field) {\n\t\t\tif(!$field['primary'] && !is_null($field['default'])) {\n\t\t\t\t$ret[$key] = $field['default'];\n\t\t\t}\n\t\t}\n\n\t\treturn $ret;\n\t}", "public function getDefaultValue() {}", "public function getDefaultValue() {}", "public function setDefaultValues() {\n return [];\n }", "public function GetDefaults ();", "public static function getDefaults()\n {\n return [];\n }", "public function getDefaultValues()\n {\n $values = [];\n\n return $values;\n }", "public function getDefaultValue(): mixed;", "public function get_default_value()\n {\n return [\n 'id' => '',\n 'url' => '',\n 'size' => '',\n 'name' => '',\n ];\n }", "protected function getDefaultValue()\n {\n return new Value( array() );\n }", "public function assignDefaultValues() {\n\t\t$this->assignByArray(self::$DEFAULT_VALUES);\n\t}", "public function assignDefaultValues() {\n\t\t$this->assignByArray(self::$DEFAULT_VALUES);\n\t}", "public function assignDefaultValues() {\n\t\t$this->assignByArray(self::$DEFAULT_VALUES);\n\t}", "public function defaultData();", "public function get_default()\n\t{\n\t\t$return = $this->default;\n\n\t\tif (count($args = func_get_args()) >= 1) \n\t\t{\n\t\t\tisset($args[0]) && is_array($args[0]) && $args = $args[0];\n\t\t\t$_return = array();\n\t\t\tforeach ($args as $arg)\n\t\t\t{\n\t\t\t\tif (isset($return[$arg]))\n\t\t\t\t{\n\t\t\t\t\t$_return[$arg] = $return[$arg];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tempty($_return) OR $return = $_return;\n\t\t\tunset($_return);\n\t\t}\n\t\treturn $return;\n\t}", "public function getDefault();", "protected function defaultValues() : array\n {\n return [\n 'limit' => 20,\n 'offset' => 0,\n 'order_by_dir' => 'DESC',\n ];\n }", "protected function getDefaultAtts() {\n \t\t\n \t\treturn array_combine(\n array_map(function($param) { \n \t\treturn $param['param_name'];\n }, $this->params),\n \t\tarray_map(function($param) { \n \t\treturn ! empty( $param['default'] ) ? $param['default'] : '';\n }, $this->params)\n );\n \t\t\n\t\t}", "public function get_default_params()\n {\n }", "protected function get_default_params() {\n\t\t$defaults = [];\n\t\t$schema = $this->get_public_item_schema();\n\t\tforeach ( $schema['properties'] as $arg => $options ) {\n\t\t\tif ( isset( $options['default'] ) ) {\n\t\t\t\t$defaults[ $arg ] = $options['default'];\n\t\t\t}\n\t\t}\n\t\treturn $defaults;\n\t}", "public function getDefaultParams()\n {\n $defaults = array(\n );\n return $defaults;\n }", "public function getDefaultParameters();", "public function getDefaultParameters();", "protected function getDefaults()\n {\n $defaults = [\n \"query\" => [],\n \"headers\" => [\n \"Content-Type\" => \"application/json\",\n \"Accept\" => \"application/hal+json\",\n ],\n ];\n\n if (!empty($this->defaults)) {\n $defaults = call_user_func($this->defaults, $defaults);\n }\n\n return $defaults;\n }", "private function getDefaultValues()\n {\n return [\n 'year-start' => 1997,\n 'year-end' => 2018,\n 'month-start' => 1,\n 'month-end' => 12,\n 'page-start' => 1,\n 'page-end' => 300,\n ];\n }", "public function getDefaultParameters() {\n\t\treturn array(\n\n\t\t);\n\t}", "public function getDefaultVars() {\n\t\t$ret = array();\n\t\tforeach ($this->_vars as $key => $var) {\n\t\t\t$ret[$key] = $var->defaultValue;\n\t\t}\n\t\treturn $ret;\n\t}", "protected function defaultParams()\r\n\t{\r\n\t\treturn array();\r\n\t}", "public function getDefaultValue()\n {\n\treturn $this->default;\n }", "protected function get_default() {\n\t\treturn array( 'ownerID' => 0 );\n\t}", "public function & GetDefaults () {\n\t\treturn $this->defaults;\n\t}", "protected function getDefaultValues() {\n\t\treturn array(\n\t\t\t'name' => '',\n\t\t\t'email' => '',\n\t\t\t'isEnabled' => true);\n\t}", "public function getDefaults() {\n\t\treturn $this->_defaults;\n\t}", "function setDefaultValues() {}", "public function getDefaults() {\n\n\t\treturn [\n\t\t\t'module' => $this->_defaultModule,\n\t\t\t'controller' => $this->_defaultController,\n\t\t\t'action' => $this->_defaultAction,\n\t\t\t'params' => $this->_defaultParams\n\t\t];\n\t}", "function getDefaultValues($table = null){\n // If cTable was not passed in, return empty array:\n if ($table==null ) \n return array();\n \n // Set up blank array:\n $returnValue = array();\n \n // Get the fields:\n $result = $this->query(\"DESCRIBE `{$table}`\");\n $nbRows = $this->numRows($result);\n if (count($nbRows)==0) \n return array();\n\n // Scan through each field and assign defaults:\n for($i=0; $i < $nbRows; $i++) {\n $val = $this->fetchAssoc($result);\n if ($val['Default'] AND $val['Default']=='CURRENT_TIMESTAMP') {\n $returnValue[$val['Field']] = date('Y-m-d H:i:s'); \n }\n if ($val['Extra'] AND $val['Extra']=='auto_increment') {\n $returnValue[$val['Field']] = 0; \n }\n if ($val['Default'] AND $val['Default']!='CURRENT_TIMESTAMP') {\n $returnValue[$val['Field']] = $val['Default'];\n } else {\n if ($val['Null']=='YES') {\n $returnValue[$val['Field']] = NULL;\n } else {\n $type = $val['Type'];\n if (strpos($type,'(')!==false)\n $type = substr($type,0,strpos($type,'('));\n if (in_array($type,array('varchar','text','char','tinytext','mediumtext','longtext','set',\n 'binary','varbinary','tinyblob','blob','mediumblob','longblob'))) {\n $returnValue[$val['Field']] = '';\n } elseif ($type=='datetime') {\n $returnValue[$val['Field']] = '0000-00-00 00:00:00';\n } elseif ($type=='date') {\n $returnValue[$val['Field']] = '0000-00-00';\n } elseif ($type=='time') {\n $returnValue[$val['Field']] = '00:00:00';\n } elseif ($type=='year') {\n $returnValue[$val['Field']] = '0000';\n } elseif ($type=='timestamp') {\n $returnValue[$val['Field']] = date('Y-m-d H:i:s');\n } elseif ($type=='enum') {\n $returnValue[$val['Field']] = 1;\n } else { // Numeric:\n $returnValue[$val['Field']] = 0;\n }\n } // end NOT NULL\n } // end default check\n } // end foreach loop \n return $returnValue; \n }", "public function getDefaultValues()\n {\n return[\n 'jumlah_buku' => ''\n ];\n }", "protected function getDefaultValues() {\n\t\treturn array(\n\t\t\t'name' => $this->getStructureNode()->getName(),\n\t\t\t'title' => $this->getStructureNode()->getTitle());\n\t}", "public function getDefaultData()\n {\n return $this->predefined;\n }", "public function getDefaultParams();", "public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}", "public function getExpectedDefaults();", "protected function getDefaultRow()\n {\n $results = array();\n foreach ($this->getFields() as $name => $field) {\n $results[$name] = $field->getDefault();\n }\n return $results;\n }", "public function getAddDefaultsExplicitlyOnInsert();", "final protected function _defaults(){\n if(! $this->_defaults) return;\n foreach($this->_defaults as $conf => $default_value){\n if(! self::inform($conf)) self::define($conf, $default_value);\n }\n }", "abstract public function getColDefaults();", "public function getDefaultSettings() {\n $defaults = array();\n $fields = $this->getFields();\n foreach ($fields as $field) {\n $default = '';\n if (array_key_exists('default', $field) && $field['default']) {\n $default = $field['default'];\n }\n $defaults[$field['name']] = $default;\n }\n return $defaults;\n }", "public function applyDefaultValues()\n {\n $this->jml_lantai = '1';\n $this->asal_data = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "public function addDefaultEntriesAndValues() {}", "function get_default_values() {\n\t\t$output = array();\n\t\t$config = & lcars_Framework::_lcarsframework_lcars();\n\t\tforeach ( (array) $config as $option ) {\n\t\t\tif ( ! isset( $option['id'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( ! isset( $option['std'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( ! isset( $option['type'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( has_filter( 'of_sanitize_' . $option['type'] ) ) {\n\t\t\t\t$output[$option['id']] = apply_filters( 'of_sanitize_' . $option['type'], $option['std'], $option );\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}", "protected function defaults() {\n\t\treturn array( 'content' => false );\n\t}", "public function applyDefaultValues()\n {\n $this->create_date = '2021-06-07 11:49:57';\n $this->last_update = '2021-06-07 11:49:57';\n $this->last_sync = '1901-01-01 00:00:00';\n $this->jml_jamban_l_g = '0';\n $this->jml_jamban_l_tg = '0';\n $this->jml_jamban_p_g = '0';\n $this->jml_jamban_p_tg = '0';\n $this->jml_jamban_lp_g = '0';\n $this->jml_jamban_lp_tg = '0';\n $this->tipe_jamban = '9';\n $this->a_sedia_pembalut = '0';\n $this->a_tempat_sampah_kelas = '0';\n $this->a_tempat_sampah_tutup_p = '0';\n $this->a_cermin_jamban_p = '0';\n $this->a_memiliki_tps = '0';\n $this->a_tps_angkut_rutin = '0';\n $this->a_anggaran_sanitasi = '0';\n $this->a_melibatkan_sanitasi_siswa = '0';\n }", "public function get_default_args(){ return $this->default_args; }", "public function getDefaultValues()\n {\n return [\n 'is_active' => self::STATUS_ENABLED\n ];\n }", "protected function getDefaultValues() {\n\t\t$user = Environment::getCurrent()->getUser();\n\t\t\n\t\treturn array(\n\t\t\t'email' => $user->getEmail(),\n\t\t\t'emailConfirmation' => $user->getEmail());\n\t}", "public function applyDefaultValues()\n {\n $this->deleted = false;\n $this->amount = 1;\n $this->amountevaluation = 0;\n $this->defaultstatus = 0;\n $this->defaultdirectiondate = 0;\n $this->defaultenddate = 0;\n $this->defaultpersoninevent = 0;\n $this->defaultpersonineditor = 0;\n $this->maxoccursinevent = 0;\n $this->showtime = false;\n $this->ispreferable = true;\n $this->isrequiredcoordination = false;\n $this->isrequiredtissue = false;\n $this->mnem = '';\n }", "protected function getDefaultParams()\n {\n return $this->arrDefaultParam;\n }", "protected function get_default() {\n\t\treturn array(\n\t\t\t'ownerID' => 0,\n\t\t\t'accountID' => '',\n\t\t\t'adsenseLinked' => false,\n\t\t\t'adsConversionID' => '',\n\t\t\t'anonymizeIP' => true,\n\t\t\t'internalWebPropertyID' => '',\n\t\t\t'profileID' => '',\n\t\t\t'propertyID' => '',\n\t\t\t'trackingDisabled' => array( 'loggedinUsers' ),\n\t\t\t'useSnippet' => true,\n\t\t\t'canUseSnippet' => true,\n\t\t\t'dashboardView' => Analytics::DASHBOARD_VIEW,\n\t\t);\n\t}", "public function __default()\n\t{\n\n\t}", "protected function getDefaults(): array\n {\n $defaults = [];\n\n foreach ($this->getPropDefs() as $name => $def) {\n if (isset($def['default'])) {\n if ($def['default'] instanceof \\Closure) {\n $defaults[$name] = $def['default']();\n } else {\n $defaults[$name] = $def['default'];\n }\n }\n }\n\n return $defaults;\n }", "public function getDefaultValues()\n {\n $values = [];\n $values['imagewidth'] = '170';\n $values['imageheight'] = '170';\n $values['infinite'] = '1';\n $values['slidestoshow'] = '6';\n $values['slidestoscroll'] = '2';\n $values['breakpointone'] = '1200';\n $values['resoneslidestoshow'] = '4';\n $values['resoneslidestoscroll'] = '2';\n $values['breakpointtwo'] = '600';\n $values['restwoslidestoshow'] = '3';\n $values['restwoslidestoscroll'] = '2';\n $values['breakpointthree'] = '480';\n $values['resthreeslidestoshow'] = '2';\n $values['resthreeslidestoscroll'] = '1';\n return $values;\n }", "public function getValidDefaultValue(): mixed;", "public function get_default(){\n\t\treturn $this->default;\n\t}", "protected function defaults() {\n\t\treturn array(\n\t\t\t'content' => false,\n\t\t\t'content_path' => false,\n\t\t\t'markdown' => false,\n\t\t);\n\t}", "function getDefault()\n {\n return $this->_defValue;\n }", "function get_default_properties()\r\n {\r\n return $this->defaultProperties;\r\n }", "public function getDefaults()\n {\n return [\n 'flash' => $this->getFlashMessage('flash'),\n 'success' => $this->get('success'),\n 'validation_errors' => [],\n 'error' => $this->get('error'),\n ];\n }", "function getDefault() {\n return $this->records[2];\n }", "function getDefaultValue($parentValue = 0)\n {\n $data = array();\n /*\n * Assignation des valeurs par defaut\n */\n foreach ($this->colonnes as $key => $colonne) {\n if (strlen($colonne[\"defaultValue\"]) > 0) {\n if (is_callable(array(\n $this,\n $colonne[\"defaultValue\"]\n ))) {\n /*\n * Appel de la fonction\n */\n $data[$key] = $this->{$colonne[\"defaultValue\"]}();\n } else {\n /*\n * Attribution de la valeur par defaut\n */\n $data[$key] = $colonne[\"defaultValue\"];\n }\n }\n /*\n * Gestion de l'attribut \"pere\"\n */\n if ($parentValue > 0 && strlen($colonne[\"parentAttrib\"]) > 0) {\n $data[$key] = $parentValue;\n }\n }\n return $data;\n }", "public function getDefault()\n {\n return $this->get($this->default);\n }", "public function findDefault();", "private function get_defaults() {\n\t\treturn array(\n\t\t\t'phpbb_path' \t\t\t\t=> '',\n\t\t\t'integrateLogin' \t\t\t=> 0, \n\t\t\t'showHdrFtr' \t\t\t\t=> 'NONE',\n\t\t\t'wpSimpleHdr' \t\t\t\t=> 1,\n\t\t\t'dtdSwitch' \t\t\t\t=> 0,\n\t\t\t'phpbbCensor' \t\t\t\t=> 1,\n\t\t\t'wpPageName' \t\t\t\t=> 'page.php',\n\t\t\t'phpbbPadding' \t\t\t\t=> '6-12-6-12',\n\t\t\t'xposting' \t\t\t\t\t=> 0,\n\t\t\t'phpbbSmilies' \t\t\t\t=> 0,\n\t\t\t'avatarsync'\t\t\t\t=> 1,\n\t\t\t'integcreatewp'\t\t\t\t=> 1,\n\t\t\t'integcreatephpbb'\t\t\t=> 1,\n\t\t\t'xpostautolink' \t\t\t=> 0,\n\t\t\t'xpostspam' \t\t\t\t=> 'all',\n\t\t\t'xpostforce' \t\t\t\t=> -1,\n\t\t\t'xposttype' \t\t\t\t=> 'excerpt',\n\t\t\t'xpostprefix'\t\t\t\t=> '[BLOG] ',\n\t\t\t'cssMagic' \t\t\t\t\t=> 1,\n\t\t\t'templateVoodoo' \t\t\t=> 1,\n\t\t\t'useForumPage' \t\t\t\t=> 1\n\t\t);\n\t}", "protected function getDefaultSchemaVars() {\n\t\treturn array();\n\t}", "public function getDefaultValue() \n\t\t{\n\t\t\treturn $this->defaultValue;\n\t\t}", "public function get_column_defaults() {\n\t\treturn array(\n\t\t\t'user_id' => 0,\n\t\t\t'email' => '',\n\t\t\t'username' => '',\n\t\t\t'name' => '',\n\t\t\t'product_count' => 0,\n\t\t\t'sales_count'\t => 0,\n\t\t\t'sales_value'\t => 0.00,\n\t\t\t'status'\t\t => 'pending',\n\t\t\t'notes' => '',\n\t\t\t'date_created' => date( 'Y-m-d H:i:s' ),\n\t\t);\n\t}", "public function applyDefaultValues()\n {\n $this->create_date = '2020-04-16 09:40:03';\n $this->last_update = '2020-04-16 09:40:03';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "public function defaultStatic() {\n return array();\n }", "public function getDefaultValue()\n {\n if (empty($this->argList)) {\n $products = self::executeMethod('productsList')->getResponse();\n $this->argList = isset($products[0]) ? [$products[0]['id']] : [];\n }\n \n if (empty($this->defaultId)) {\n $categories = self::executeMethod('categoriesList')->getResponse();\n $delivery = self::executeMethod('deliveryVariantsList')->getResponse();\n $payment = self::executeMethod('paymentGatewaysList')->getResponse();\n $collection = self::executeMethod('collectionsList')->getResponse();\n $collect = self::executeMethod('collectsList')->getResponse();\n $statuses = self::executeMethod('customStatusesList')->getResponse();\n\n $this->defaultId = [\n 'product_id' => isset($products[0]) ? $products[0]['id'] : null,\n 'category_id' => isset($categories[0]) ? $categories[0]['id'] : null,\n 'delivery_variant_id' => isset($delivery[0]) ? $delivery[0]['id'] : null,\n 'payment_gateway_id' => isset($payment[0]) ? $payment[0]['id'] : null,\n 'parent_id' => isset($collection[0]) ? $collection[0]['id'] : null,\n 'collection_id' => isset($collect[0]) ? $collect[0]['id'] : null,\n 'permalink' => isset($statuses[0]) ? $statuses[0]['permalink'] : null,\n ];\n }\n }", "function data_preprocessing(&$default_values){\n }", "public function getFactoryDefaults(): array;", "public function applyDefaultValues()\n\t{\n\t\t$this->ativo = true;\n\t\t$this->tipo_acesso = 'M';\n\t\t$this->estado_civil = 'O';\n\t\t$this->nivel_acesso = '1';\n\t\t$this->usuario_validado = false;\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->closed = 0;\n\t\t$this->lastfmid = 0;\n\t\t$this->hasphotos = 0;\n\t}", "protected function defaultAttributes(){\n return [\n 'parentId' => 0, \n 'projectId' => 0, \n 'done' => 0, \n 'potion' => 0, \n 'notes' => array(), \n 'name' => '', \n ];\n }", "protected function func_default() {}", "public function getDefaultValue(): AbstractValue\n {\n return new ScalarValue();\n }", "function dataDefatult($data, $defaultD) {\r\n if ($data)\r\n return $data;\r\n return $defaultD;\r\n}", "public function getDefault($var);" ]
[ "0.76695156", "0.76453567", "0.7643847", "0.7643847", "0.7643847", "0.7591762", "0.7588411", "0.7587908", "0.7570542", "0.74999356", "0.74999356", "0.74233043", "0.73625445", "0.73625445", "0.73561645", "0.73004276", "0.7299505", "0.7284081", "0.72586304", "0.722821", "0.7216843", "0.71913874", "0.71894085", "0.7168739", "0.71385086", "0.71385086", "0.71385086", "0.7128324", "0.7081396", "0.70714253", "0.70401746", "0.70264703", "0.7014354", "0.70116544", "0.6978852", "0.69647247", "0.69647247", "0.6957104", "0.6937354", "0.6932208", "0.6927688", "0.6923511", "0.6921485", "0.6902369", "0.68970877", "0.685511", "0.68429446", "0.68429023", "0.68378675", "0.6833666", "0.68326306", "0.68182313", "0.67945844", "0.67910886", "0.6764269", "0.6756739", "0.6751164", "0.6717966", "0.66881084", "0.6687758", "0.6685939", "0.6637973", "0.6637717", "0.6626676", "0.66233814", "0.6576547", "0.65601367", "0.6527596", "0.65224373", "0.6520771", "0.6517506", "0.6515516", "0.65123487", "0.6507396", "0.6495441", "0.6475777", "0.64603627", "0.6447732", "0.6441101", "0.64107907", "0.64100796", "0.6405942", "0.63966286", "0.63789415", "0.6364428", "0.63528216", "0.6349992", "0.6349971", "0.6347117", "0.6333974", "0.63276315", "0.63211805", "0.6312187", "0.63072", "0.6301523", "0.62992406", "0.6289775", "0.62869185", "0.628183", "0.62778795", "0.6277824" ]
0.0
-1
////////////////////////////////////////////////////////////////////////// GET DETAILS ON A PARTICULAR FIELD COLUMN IN THIS RESULT //////////////////////////////////////////////////////////////////////////
public function getField($column) { if (!$column) return ['QUERY']; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchField();", "public function get_column_detail()\n\t{\n\t\t$ret_fields\t=\t'';\n\t\t$fields\t\t=\t$this->get_fields_info();\n\t\tif ( $fields )\n\t\t{\n\t\t\tforeach( $fields as $field )\n\t\t\t{\n\t\t\t\t$ret_fields\t=\t$ret_fields.', '.$this->table.'.'.$field->name;\n\t\t\t}\n\t\t}\n\n\t\treturn $ret_fields;\n\t}", "function getFieldInfo($sql) {\n $record = $this->DEB->getRow($sql);\n return $this->DEB->fieldinfo;\n }", "function sql_fetch_field($res,$offset = 0)\n {\n $results = array();\n $obj = NULL;\n $results = $res->getColumnMeta($offset);\n foreach($results as $key=>$value) {\n $obj->$key = $value;\n }\n return $obj;\n }", "public abstract function FetchField();", "function fieldInfo( $table, $field );", "public function fetchFields();", "public function fetch_fields() {}", "function getValueFromField()\r\n\t{\r\n\t\treturn $this->row[ key( $this->mapping ) ];\r\n\t}", "function getValueFromField()\n {\n return $this->current_row[ key( $this->mapping ) ];\n }", "function getfield($field){\n\n\t\treturn($this->record[$field]);\n\t}", "public function get_field_struct($database,$table,$field){\n\t\t$sql=\"SELECT * FROM `information_schema`.`COLUMNS` WHERE `TABLE_SCHEMA`='$database' AND `TABLE_NAME`='$table' AND `COLUMN_NAME`='$field' ;\"; \t\t\n\t\t$this->query($sql);\n\t\treturn $this->fetch();\n\t}", "protected function getCompleteFieldInformation() {}", "function sql_field_name($res, $offset = 0)\n {\n $column = $res->getColumnMeta($offset);\n if ($column) {\n return $column['name'];\n }\n return false;\n }", "function get_field( $field, $query = null ){\r\n\t\tif( $row = $this->get_row( $query ) and isset( $row[$field] ) )\r\n\t\t\treturn $row[$field];\r\n\r\n\t}", "public function getFieldByName($field) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_resultFields[$field]) && isset($this->_result[$this->_resultFields[$field]])) return $this->_result[$this->_resultFields[$field]];\n\t\t\telse parent::throwGetColException('trying to get non existing data ('.$field.') in ProjectsListingsModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('trying to get non existing data ('.$field.') in ProjectsListingsModel::getFieldByName', __LINE__, __FILE__);\n\t}", "public function getField(){\n return $this->field;\n }", "public function getField();", "public function getField();", "public function getField();", "function getField(){\n\t\treturn $this->Field;\n\t}", "public function get_field(/* .... */)\n {\n return $this->_field;\n }", "function field_data()\r\n\t{\r\n\t\t$retval = array();\r\n /*\r\n echo \"<pre>\";\r\n var_dump($this->result_id);\r\n var_dump($this->pdo_results);\r\n echo \"</pre>\";\r\n */\r\n $table_info = $this->pdo_results;\r\n assert(is_array($table_info));\r\n foreach ($table_info as $row_info) {\r\n $F = new stdClass();\r\n $F->name = $row_info['name'];\r\n $F->type = $row_info['type'];\r\n $F->default = $row_info['dflt_value'];\r\n $F->max_length = 0;\r\n $F->primary_key = $row_info['pk'];\r\n \r\n $retval[] = $F;\r\n }\r\n\r\n return $retval;\r\n }", "function GetField($field=0){\n\t\t\treturn @mysql_result($this->result,0,$field);\n\t\t}", "public function getLookupField() {}", "public function details_report_fields($val)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('report_fields');\n\t\t$this->db->join('crystal_report_time','crystal_report_time.report_time_id=report_fields.report_time_id');\n\t\t$this->db->where('report_id',$val);\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}", "public function getFieldByName($field) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_resultFields[$field]) && isset($this->_result[$this->_resultFields[$field]])) return $this->_result[$this->_resultFields[$field]];\n\t\t\telse parent::throwGetColException('trying to get non existing data ('.$field.') in CampaignDefinitionsModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('trying to get non existing data ('.$field.') in CampaignDefinitionsModel::getFieldByName', __LINE__, __FILE__);\n\t}", "public function getFieldInfo()\r\n\t{\r\n\t\treturn $this->fieldInfo;\r\n\t}", "public function getItemInfo($where_clause, $fields_to_fetch){\n $this->db->select($fields_to_fetch);\n \n $this->db->where($where_clause);\n\n $run_q = $this->db->get('transactions');\n \n return $run_q->num_rows() ? $run_q->row() : FALSE;\n }", "function news_get_field( $p_news_id, $p_field_name ) {\r\n\t\t$row = news_get_row( $p_news_id );\r\n\t\treturn ( $row[$p_field_name] );\r\n\t}", "function get_data($field=null)\n {\n $query=$this->recruitment_model->get_faculty_info($this->user_id);\n\n $result=$query->result_array();\n if($field==null)\n {\n return $result[0];\n }\n return $result[0][$field];\n }", "function get_field($field, $where_field, $where_value, $debug = FALSE)\r\n {\r\n \t\r\n \t$this->db->select($field)->from($this->table)->where($where_field, $where_value);\r\n \t$query_db = $this->db->get();\r\n \t\r\n \tif($debug)\r\n \t{\r\n \t\tprint_a('Arguments~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');\r\n \t\tprint_a($field);\r\n \t\tprint_a($where_field);\r\n \t\tprint_a($where_value);\r\n \t\t\r\n \t\tprint_a('SQL returned handle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');\r\n \t\tprint_a($query_db);\r\n \t\t\r\n \t\tprint_a('DB data~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');\r\n \t\tprint_a($query_db->row_array());\r\n \t}\r\n \telse\r\n \t{\r\n \t\tif($query_db->num_rows)\r\n \t\t{\r\n \t\t\t$results = $query_db->row_array(); \r\n \t\t\treturn $results[$field];\r\n \t\t\t\r\n \t\t}\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n }", "function f($field) {\n\t\treturn($this->fetchfield($field));\n\t}", "public function getField($field_name);", "function getField($campo)\n{\n\treturn $this->res2[$campo];\n}", "public function bankdetailFields()\n {\n $fullResult = $this->client->call(\n 'crm.requisite.bankdetail.fields'\n );\n return $fullResult;\n }", "protected function get_column_info()\n {\n }", "protected function get_column_info()\n {\n }", "function my_get_field_list( $table_name ){\r\n\t\r\n\t$query = \" SHOW fields FROM `\".$table_name.\"` \";\r\n\t$result = my_query( $query );\r\n\t \r\n\twhile($row = my_fetch_array( $result ) ){\r\n\t\t$data = $row['Field'];\r\n\t\tbreak;\r\n\t}\r\n\t\r\n\treturn $data;\r\n\t\r\n}", "function getDataField() {return $this->_datafield;}", "public function getColumnDetails( $tablename, $columnname );", "public function getField()\n {\n return $this->_field;\n }", "public function fetchField($result = false, $offset = 0){\n $this->resCalc($result);\n return mysql_fetch_field($result, $offset);\n }", "function db_field_name($qid, $fieldno) {\n\n\treturn mysqli_fetch_field_direct($qid, $fieldno);\n}", "function getField($col, $sF, $sV, $tbl, $cmd, $other = null) \n {\n return $this->$cmd(\"SELECT {$this->clean($col) } FROM {$this->clean($tbl) } WHERE {$this->clean($sF) }='{$this->clean($sV) }' {$other}\");\n }", "function get_row_data($table,$field_name,$id)\r\n\t{\t\r\n\t\t$sql_query=\"SELECT * FROM $table WHERE `id`='\".$id.\"'\";\r\n\t\t$res_query=hb_mysql_query($sql_query);\r\n\t\t$rows_query=hb_mysql_fetch_array($res_query);\r\n\t\t\r\n\t\t$get_field_name=$rows_query[$field_name];\r\n\t\t\r\n\t\treturn $get_field_name;\r\n\t}", "public function fetchField(){\n $this->debugBacktrace();\n $this->fetchType = \"fetch_field\";\n return $this;\n }", "public function __get ($field) {\n return $this->__fields[$field]['data'];\n }", "public function getFieldByName($field) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_resultFields[$field]) && isset($this->_result[$this->_resultFields[$field]])) return $this->_result[$this->_resultFields[$field]];\n\t\t\telse parent::throwGetColException('trying to get non existing data ('.$field.') in PollTemplatesModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('trying to get non existing data ('.$field.') in PollTemplatesModel::getFieldByName', __LINE__, __FILE__);\n\t}", "function getUserInfo($user='',$field='')\r\n\t{\r\n\t\tif($user != '')\r\n\t\t{\r\n\t\t\t$sql = $GLOBALS['db']->Query(\"SELECT $field FROM \" . PREFIX . \"_users WHERE Status = '1' AND Id = '$user'\");\r\n\t\t\t$row = $sql->fetchrow();\r\n\t\t\t$sql->close();\r\n\t\t\treturn $row->$field;\r\n\t\t}\r\n\t}", "public function getFieldData($oId, $sField)\n {\n return Shopware()->Db()->fetchOne(\"select `\" . $sField . \"` from `asign_orders` where `ordid` = '\" . $oId . \"'\"); \n }", "function adleex_resource_list_column_row( $column_name, $id ) {\nglobal $current_screen;\n\n\tif ($current_screen->post_type!='resource') return;\n\n\tswitch ($column_name) {\n\t\tcase 'post_title':\n\t\tcase 'title' : \n\t\tcase 'date':\n\t\tbreak;\n\t\tcase 'post_author':\n\t\t\techo get_post($id)->post_author;\n\t\tbreak;\n\t\tcase 'post_status':\n\t\t\techo get_post($id)->post_status;\n\t\tbreak;\n\t\tdefault:\n\t\t\t//@TODO va completato quello che ritorno perchè potrebbe essere anche una select e quindi devo restituire il valore associato, \t\n\t\t\techo get_post_meta($id,$column_name,true);\t\t\t\n\t\tbreak;\n\t}\n\n}", "public function getFieldByName($field) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_resultFields[$field]) && isset($this->_result[$this->_resultFields[$field]])) return $this->_result[$this->_resultFields[$field]];\n\t\t\telse parent::throwGetColException('trying to get non existing data ('.$field.') in DiscussCategoriesModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('trying to get non existing data ('.$field.') in DiscussCategoriesModel::getFieldByName', __LINE__, __FILE__);\n\t}", "public function getField() {\n\t\treturn $this->field; \n\t}", "function get_fields_in_table( ){\n\t\t\t\t $result = mysql_query(\"SHOW COLUMNS FROM \".$this->db.\".\".$this->table.\"\");\n\t\t\t\tif (!$result) {\n\t\t\t\t echo 'Could not run query: ' . mysql_error();\n\t\t\t\t exit;\n\t\t\t\t}\n\t\t\t\tif (mysql_num_rows($result) > 0) {\n\t\t\t\t while ($row = mysql_fetch_assoc($result)) {\n\t\t\t\t \n\t\t\t\t //$a_fields[]=$row;\n\t\t\t\t $a_fields[]=$row['Field'].\" | \".$row['Type'];\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\treturn $a_fields;\n\t\t\t }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "function getuserInfo($field,$table,$uniquefield,$uniquefieldvalue){\n \t$query=\"SELECT $field FROM $table WHERE $uniquefield='\".$uniquefieldvalue.\"'\";\n \tif ($query_run=mysqli_query($GLOBALS['link'],$query)) {\n \t\tif ($query_result=mysqli_fetch_row($query_run)) {\n \t\t\treturn $query_result[0];\n \t\t}\n \t}\n }", "public static function fieldDetails($field = null)\n {\n $_items = array(\n 'id' => array(\n 'name' => 'id',\n 'label' => 'ID',\n 'controlType' => 'text',\n 'type' => 'numeric',\n 'primary' => true,\n 'editable' => false,\n 'hidden' => false,\n ),\n 'event_id' => array(\n 'name' => 'event_id',\n 'label' => 'Event ID',\n 'controlType' => 'text',\n 'type' => 'numeric',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'event_start' => array(\n 'name' => 'event_start',\n 'label' => 'Event Start',\n 'controlType' => 'datetime',\n 'type' => 'datetime',\n 'format' => 'yyyy-mm-dd hh:ii',\n 'viewformat' => 'mm/dd/yyyy HH:ii P',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'arena' => array(\n 'name' => 'arena',\n 'label' => 'Arena',\n 'controlType' => 'text',\n 'type' => 'alpha',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'arena_id' => array(\n 'name' => 'arena_id',\n 'label' => 'Arena ID',\n 'controlType' => 'text',\n 'type' => 'numeric',\n 'editable' => false,\n 'hidden' => true,\n ),\n 'location' => array(\n 'name' => 'location',\n 'label' => 'Location',\n 'controlType' => 'text',\n 'type' => 'alpha',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'location_id' => array(\n 'name' => 'location_id',\n 'label' => 'Location ID',\n 'controlType' => 'text',\n 'type' => 'numeric',\n 'editable' => false,\n 'hidden' => true,\n ),\n 'created_on' => array(\n 'name' => 'created_on',\n 'label' => 'Requested On',\n 'controlType' => 'datetime',\n 'type' => 'datetime',\n 'format' => 'yyyy-mm-dd hh:ii',\n 'viewformat' => 'mm/dd/yyyy HH:ii P',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'requester_id' => array(\n 'name' => 'requester_id',\n 'label' => 'Requested By',\n 'controlType' => 'select',\n 'type' => 'alpha',\n 'editable' => false,\n 'hidden' => true,\n ),\n 'requester_name' => array(\n 'name' => 'requester_name',\n 'label' => 'Requested By',\n 'controlType' => 'text',\n 'type' => 'alpha',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'requester_email' => array(\n 'name' => 'requester_email',\n 'label' => 'Requester E-mail',\n 'controlType' => 'text',\n 'type' => 'alpha',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'requester_phone' => array(\n 'name' => 'requester_phone',\n 'label' => 'Requester Phone',\n 'controlType' => 'text',\n 'type' => 'alpha',\n 'editable' => false,\n 'hidden' => false,\n 'inputmask' => array(\n 'mask' => '(999) 999-9999'\n )\n ),\n 'acknowledger' => array(\n 'name' => 'acknowledger',\n 'label' => 'Acknowledged By',\n 'controlType' => 'text',\n 'type' => 'alpha',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'acknowledged_on' => array(\n 'name' => 'acknowledged_on',\n 'label' => 'Acknowledged On',\n 'controlType' => 'datetime',\n 'type' => 'datetime',\n 'format' => 'yyyy-mm-dd hh:ii',\n 'viewformat' => 'mm/dd/yyyy HH:ii P',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'accepter' => array(\n 'name' => 'accepter',\n 'label' => 'Accepted By',\n 'controlType' => 'text',\n 'type' => 'alpha',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'accepted_on' => array(\n 'name' => 'accepted_on',\n 'label' => 'Accepted On',\n 'controlType' => 'datetime',\n 'type' => 'datetime',\n 'format' => 'yyyy-mm-dd hh:ii',\n 'viewformat' => 'mm/dd/yyyy HH:ii P',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'rejector' => array(\n 'name' => 'rejector',\n 'label' => 'Rejected By',\n 'controlType' => 'text',\n 'type' => 'alpha',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'rejected_on' => array(\n 'name' => 'rejected_on',\n 'label' => 'Rejected On',\n 'controlType' => 'datetime',\n 'type' => 'datetime',\n 'format' => 'yyyy-mm-dd hh:ii',\n 'viewformat' => 'mm/dd/yyyy HH:ii P',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'rejected_reason' => array(\n 'name' => 'rejected_reason',\n 'label' => 'Rejection Reason',\n 'controlType' => 'textarea',\n 'type' => 'alpha',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'notes' => array(\n 'name' => 'notes',\n 'label' => 'Notes',\n 'controlType' => 'textarea',\n 'type' => 'alpha',\n 'editable' => true,\n 'hidden' => false,\n ),\n 'type_id' => array(\n 'name' => 'type_id',\n 'label' => 'Type',\n 'controlType' => 'select',\n 'type' => 'numeric',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'status_id' => array(\n 'name' => 'status_id',\n 'label' => 'Status',\n 'controlType' => 'select',\n 'type' => 'numeric',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'event_type_id' => array(\n 'name' => 'event_type_id',\n 'label' => 'Event Type',\n 'controlType' => 'select',\n 'type' => 'numeric',\n 'editable' => false,\n 'hidden' => false,\n ),\n 'event_status_id' => array(\n 'name' => 'event_status_id',\n 'label' => 'Event Status',\n 'controlType' => 'select',\n 'type' => 'alpha',\n 'editable' => false,\n 'hidden' => false,\n ),\n );\n \n if(isset($field)) {\n return isset($_items[$field]) ? $_items[$field] : false;\n } else {\n return $_items;\n }\n }", "public function getField(): string;", "function getFieldValue($field);", "function fetch_field($tbl_name, $flds, $where_condition)\n\n\t{\n\n\t\t\n\n\t\t$param_array = func_get_args();\n\n\t\t$GLOBALS['logger_obj']->debug('<br>METHOD database_manipulation::fetch_field() - PARAMETER LIST : ', $param_array);\n\n\n\n\t\t$qry = \"select \" . $flds . \" from \" . $tbl_name . \" where 1 = 1 and \" . $where_condition;\n\n\t\t\n\n\t\t$res = $this->execute_sql($qry);\n\n\t\t\n\n\t\t$data = mysql_fetch_array($res[0]);\n\n\t\t\n\n\t\t//$ret_val = $data->$flds;\n\n\t\t$ret_val = $data[0];\n\n\t\t\n\n\t\t$GLOBALS['logger_obj']->debug('<br>METHOD database_manipulation::fetch_field() - Return Value : ', $ret_val);\n\n\n\n\t\treturn $ret_val;\n\n\t\n\n\t}", "function pdo_fetch_field($stmt, $column_id) {\r\n \r\n // map meta types to what mysql_fetch_field returned\r\n $native_map = array(\r\n \"BOOL\"=>\"bool\", \"NULL\"=>\"null\", \"BLOB\"=>\"blob\",\r\n \"LONG\"=>\"int\", \"LONGLONG\"=>\"int\", \"BIT\"=>\"int\", \"ENUM\"=>\"int\", \"DECIMAL\"=>\"int\",\r\n \"VAR_STRING\"=>\"string\", \"STRING\"=>\"string\", \"VARCHAR\"=>\"string\",\r\n \"YEAR\"=>\"string\",\r\n );\r\n $pdo_map = array(\r\n PDO::PARAM_STR => \"string\",\r\n PDO::PARAM_INT => \"int\",\r\n PDO::PARAM_BOOL => \"bool\",\r\n PDO::PARAM_NULL => \"null\",\r\n PDO::PARAM_LOB => \"blob\",\r\n );\r\n\r\n // PDO meta field set (no conflicting locals, so extract() will do)\r\n extract(pdo_stmt($stmt)->getColumnMeta($column_id));\r\n \r\n // convert format\r\n return (object)array(\r\n \"name\" => $name,\r\n \"table\" => $table,\r\n \"def\" => NULL, // undocumented\r\n \"max_length\" => $len, // PDO reads from ->max_len, but doesn't match up with libmysqls results\r\n \"not_null\" => in_array(\"not_null\", $flags),\r\n \"primary_key\" => in_array(\"primary_key\", $flags),\r\n \"unique_key\" => in_array(\"unique_key\", $flags),\r\n \"multiple_key\" => in_array(\"multiple_key\", $flags),\r\n \"numeric\" => $native_type == \"LONG\",\r\n \"blob\" => $native_type == \"BLOB\",\r\n \"type\" => isset($native_type) ? $native_map[$native_type] : $pdo_map[$pdo_type],\r\n \"unsigned\" => in_array(\"unsigned\", $flags),\r\n \"zerofill\" => in_array(\"zerofill\", $flags),\r\n );\r\n }", "public function getField() {\n\t\treturn $this->_field;\n\t}", "function get_additional_field($field_id) {\r\n\t\t$sql = \"SELECT * FROM sys_man_additional_fields WHERE field_id = ?\";\r\n\t\t$sql = $this->clean_sql($sql);\r\n\t\t$data = array(\"$field_id\");\r\n\t\t$query = $this->db->query($sql, $data);\r\n\t\t$result = $query->result();\r\n\t\treturn ($result);\r\n\t}", "public function getField() {\n\t\treturn $this->field;\n\t}", "protected function getFieldsFromShowItem() {}", "function get_table_field($table){\n\t return mysql_query(\"SHOW FIELDS FROM \".$table, $this->link);\t\t\n\t}", "function get_fields() {\n global $Tainacan_Item_Metadata;\n return $Tainacan_Item_Metadata->fetch($this, 'OBJECT');\n\n }", "public function getFields(){\n return $this->dbFields;\n }", "public function __get($field_name)\n {\n $entitymeta = $this->link_to_dataset->entitymeta;\n if ($entitymeta) {\n $emtype = $entitymeta->ftype($field_name); // any variator field is general field too\n //println($field_name.' is '.$emtype,1,TERM_RED);\n } else {\n if (ENV != 'PRODUCTION') {\n var_dump($this->link_to_dataset);\n var_dump($this->datarow);\n die('ERROR. NO ->link_to_dataset->entitymeta');\n } else {\n throw Exception('DataRow __get NO ->link_to_dataset->entitymeta');\n }\n }\n\n $Ename = $this->link_to_dataset->entitymeta->name;\n\n if ($field_name == 'id') {\n return $this->datarow['id'];\n }\n\n if ($field_name == 'entity') {\n return $this->entitymeta;\n }\n\n if ($field_name == 'lang') {\n return $this->link_to_dataset->query->lang;\n }\n\n if ($field_name == 'parent') {\n if ($parentid = $this->datarow['_parent']) {\n if ($parentid == 0 or $parentid == '0') {\n return null;\n }\n $m = new Message();\n $m->action = 'load';\n $m->urn = \"urn:{$Ename}:{$parentid}\";\n $m->id = $parentid;\n $parent = $m->deliver();\n return $parent;\n } else {\n return null;\n }\n }\n\n if ($field_name == 'describe') {\n foreach ($entitymeta->extendstructure as $ee) {\n // category etc\n\n $m = new Message();\n $m->action = 'load';\n $m->urn = 'urn:' . $ee;\n $m->id = $this->datarow[$ee . '_id'];\n $extender = $m->deliver();\n// dprintln($extender, 1, TERM_VIOLET);\n// dprintln($ee, 1, TERM_VIOLET);\n// dprintln($m, 1, TERM_VIOLET);\n// dprintln($this->datarow, 1, TERM_VIOLET);\n //Log::info($extender, 'ev');\n\n $extender->extendMergeParents();\n// dprintln($extender, 2, TERM_VIOLET);\n\n $attributes = Entity::extenderAttributesHelper($extender, $this);\n// println($attributes, 1, TERM_GREEN);\n }\n return $attributes;\n }\n\n /**\n * TODO Children\n * if ($field_name == 'children')\n */\n\n if ($field_name == 'urn') {\n $uuid = new UUID($this->datarow['id']);\n $s = \"urn:\" . $Ename . \":\" . $uuid;\n //printlnd($s);\n $urn = new URN($s);\n //printlnd($urn);\n return $urn;\n }\n\n if ($field_name == 'last') {\n return $this->datarow['last'];\n }\n\n if ($field_name == 'first') {\n return $this->datarow[0];\n }\n\n if ($emtype == 'status') {\n $st = (integer) $this->datarow[$field_name];\n if ($st == 1) {\n return true;\n } elseif ($st == 0 or $st == -1) {\n return false;\n } else {\n throw new Exception(\"Status {$this->link_to_dataset->entitymeta}.{$field_name} id({$this->datarow['id']}) code is greater then 1: [{$field_name}={$st}]\");\n }\n }\n\n //println(\"$field_name is $emtype\",1,TERM_RED);\n\n // BT\n if ($emtype == 'belongs_to') {\n //println(\"BT\",1,TERM_RED);\n if ($this->datarow[\"{$field_name}\"] == 0) {\n return null;\n }\n $curHoId = $this->datarow[\"{$field_name}\"];\n\n //printlnd($curHoId);\n /**\n if (count($this->link_to_dataset) > 1)\n {\n //println(\"C > 1\");\n // RETURN PRELOADED & CACHED\n if ($this->link_to_dataset->preloads[$field_name] == true && $curHoId instanceof DataRow)\n {\n return $curHoId;\n } // !ПОВТОРНЫЙ ВЫЗОВ ТОГО ЖЕ DS->DR, DS->DR ДО EACH NEXT\n else if ($this->link_to_dataset->preloads[$field_name] == true && is_numeric($curHoId))\n {\n // we have cur but it is stale\n return $this->link_to_dataset->byURN($this->urn)->$field_name;\n }\n\n\n // PRELOAD ALL INCLUDED DATASET ON FIRST REQUEST\n\n $this->link_to_dataset->preloads[$field_name] = true;\n\n $hoids = $this->link_to_dataset->getColumn($field_name . '_id');\n $m = new Message();\n $m->action = 'load';\n $m->urn = \"urn:{$field_name}\";\n $m->id = array_unique(array_values($hoids));\n $m->subrequest_from = $this->datarow[\"id\"];\n $m->chain = 1;\n $hos = $m->deliver();\n //printlnd($m);\n\n foreach ($hoids as $hurn => $hoid)\n {\n $ho = $hos->byId($hoid);\n if ($ho->id == $curHoId && !$found)\n {\n $hocurrequest = $ho;\n $found = true;\n }\n $this->link_to_dataset->patch($hurn, $field_name . '_id', $ho);\n }\n return $hocurrequest;\n }\n */\n //else // single subrequest\n {\n //println(\"C = 1\");\n //$mk = $this->link_to_dataset->entitymeta->getAlias();\n $relEntity = $this->link_to_dataset->entitymeta->entityByUsedName($field_name);\n $m = new Message();\n $m->action = 'load';\n $m->urn = (string) $relEntity;\n $m->lang = $this->link_to_dataset->query->lang;\n $m->id = $this->datarow[\"{$field_name}\"];\n if (!$this->link_to_dataset->query->lang) {\n $m->lang = SystemLocale::$REQUEST_LANG;\n } else {\n $m->lang = $this->link_to_dataset->query->lang;\n }\n //println($m);\n return Entity::query($m);\n }\n }\n\n // HAS ONE\n if ($emtype == 'has_one' || $emtype == 'use_one') {\n //println(\"111\");\n $FN = $emtype;\n $realEntity = $this->link_to_dataset->entity->$FN($field_name);\n $realEntity = $realEntity[$field_name];\n //println(\"+1 $emtype $realEntity\",1,TERM_RED);\n if (!$this->datarow[\"{$field_name}\"]) {\n return null;\n }\n $curHoId = $this->datarow[\"{$field_name}\"];\n /*\n if (count($this->link_to_dataset) > 1 && !$this->link_to_dataset->query->chain) // 'PRELOAD & CACHED'\n {\n if ($this->link_to_dataset->preloads[$field_name] == true) return $curHoId; // FIRST PRELOAD\n $this->link_to_dataset->preloads[$field_name] = true;\n $hoids = $this->link_to_dataset->getColumn($field_name . '_id');\n $m = new Message();\n $m->action = 'load';\n $m->urn = (string)$realEntity;\n $m->id = array_values($hoids);\n $m->subrequest_from = $this->datarow[\"id\"];\n $m->chain = 1;\n $hos = $m->deliver();\n foreach ($hoids as $hurn => $hoid)\n {\n $ho = $hos->byId($hoid);\n if ($ho->id == $curHoId) $hocurrequest = $ho;\n $this->link_to_dataset->patch($hurn, $field_name . '_id', $ho);\n }\n return $hocurrequest;\n }\n */\n //else // single subrequest\n {\n $m = new Message();\n $m->action = 'load';\n $m->urn = \"urn:\" . $realEntity->name . \":\" . $this->datarow[\"{$field_name}\"];\n $m->subrequest_from = $this->datarow[\"id\"];\n /*\n сквозные статусы - предача вниз только если родиттельские и дочерние имеют одинаковые статусы\n if ($this->link_to_dataset->query->exists('statuses')) $m->statuses = $this->link_to_dataset->query->statuses;\n */\n if (!$this->link_to_dataset->query->lang) {\n $m->lang = SystemLocale::$REQUEST_LANG;\n } else {\n $m->lang = $this->link_to_dataset->query->lang;\n }\n //println($m);\n $r = $m->deliver();\n return $r;\n }\n }\n\n // HAS MANY\n if ($emtype == 'has_many') {\n $relEntity = $this->link_to_dataset->entitymeta->entityByUsedName($field_name);\n $m = new Message();\n $m->urn = (string) $relEntity;\n $mk = $this->link_to_dataset->entitymeta->getAlias();\n $m->$mk = \"urn:\" . $this->link_to_dataset->entitymeta->name . \":\" . $this->datarow['id'];\n if (!$this->link_to_dataset->query->lang) {\n $m->lang = SystemLocale::$REQUEST_LANG;\n } else {\n $m->lang = $this->link_to_dataset->query->lang;\n }\n return Entity::query($m);\n }\n\n // LIST\n if ($emtype == 'list') {\n $listmeta = $this->link_to_dataset->entitymeta->listbyname($field_name);\n $list_entity_name = $listmeta['entity'];\n\n $urn = new URN('urn:' . $this->link_to_dataset->entitymeta->name . ':' . $this->datarow['id']);\n $urn->set_list($field_name);\n $m = new Message();\n $m->action = 'members';\n $m->urn = $urn;\n $listing = $m->deliver();\n\n if ($listing->count()) {\n $m = new Message();\n $m->action = 'load';\n $m->urn = 'urn:' . $listmeta['entity'];\n $m->in = $listing;\n if ($this->link_to_dataset->entitymeta->defaultorder) {\n $m->order = $this->link_to_dataset->entitymeta->defaultorder;\n }\n //if ($listmeta['order']) $m->order = $listmeta['order'];\n $ds = $m->deliver();\n return $ds;\n } else {\n return new DataSet(array(), $m->urn->entity, null, 0);\n }\n }\n\n /**\n * FUNCTION ENTITY PLUGIN\n */\n $fieldCanonical = $field_name;\n $fx = explode('_', $field_name);\n if (count($fx) == 2 && $fx[0] !== '') {\n $fieldCanonical = $fx[1];\n } // _attributes!\n /**\n * EXTENDED FIELD NAME HAVE TO BE UNIQUE E AND NOT EXISTS IN BASE_FIELDS\n */\n if (Field::exists($fieldCanonical) && isset($this->datarow[$field_name])) {\n //$F = Field::id($fieldCanonical);\n //println($F,1,TERM_RED);\n //println($field_name);\n $F = $this->link_to_dataset->entitymeta->entityFieldByName($field_name);\n //println($F,2,TERM_RED);\n if ($F->type == \"integer\") {\n return (integer)$this->datarow[$field_name];\n } elseif ($F->type == \"sequence\") {\n $a = substr($this->datarow[$field_name], 1, -1);\n $s = new Sequence(explode(',', $a));\n if ($labels = $this->datarow[$field_name . '_index']) {\n $s->setLabels($labels);\n }\n return $s;\n } elseif ($F->type == \"iarray\") {\n $toInt = function ($value) {\n return (int) $value;\n };\n $a = substr($this->datarow[$field_name], 1, -1);\n return array_map($toInt, explode(',', $a));\n } elseif ($F->type == \"tarray\") {\n if ($this->datarow[$field_name] == '{}' || $this->datarow[$field_name] == '{\"\"}') {\n return [];\n }\n $toInt = function ($value) {\n $v = stripcslashes($value);\n if (strpos($v, '\"') === 0) {\n $v = substr($v, 1, -1);\n }\n return $v;\n };\n $a = substr($this->datarow[$field_name], 1, -1);\n return array_map($toInt, explode(',', $a));\n } elseif ($F->type == \"json\") {\n if (AUTO_JSON_FIELD_DECODE_TO_ARRAY === true) {\n return json_decode($this->datarow[$field_name], true);\n } elseif (AUTO_JSON_FIELD_DECODE_TO_OBJECT === true) {\n return json_decode($this->datarow[$field_name]);\n } else {\n return $this->datarow[$field_name];\n }\n } elseif ($F->type == \"float\" || $F->type == \"money\") {\n // $wrapped = number_format(floatval($value), 2, '.', '');\n\n $precision = $F->precision ? $F->precision : 2;\n $fv = (float)$this->datarow[$field_name];\n if (STRICT_FLOATS === true) {\n $wrapped = $fv;\n } else {\n $wrapped = number_format($fv, $precision, '.', '');\n }\n return $wrapped;\n } else {\n $ft = $F->type;\n if ($ft == 'string' || $ft == 'text' || $ft == 'richtext') {\n $fieldValue = html_entity_decode($this->datarow[$field_name]);\n } elseif ($ft == 'set') {\n //println($F,1,TERM_VIOLET);\n if ($this->datarow[$field_name]) {\n $fieldValue = $F->valueOfIndex($this->datarow[$field_name]);\n } else {\n $fieldValue = null;\n }\n } elseif ($ft == 'option') {\n //println($F,1,TERM_GREEN);\n if ($this->datarow[$field_name]) {\n $fieldValue = $F->valueOfIndex($this->datarow[$field_name]);\n } else {\n $fieldValue = null;\n }\n } else {\n $fieldValue = $this->datarow[$field_name];\n }\n return $fieldValue;\n }\n } else {\n if (!$this->datarow[$field_name]) {\n return $this->$field_name();\n } // Call plugin\n else {\n //printlnd($this->datarow[$field_name],1,TERM_VIOLET);\n $exp = explode('_', $field_name);\n if (count($exp)) {\n //println($field_name,1,TERM_GREEN);\n //println($this->entitymeta->entityByUsedName($exp[0]),1,TERM_GREEN);\n //println($this->entitymeta->ftype($exp[0]),1,TERM_GREEN);\n if ($this->entitymeta->ftype($exp[0]) == 'list') {\n //println($field_name,1,TERM_YELLOW);\n if ($this->datarow[$field_name] == '') {\n return new \\Datamodel\\Sequence([]);\n } elseif (!$this->datarow[$field_name]) {\n return new \\Datamodel\\Sequence([]);\n } elseif ($this->datarow[$field_name] == '{}') {\n return new \\Datamodel\\Sequence([]);\n } else {\n $a = substr($this->datarow[$field_name], 1, -1);\n $s = new \\Datamodel\\Sequence(explode(',', $a));\n //printlnd($s);\n return $s;\n }\n }\n }\n return $this->datarow[$field_name]; // return general field (including extended variator variations)\n }\n }\n }", "function mysqli_result($result, $row, $field = 0) {\n $result->data_seek($row);\n // Fetch result array\n $data = $result->fetch_array();\n \n return $data[$field];\n }", "public function getField($fieldName) {\n\t\t$result = NULL;\n\t\tif ($this->hasField($fieldName)) {\n\t\t\t$result = $this->tca['columns'][$fieldName];\n\t\t}\n\t\treturn $result;\n\t}", "public function __get($field){\n if ($field == 'ENTIDAD_ID'){\n return $this->codigo;\n }\n else{\n return $this->fields;\n }\n }", "abstract public function getColsFields();", "function db_get_field($query)\n{\n\t$args = func_get_args();\n\n\tif ($_result = call_user_func_array('db_query', $args)) {\n\t\n\t\t$result = driver_db_fetch_row($_result);\n\n\t\tdriver_db_free_result($_result);\n\n\t}\n\n\treturn (isset($result) && is_array($result)) ? $result[0] : NULL;\n}", "public function getValue($field) {\n if (array_key_exists($field, $this->data)) {\n return $this->data[$field];\n } else {\n die(\"Campo no encontrado\");\n }\n}", "function readDataField() {return $this->_datafield;}", "public function getField($code_of_field) {\r\n\r\n\t\tif (isset ( $this->_data [\"details\"] ) && array_key_exists ( $code_of_field, $this->_data [\"details\"] )) {\r\n\t\t\treturn $this->_data [\"details\"] [$code_of_field] [\"value\"];\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public function getFieldByKey($fieldKey) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_result[$fieldKey])) return $this->_result[$fieldKey];\n\t\t\telse parent::throwGetColException('ProjectsListingsModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('ProjectsListingsModel::getFieldByName', __LINE__, __FILE__);\n\t}", "public function get_field($row, $col) {\n if ($row >= 0 && $row < $this->data['num_rows'] && $col >= 0 && $col < $this->data['num_fields']) {\n return $this->lines[$row][$col];\n } else {\n return null;\n }\n }", "public function get($field);", "public function get($field);", "function getAttributedetail($filter=false)\n\t{\n\t\t$qry=$this->db->query(\"select * from rp_project_attribute_values where projectID='$filter'\");\n\t\treturn $qry->result();\n\t}", "function getField($id, $table, $field){\n\t$q = mysql_query(\"SELECT `$field` FROM `$table` WHERE `id`='$id'\");\n\t$qd = mysql_fetch_assoc($q);\n\treturn stripslashes($qd[$field]);\n}", "function fieldvalue($field=\"menu_id\",$id=\"\",$condition=\"\",$order=\"\")\n\t{\n\t\t$rs=$this->fetchrecordset($id, $condition, $order);\n\t\t$ret=0;\n\t\twhile($rw=mysql_fetch_assoc($rs))\n\t\t{\n\t\t\t$ret=$rw[$field];\n\t\t}\n\t\treturn $ret;\n\t}", "public function field_metacolumn($table, $col_name){\r\n $arr = array(); \r\n $arr = $this->db->MetaColumns($table);\r\n\r\n $obj_field = new ADOFieldObject();\r\n if(isset($arr[strtoupper($col_name)])){\r\n $obj_field = $arr[strtoupper($col_name)];\r\n // print('<pre>');\r\n // print_r($obj_field);\r\n // print('</pre>');\r\n return $obj_field; \r\n }else{\r\n return false;\r\n }\r\n \r\n\r\n\r\n }", "public function getPersonalDetails($field_name = NULL)\n {\n global $conn;\n if (!isset($conn))\n {\n $this->connect();\n }\n\n if (is_null($field_name))\n {\n $query = 'SELECT field_name, value, icon, priority\n FROM personal_details\n ORDER BY priority';\n $sth = $conn->prepare($query, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\n if ($sth->execute())\n {\n return $sth->fetchAll();\n }\n else\n {\n return 'No personal details found in the database';\n }\n }\n else\n {\n $query = 'SELECT field_name, value, icon, priority\n FROM personal_details\n WHERE field_name = :field_name';\n $sth = $conn->prepare($query, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\n if ($sth->execute(array(':field_name' => $field_name)))\n {\n return $sth->fetch();\n }\n else\n {\n return 'Sorry, there was no database entry for field name: ' . $field_name;\n }\n }\n }", "public abstract function GetCurrentField();", "function field_data()\n\t{\n\t\t$retval = array();\n\t\tforeach(sqlsrv_field_metadata($this->result_id) as $offset => $field)\n\t\t{\n\t\t\t$F \t\t\t\t= new stdClass();\n\t\t\t$F->name \t\t= $field['Name'];\n\t\t\t$F->type \t\t= $field['Type'];\n\t\t\t$F->max_length\t= $field['Size'];\n\t\t\t$F->primary_key = 0;\n\t\t\t$F->default\t\t= '';\n\t\t\t\n\t\t\t$retval[] = $F;\n\t\t}\n\t\t\n\t\treturn $retval;\n\t}", "public function getFieldByKey($fieldKey) {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (isset($this->_result[$fieldKey])) return $this->_result[$fieldKey];\n\t\t\telse parent::throwGetColException('CampaignDefinitionsModel::getFieldByName', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('CampaignDefinitionsModel::getFieldByName', __LINE__, __FILE__);\n\t}", "function getFields();", "public function getField()\n\t{\n\t\t// this Fldsrc is not related to the target-table\n\t\treturn null;\n\t}", "protected function fetchFields(){\n $fields = X3::db()->fetchFields($this->modelName);\n $_res = array();\n foreach($fields as $name=>$field){\n $dataType = X3_MySQL_Command::parseMySQLField($field);\n $_res[$name] = $dataType;\n }\n return $_res;\n }", "private function _getColumn($table)\n\t{\n\t\t$result = $this->db->list_fields($table);\n\n\t\treturn $result;\n\t}", "public function getFields() {}", "public function getFields() {}", "public function getFields() {}" ]
[ "0.7478028", "0.7473639", "0.7334226", "0.7094081", "0.6983494", "0.68314403", "0.6814689", "0.6794548", "0.67088413", "0.670351", "0.66643167", "0.6607806", "0.6521817", "0.6515625", "0.6494765", "0.64828473", "0.64717215", "0.6449531", "0.6449531", "0.6449531", "0.64261425", "0.6413775", "0.64073837", "0.6407145", "0.63924646", "0.6387804", "0.6383138", "0.6381592", "0.63802683", "0.63575643", "0.635664", "0.63449836", "0.6341972", "0.63379693", "0.6327602", "0.6314119", "0.6312015", "0.6310287", "0.63093036", "0.629244", "0.62887096", "0.62883085", "0.6287035", "0.62681955", "0.62508786", "0.6241487", "0.623982", "0.62350714", "0.62345934", "0.62312233", "0.6221606", "0.6218381", "0.6177278", "0.61638826", "0.61573863", "0.6139799", "0.6139799", "0.6139799", "0.6139799", "0.611358", "0.61109656", "0.61088485", "0.6106784", "0.6102374", "0.6086793", "0.60843414", "0.6084086", "0.60828185", "0.6079086", "0.60707086", "0.606993", "0.60428107", "0.6033381", "0.6022996", "0.6022634", "0.6014589", "0.6007286", "0.5990602", "0.5988386", "0.59857494", "0.59820956", "0.59818316", "0.5979676", "0.5975212", "0.5975212", "0.59738654", "0.59733194", "0.5972408", "0.59722793", "0.5965492", "0.5958996", "0.59582824", "0.5957454", "0.5956906", "0.5953098", "0.5951889", "0.5938039", "0.59352875", "0.59352875", "0.59352875" ]
0.6117318
59
////////////////////////////////////////////////////////////////////////// PHP'S SEEKABLEITERATOR JUMP TO A ROW IN THIS RESULT //////////////////////////////////////////////////////////////////////////
public function _seek($row) { $this->returned = !!$row; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dataSeek( $res, $row );", "public function testResultSeekRows_Assoc()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n \t$this->assertEquals(array(array(1, 'one', 'first row', 'ACTIVE'), array(2, 'two', 'next row', 'ACTIVE')), $result->seekRows(3, 'ACTIVE', DB::FETCH_ORDERED), \"Ordered - Column 3 == 'ACTIVE'\");\n }", "function db_data_seek($qid, $row) {\n\n\tif (db_num_rows($qid)) { return mysqli_data_seek($qid, $row); }\n}", "public function next()\n {\n $row = $this->getRow($this->pointer);\n if($row){\n $this->pointer++;\n }\n return $row;\n }", "public function testResultSeekRows()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n }", "public function current() {\n\t\t$this->checkResultSet();\n\t\treturn $this->fetchRowAssoc($this->index, true);\n\t}", "function Next()\n {\n $this->row = $this->rows[$this->index + 1];\n $this->index++;\n\n return !!$this->row;\n }", "public function pulled(): Iterator;", "public function next()\n\t{\n\t\t$this->pointer++;\n\t\t$this->row = $this->result->get($this->pointer);\n\t}", "public function seek($key) {\n\t\t$curr_key = $this->key();\n\t\tparent::seek($key);\n\t\t\n\t\tif($key != $curr_key)\n\t\t\t$this->_result->seek($key);\n\t}", "public function next() {\n $this->currentRow = $this->result->fetchObject();\n $this->currentKey = array();\n if (!is_object($this->currentRow)) {\n $this->currentRow = NULL;\n }\n else {\n foreach ($this->sourceKeyMap as $map_field) {\n $this->currentKey[$map_field] = $this->currentRow->$map_field;\n // Leave only destination fields\n unset($this->currentRow->$map_field);\n }\n }\n }", "public function current() {\n if (isset($this->results[$this->cursor_offset])) {\n return $this->results[$this->cursor_offset];\n }\n return $this->results[$this->cursor_offset] = $this->fetch();\n }", "function seek($query, $row)\n\t{\n\t\tif(!is_object($query))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$this->seek_array[$query->guid] = array('offset' => PDO::FETCH_ORI_ABS, 'row' => $row);\n\t}", "abstract public function nextRow($result = false);", "function _seek($row)\n\t{\n\t\tif ($this->_numOfRows == 0) return false;\n\t\tif (array_key_exists($this->rows,$row)) {\n\t\t\t$this->_currentRow = $row;\n\t\t\t$this->fields = array();\t\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function testResultSeekRows_ColumnName()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n \t$this->assertEquals(array(array(1, 'one', 'first row', 'ACTIVE'), array(2, 'two', 'next row', 'ACTIVE')), $result->seekRows('status', 'ACTIVE', DB::FETCH_ORDERED));\n \t$this->assertEquals(array(array('id'=>1, 'key'=>'one', 'title'=>'first row', 'status'=>'ACTIVE'), array('id'=>2, 'key'=>'two', 'title'=>'next row', 'status'=>'ACTIVE')), $result->seekRows('status', 'ACTIVE', DB::FETCH_ASSOC));\n \t$this->assertEquals(array(1, 2), $result->seekRows('status', 'ACTIVE', DB::FETCH_VALUE));\n }", "public function current()\n {\n return $this->_row;\n }", "function pdo_data_seek($stmt, $row_number) {\r\n !PDO_SEEKABLE and pdo_trigger_error(\"pdo_data_seek() PDO_MySQL driver does not support cursors. Enable PDO_SEEKABLE.\", E_USER_WARNING);\r\n pdo_stmt($stmt)->fetch(PDO::FETCH_ASSOC, PDO::FETCH_ORI_ABS, $row_number);\r\n }", "function moveNext() {\r\n\r\n $row = $this->result->fetchRow( MDB2_FETCHMODE_ASSOC );\r\n $this->EOF = !is_array( $row );\r\n $this->fields = $row;\r\n\r\n }", "function seekPageInRecSet()\n\t{\n\t\t\n\t\t$this->resultData = $this->plugin->getGroupList( $this->searchClauseObj->getAllFieldsSearchValue() );\n\t\t$this->numRowsFromSQL = $this->resultData ? count( $this->resultData ) : 0;\n\t\t$this->recSet = $this->numRowsFromSQL;\n\t}", "function sql_rowseek($rownum, &$query_id)\n\t{\n\t\tglobal $cache;\n\n\t\tif ($query_id === false)\n\t\t{\n\t\t\t$query_id = $this->query_result;\n\t\t}\n\n\t\tif (!is_object($query_id) && isset($cache->sql_rowset[$query_id]))\n\t\t{\n\t\t\treturn $cache->sql_rowseek($rownum, $query_id);\n\t\t}\n\n\t\treturn ($query_id !== false) ? @mysqli_data_seek($query_id, $rownum) : false;\n\t}", "public function rewind()\n\t{\n\t\t// not supported\n\t\tif ($this->foreach_count) {\n\t\t\tthrow new ORMException('You cannot use the same result set in multiple foreach.');\n\t\t}\n\n\t\t$this->current = $this->runFetch();\n\n\t\t$this->foreach_count++;\n\t}", "public function rewind()\n\t{\n\t\t$this->pointer = 0;\n\t\t$this->row = $this->result->get(0);\n\t}", "function fetch($type=PDO::FETCH_ASSOC, $ori=PDO::FETCH_ORI_NEXT, $offset=0) {\r\n\r\n // calculate offset\r\n $last = & $this->i;\r\n $target = array( \r\n PDO::FETCH_ORI_NEXT => $last + 1,\r\n PDO::FETCH_ORI_PRIOR => $last,\r\n PDO::FETCH_ORI_REL => $last + $offset,\r\n PDO::FETCH_ORI_FIRST => -1,\r\n PDO::FETCH_ORI_LAST => $this->rowCount() - 1,\r\n PDO::FETCH_ORI_ABS => $offset,\r\n );\r\n $target = $target[$ori];\r\n#print \"seek($last->$target) \";\r\n \r\n // last row? got that covered!\r\n if (isset($this->cache[$target])) {\r\n#print \"seek(==) \";\r\n return $this->rowType($type, $this->cache[$target]);\r\n }\r\n \r\n // moving farther backwards\r\n if ($target < $last) {\r\n#print \"seek(<<) \";\r\n $this->reExecute();\r\n }\r\n \r\n // jump forwards\r\n while ($target > $last + 1) {\r\n#print \"seek(>>) \";\r\n $row = $this->stmt->fetch(PDO::FETCH_ASSOC);\r\n $last++;\r\n if (!$row) {\r\n return pdo_trigger_error(\"PDOStatement_Seekable: scrolling past last row\", E_USER_WARNING) and $row;\r\n }\r\n }\r\n\r\n // actually fetch next row\r\n if ($row = $this->stmt->fetch(PDO::FETCH_ASSOC)) {\r\n#print \"seek(ft) \";\r\n assert($target == ++$last);\r\n // keep last row(s)\r\n if (count($this->cache) > PDO_SEEKABLE) {\r\n $this->cache = array_slice($this->cache, $last, -PDO_SEEKABLE, true);\r\n }\r\n $this->cache[$last] = $row;\r\n }\r\n return $this->rowType($type, $row);\r\n }", "public function next() {\n\t\t$this->firstItemIdx++;\n\n\t\tif(isset($this->firstItems[$this->firstItemIdx])) {\n\t\t\treturn $this->firstItems[$this->firstItemIdx][1];\n\t\t} else {\n\t\t\tif(!isset($this->firstItems[$this->firstItemIdx-1])) {\n\t\t\t\t$this->items->next();\n\t\t\t}\n\n\t\t\tif($this->excludedItems) {\n\t\t\t\twhile(($c = $this->items->current()) && in_array($c->{$this->keyField}, $this->excludedItems, true)) {\n\t\t\t\t\t$this->items->next();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(!$this->items->valid()) {\n\t\t\t// iterator has passed the preface items, off the end of the items\n\t\t\t// list. Track through the end items to go through to the next\n\t\t\tif($this->endItemIdx === null) {\n\t\t\t\t$this->endItemIdx = -1;\n\t\t\t}\n\n\t\t\t$this->endItemIdx++;\n\n\t\t\tif(isset($this->lastItems[$this->endItemIdx])) {\n\t\t\t\treturn $this->lastItems[$this->endItemIdx];\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t}", "function rewind (){ $this->key = -1; }", "public function rewind() {\n $this->currentRow = NULL;\n $fields = array();\n foreach ($this->sourceKeyMap as $field) {\n $fields[] = $field;\n }\n foreach ($this->destinationKeyMap as $field) {\n $fields[] = $field;\n }\n\n /* TODO\n if (isset($this->options['itemlimit'])) {\n $query = $query->range(0, $this->options['itemlimit']);\n }\n */\n $this->result = $this->connection->select($this->mapTable, 'map')\n ->fields('map', $fields)\n ->execute();\n $this->next();\n }", "public function current()\n {\n return $this->getRow($this->pointer);\n }", "public function next() {\n\t\t$this->checkResultSet();\n\t\t$this->rowData = null;\n\t\t$this->index ++;\n\t\treturn $this;\n\t}", "public function current()\n {\n return $this->get_row();\n }", "function currentRow();", "function current() {\n return $this->iterators->valid() ?\n $this->getInnerIterator()->current() : NULL;\n }", "public function current()\n\t{\n\t\treturn $this->row;\n\t}", "public function current() {\n return $this->currentRow;\n }", "function getNextRow()\n {\n $this->current_row_index++;\n if ( $this->current_row_index > ( $this->offset + $this->limit - 1 ) )\n {\n $this->current_row = false;\n $this->current_row_hash = false;\n $this->mapping = false;\n return $this->current_row;\n }\n\n $result = $this->mysqli->query( 'SELECT * FROM ' . $this->table .\n ' LIMIT 1 OFFSET ' . $this->current_row_index );\n if ( $result->num_rows == 1 )\n {\n $this->current_row = $result->fetch_row();\n $this->current_row_hash = array();\n $this->mapping = array();\n foreach ( $result->fetch_fields() as $key => $field )\n {\n $this->current_row_hash[$field->name] = $this->current_row[$key];\n $this->mapping[$key] = $field->name;\n }\n $this->current_field = current( $this->mapping );\n }\n else\n {\n $this->current_row = false;\n $this->current_row_hash = false;\n $this->mapping = false;\n }\n $result->free();\n\n return $this->current_row;\n }", "public function testResultFetchRow()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n \t\n \t$this->assertEquals(array(1, 'one', 'first row', 'ACTIVE'), $result->fetchRow(DB::FETCH_ORDERED));\n \t$this->assertEquals(array('id'=>2, 'key'=>'two', 'title'=>'next row', 'status'=>'ACTIVE'), $result->fetchAssoc(DB::FETCH_ASSOC));\n \t$this->assertEquals(array(3, 'three', 'another row', 'PASSIVE', 'id'=>3, 'key'=>'three', 'title'=>'another row', 'status'=>'PASSIVE'), $result->fetchRow(DB::FETCH_FULLARRAY));\n \t$this->assertNull($result->fetchRow(DB::FETCH_ORDERED));\n \t\n \t$result->resetPointer();\n \t$this->assertEquals(array('id'=>1, 'key'=>'one', 'title'=>'first row', 'status'=>'ACTIVE'), $result->fetchRow(DB::FETCH_ASSOC));\n \t$this->assertEquals(2, $result->fetchRow(DB::FETCH_VALUE), \"Fetch after reset pointer: \");\n }", "function firstrow() {\r\n\t\t$result=@mysql_data_seek($this->result,0);\r\n\t\tif ($result) {\r\n\t\t\t$result=$this->getrow();\r\n\t\t}\r\n\t\treturn $this->row;\r\n\t}", "public function testCurrent()\n {\n $this->collection->seek(2);\n $this->assertEquals(3, $this->collection->current());\n\n $this->collection->seek('a');\n $this->assertEquals(4, $this->collection->current());\n }", "public function current()\n {\n return $this->_currentRow;\n }", "function MoveNext() \r\n\t{\r\n\t\tif (!$this->EOF) {\r\n\t\t\t$this->_currentRow++;\r\n\t\t\tif ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) {\r\n\t\t\t\t$this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);\r\n\t\t\t\r\n\t\t\t\tif (is_array($this->fields)) {\r\n\t\t\t\t\tif (isset($this->_blobArr)) $this->_fixblobs();\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->fields = false;\r\n\t\t\t$this->EOF = true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function rewind() {\n\t\tif( $this->isDirty() ) { $this->executeQuery(); }\n\t\t$this->_currentRow = 0;\n\t}", "public function next() {\n $this->elementsObtained++;\n $lastElement = $this->current();\n try {\n // DEBUG: Comment In\n //if ($this->elementsObtained > 5 && $this->first)\n // throw new MongoDB\\Driver\\Exception\\RuntimeException(\"cursor id exception simulation\");\n // DEBUG: Comment In\n // We just try to get the next element\n $this->iterator->next();\n } catch (MongoDB\\Driver\\Exception\\RuntimeException $e) {\n if (strpos($e->getMessage(), \"cursor id\") !== FALSE) {\n // cursor id not found exception, let's mitigate\n $options = array();\n // no skip; we already skipped everything in the first iterator\n // limit if we have a limit; we adjust it with the elements obtained\n if ($this->originalLimit !== NULL)\n $options[\"limit\"] = $this->originalLimit - $this->elementsObtained;\n // sort we keep\n if ($this->originalSort !== NULL)\n $options[\"sort\"] = $this->originalSort;\n // Adjust the query so we start after the last obtained element\n $query = $this->queryAfterElement($this->query, $lastElement, $this->originalSort);\n // DEBUG: Comment In\n //var_dump($query);\n // DEBUG: Comment In\n $this->iterator = new IteratorIterator($this->collection->find($query, $options));\n $this->iterator->rewind();\n // We don't call next on the new iterator because it already \"has\" the first element\n // not first anymore\n $this->first = FALSE;\n } else {\n // something else; let's throw this right back at the caller\n throw $e;\n }\n }\n }", "public function nextRowset()\n {\n }", "function MoveNext()\n\t{\n\t\tif (!$this->EOF) {\n\t\t\t$this->_currentRow++;\n\t\t\tif ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) {\n\t\t\t\t$this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);\n\t\t\t\tif (is_array($this->fields) && $this->fields) {\n\t\t\t\t\tif (isset($this->_blobArr)) $this->_fixblobs();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->fields = false;\n\t\t\t$this->EOF = true;\n\t\t}\n\t\treturn false;\n\t}", "public function next() {\n\t\tif ($this->rowIndex++ < count($this->rows)) {\n\t\t\treturn true;\n\t\t}\n\t}", "protected function _getNextRow()\n {\n $key = $this->key();\n $this->_index = $this->getIndex($key);\n\n if ($key > $this->_limit) {\n return false;\n }\n return $this->_pattern->getRow($this->_index, $key);\n }", "#[\\ReturnTypeWillChange]\n public function next()\n {\n $this->index++;\n return next($this->items);\n }", "public function rewind(){\n return reset($this->items);\n }", "public function rewind(){\n return reset($this->items);\n }", "public function current()\n {\n Psl\\invariant($this->valid(), 'The Iterator is invalid.');\n if (!contains_key($this->entries, $this->position)) {\n $this->progress();\n }\n\n return $this->entries[$this->position][1];\n }", "private function next()\n {\n $clone = clone $this;\n $clone->offset++;\n return $clone;\n }", "public function next() {\n\t\t$this->_currentRow++;\n\t}", "public function next()\n {\n next($this->iterator_data);\n }", "public function current()\n {\n mysql_data_seek($this->res, $this->index);\n \n return $this->fetch();\n }", "function rewind()\n\t{\n\t\treturn $this->iterator->rewind();\n\t}", "public function rewind() {\r\n\t\t$this->_iteratorArray = $this->select();\r\n\t\t$this->_iteratorPos = 0;\r\n\t}", "function Next()\n {\n $this->row = mysqli_fetch_array($this->rs);\n return !!$this->row;\n }", "function next() {\r\n $this->index++;\r\n return $this->list[$this->index];\r\n }", "public function current()\n {\n return current($this->iterator_data);\n }", "function moveToNextRow();", "public function next(){\n return next($this->items);\n }", "public function next(){\n return next($this->items);\n }", "function seek($position=0)\n\t{\n\t\t$result = @mysqli_data_seek($this->m_query_id, $position);\n\t\tif ($result) $this->m_row = $position;\n\t\telse $this->halt(\"seek($position) failed: result has \".$this->num_rows().\" rows\");\n\t}", "public function SeekPosition()\r\n\t{\r\n\t\treturn $this->active_row;\r\n\t}", "public function rewind()\n\t{\n\t\t$this->j = 0;\n\t\t$this->c = $this->i;\n\t}", "function next()\n {\n if(!$this->buffer_row){\n $this->z->next('TABLE');\n }\n\n $this->position++ ;\n }", "function current() {\n return $this->records[$this->key()];\n }", "function moveNext()\n{\n\t$this->res2 = mysql_fetch_array($this->res);\n\t$status = is_array($this->res2);\n\t\n\treturn ($status);\n}", "public function next()\r\n {\r\n if ($this->index < $this->aggregate->size()) {\r\n $this->index = $this->index+1;\r\n }\r\n }", "public function next()\n {\n if ($this->isvalid) {\n $this->rewindable = false;\n $ret = librdf_iterator_next($this->iterator);\n if ($ret) {\n $this->isvalid = false;\n } else {\n $this->key++;\n }\n }\n }", "function rewind($model){\n if (isset($model->sub) && $model->sub){\n if (($i=$model->_get(\"iterator\")) instanceof \\SimpleXMLIterator){\n return array($i, $i);\n } else if ($xml = $model->_get(\"xml\")){\n $p = $xml->{$model->enclosure};\n /*\n * Process the p to:\n * 1) new object, sorted according to sort rules,\n * 2) leave only results that match\n */\n $p->rewind();\n $processed_xml = $this->processXML($p, $model);\n list($limit,$offset) = $model->_get(\"limit\");\n $this->counter = 0;\n if ($offset > count($processed_xml)){\n return false;\n }\n if ($offset > 0){\n while ($this->counter < $offset){\n $this->counter++;\n next($processed_xml);\n }\n }\n $model->_set(\"count\", count($processed_xml)); // should count properly I suppose\n $current = current($processed_xml);\n return array($processed_xml, $current[\"_iterator\"]);\n }\n /* parent should be loaded */\n throw $this->exception(\"Trying to iterate submodel, when parent is not loaded!\");\n } else {\n $xml = $model->_get(\"xml\");\n /* not sub, top. search */\n $list = array();\n /* add all relevant fields */\n foreach ($model->getActualFields() as $field){\n if ($retrieve = $model->elements[$field]->setterGetter(\"retrieve\")){\n $type = $retrieve;\n } else {\n $type = \"yes\";\n }\n if ($xpath = $model->elements[$field]->setterGetter(\"xpath\")){\n $field = $xpath;\n }\n $list[$field] = $type;\n }\n $query = $this->buildQuery($model);\n $order = $this->buildOrder($model);\n list ($limit, $offset) = $model->_get(\"limit\");\n $limit = ($limit!==null)?$limit:10;\n $offset = $offset?:0;\n ob_start();\n $xml = $this->buildXML($d=$this->simple->search($query, $offset, $limit, $list, $order, \"DOC_TYPE_XMLIterator\"));\n $this->verbose = ob_get_contents();\n ob_end_clean();\n $model->_set(\"xml\", $xml);\n $model->_set(\"count\", $this->simple->response->getParam(\"hits\"));\n $xml->rewind();\n return array($xml, $xml->current());\n }\n }", "function moveCursor($rowNumber) {\r\n\t\t\tif($this->privateVars['resultset']) {\r\n\t\t\t\t$result = mysql_data_seek($this->privateVars['resultset'], $rowNumber);\r\n\t\t\t\tif ($result === true) $this->privateVars['resultpointer'] = $rowNumber;\r\n\t\t\t\treturn $result;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "function current() \n {\n // TODO wrap this;\n return $this->offsetGet($this->position);\n }", "function next() {\n\n return $this->skip(1);\n }", "function print_entry($iterator){\n print($iterator->current());\n return true;\n}", "public function next()\n\t{\n\t\t$this->j++;\n\t\t$this->c += $this->grid->getRowCount();\n\t}", "public function rewind()\n {\n return $this->iterator->rewind();\n }", "public function testMultipleRewindBufferIterations()\n {\n $resultSet = $this->getMockForAbstractClass(AbstractResultSet::class);\n $result = new Result();\n $stub = $this->getMockBuilder(PDOStatement::class)->getMock();\n $data = new ArrayIterator([\n ['id' => 1, 'name' => 'one'],\n ['id' => 2, 'name' => 'two'],\n ['id' => 3, 'name' => 'three'],\n ]);\n assert($stub instanceof PDOStatement); // to suppress IDE type warnings\n $stub->expects($this->any())\n ->method('fetch')\n ->will($this->returnCallback(function () use ($data) {\n $r = $data->current();\n $data->next();\n return $r;\n }));\n $result->initialize($stub, null);\n $result->rewind();\n $result->rewind();\n $resultSet->initialize($result);\n $resultSet->buffer();\n $resultSet->rewind();\n $resultSet->rewind();\n\n $data = $resultSet->current();\n self::assertEquals(1, $data['id']);\n $resultSet->next();\n $data = $resultSet->current();\n self::assertEquals(2, $data['id']);\n\n $resultSet->rewind();\n $resultSet->rewind();\n $data = $resultSet->current();\n self::assertEquals(1, $data['id']);\n $resultSet->next();\n $data = $resultSet->current();\n self::assertEquals(2, $data['id']);\n $resultSet->next();\n $data = $resultSet->current();\n self::assertEquals(3, $data['id']);\n }", "function seek($pos = 0) \n \t{\n \t\t$status = @mysql_data_seek($this->Query_ID, $pos);\n \t\tif ($status)\n \t\t\t$this->row = $pos;\n \t\telse\n \t\t\tnew CException(sprintf(\"seek(%d) zawi�d�: wynik ma %d wiersz(y)\", $pos, $this->numRows()), __FILE__, __LINE__);\n\n \t\treturn;\n \t}", "public function key() {\n\t\treturn( $this->_currentRow );\n\t}", "function next()\n\t{\n\t\treturn $this->iterator->next();\n\t}", "public function rewind()\n\t{\n\t\tif (is_a($this->rs,'iterator'))\n\t\t{\n\t\t\treturn $this->rs->rewind();\n\t\t}\n\t}", "public function next(): mixed\n {\n $item = false;\n if ($this->getItemPointer() < $this->Length()) {\n $item = $this->Current();\n $this->setItemPointer($this->getItemPointer() + 1);\n }\n\n return $item;\n }", "public function rewind()\n {\n $this->cursor = 0;\n $data = $this->collection->getArrayCopy();\n reset($data);\n $this->collection->exchangeArray($data);\n\n return $this->current();\n }", "public function rewind() {\n if(count($this->resultList)<=0)\n return false;\n $ret = reset($this->resultList);\n $this->EOF = ($ret === false);\n return $ret;\n }", "public function next()\n\t{\n\t\t$this->current = $this->runFetch();\n\n\t\tif ($this->current) {\n\t\t\t$this->index++;\n\t\t}\n\t}", "function getInnerIterator()\n\t{\n\t\treturn $this->iterator;\n\t}", "function _data_seek($n = 0)\n\t{\n\t\treturn mysqli_data_seek($this->result_id, $n);\n\t}", "function db_fetch_next_row( $fetch_mode = DB_FETCHMODE_ASSOC ) {\n\n $this->pm_clear_cols();\n if( ! is_object( $this->dataset_obj )) return NULL;\n\n $this->curr_row_array = $this->dataset_obj->fetchRow( $fetch_mode );\n $this->pm_die_if_error( 'curr_row_array' );\n\n if( is_array( $this->curr_row_array )) { # Some data was retrieved\n $this->curr_rowno++;\n $this->cols_in_curr_row = count( $this->curr_row_array );\n }\n\n return $this->curr_row_array;\n }", "public function current()\n {\n return $this->records[$this->position];\n }", "public function iterator();", "public function current()\n {\n if ($this->list === null)\n $this->rewind();\n $row = current($this->list);\n return $row;\n }", "public function next()\n {\n if ($this->list === null)\n $row = $this->rewind();\n else\n $row = next($this->list);\n return $row;\n }", "function seek( $recordIndex ) { return mysql_data_seek( $this->recordSet, $recordIndex ); }", "function key()\n\t\t{\n\t\t\t$this->current();\n\t\t\treturn $this->offset;\n\t\t}", "#[\\ReturnTypeWillChange]\n public function current()\n {\n $this->_skipNextIteration = false;\n return current($this->_data);\n }", "public function testBufferIterations()\n {\n $resultSet = $this->getMockForAbstractClass(AbstractResultSet::class);\n $resultSet->initialize(new ArrayIterator([\n ['id' => 1, 'name' => 'one'],\n ['id' => 2, 'name' => 'two'],\n ['id' => 3, 'name' => 'three'],\n ]));\n $resultSet->buffer();\n\n $data = $resultSet->current();\n self::assertEquals(1, $data['id']);\n $resultSet->next();\n $data = $resultSet->current();\n self::assertEquals(2, $data['id']);\n\n $resultSet->rewind();\n $data = $resultSet->current();\n self::assertEquals(1, $data['id']);\n $resultSet->next();\n $data = $resultSet->current();\n self::assertEquals(2, $data['id']);\n $resultSet->next();\n $data = $resultSet->current();\n self::assertEquals(3, $data['id']);\n }", "function next() {\n $this->position++;\n }", "public function testResultFetchOrdered()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test WHERE status='ACTIVE'\");\n \t\n \t$this->assertEquals(array(1, 'one', 'first row', 'ACTIVE'), $result->fetchOrdered());\n \t$this->assertEquals(array(2, 'two', 'next row', 'ACTIVE'), $result->fetchOrdered());\n \t$this->assertNull($result->fetchOrdered());\n \t\n \t$result->resetPointer();\n \t$this->assertEquals(array(1, 'one', 'first row', 'ACTIVE'), $result->fetchOrdered(), \"Fetch after reset pointer: \");\n }", "public function next()\n {\n if ($this->index !== NULL) {\n $val = $this->pathItemList[$this->index];\n $this->index = $this->index + 1 < count($this->pathItemList) ? $this->index + 1 : NULL;\n return $val;\n }\n return NULL;\n }" ]
[ "0.67521125", "0.6735392", "0.64203155", "0.631827", "0.6306217", "0.6238823", "0.62318254", "0.6216975", "0.62161195", "0.61897486", "0.61885995", "0.6188399", "0.6157498", "0.6155695", "0.61335665", "0.60885155", "0.60634327", "0.60141325", "0.5994216", "0.5985918", "0.5939401", "0.59309846", "0.5918456", "0.5906409", "0.5879072", "0.58722204", "0.58678216", "0.5861013", "0.582849", "0.58272415", "0.5815182", "0.58022743", "0.5797104", "0.5795509", "0.5792161", "0.5789701", "0.57854974", "0.57825464", "0.57661206", "0.5763148", "0.5756164", "0.5753485", "0.57434773", "0.57379514", "0.57299393", "0.57236546", "0.57225674", "0.57168174", "0.57168174", "0.57116514", "0.57069767", "0.5701119", "0.56947005", "0.5691566", "0.5677372", "0.5674249", "0.567292", "0.56594795", "0.5656813", "0.5656523", "0.56558007", "0.56558007", "0.56521493", "0.5650076", "0.5649823", "0.5634864", "0.56294554", "0.562825", "0.56200856", "0.56151915", "0.5614818", "0.5601712", "0.5571347", "0.5568351", "0.5566406", "0.556284", "0.55605674", "0.55547535", "0.55496716", "0.55411386", "0.55256855", "0.5522818", "0.55222976", "0.5521735", "0.55206233", "0.5509003", "0.5498996", "0.5496017", "0.54951394", "0.54939204", "0.54926914", "0.54894495", "0.54894084", "0.5488481", "0.5482583", "0.54712754", "0.5465815", "0.5460424", "0.54595685", "0.54503375" ]
0.65149844
2
////////////////////////////////////////////////////////////////////////// GET A SINGLE CELL FROM THIS RESULT //////////////////////////////////////////////////////////////////////////
public function cell($row=0, $column=0) { if ($row || $column) return false; return $this->query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ms_fetch_single_cell($mysql_result)\n{\n\t$res = $mysql_result->fetch_array(MYSQLI_NUM);\n\tif ( $res && sizeof($res) == 1)\n\t\treturn $res[0];\n\treturn null;\n}", "public function getCell()\n {\n return $this->cell;\n }", "public function get() {\n\t\treturn $this->rows[$this->rowIndex];\n\t}", "abstract public function getSpecificRow();", "public function result_cell($column)\n {\n if (is_bool($this->result))\n {\n return NULL;\n }\n\n $line = $this->result->fetch_assoc();\n\n $this->free_result();\n\n return isset($line[$column]) ? $line[$column] : NULL;\n }", "public function get_row();", "public function get_row() {\n\t\tif (!isset($this->rows)) {\n\t\t\t$this->get_rows();\n\t\t}\n\t\t$value = current($this->rows);\n\t\tnext($this->rows);\n\t\treturn $value;\n\t}", "public function singleRow(){\n $this->execute();\n return $this->statement->fetch(PDO::FETCH_OBJ);\n }", "public function getCellValue($row);", "public function exec_SELECTgetSingleRow() {}", "public function getCells();", "public function getSingleResult() {\n return mysql_fetch_array($this->result);\n }", "public function getRow() {}", "function FetchRow() {\n\t\t\treturn pg_fetch_row($this->result);\n\t\t}", "protected function getOne()\n {\n $statement = $this->connection->query($this->sqlToString());\n return $this->fetch($statement);\n }", "public function getRow(){\n return $this->_row;\n }", "public function get_value() {\n\t\t$row = $this->get_row();\n\t\tif ($row) {\n\t\t\treturn current($row);\n\t\t}\n\t}", "function firstrow() {\r\n\t\t$result=@mysql_data_seek($this->result,0);\r\n\t\tif ($result) {\r\n\t\t\t$result=$this->getrow();\r\n\t\t}\r\n\t\treturn $this->row;\r\n\t}", "public function getRow()\n {\n return $this->row;\n }", "public function getRow();", "public function getCellValue()\n {\n return $this->get('CellValue');\n }", "public function getCellValue()\n {\n return $this->get('CellValue');\n }", "function getCell() {\n \tglobal $synAbsolutePath;\n $ext = $this->translate($this->value);\n $mat=$this->translatePath($this->mat);\n $filename=$mat.$this->createFilename().\".\".$ext;\n $file_exists=file_exists($synAbsolutePath.$filename);\n $isImg=$this->isImage($filename);\n if ($ext and $file_exists and $isImg) $ret=\"<div style='overflow: hidden; height: 25px; display:inline;background: url($filename) no-repeat center;width: 100%' onMouseOver=\\\"openbox('$filename')\\\" onMouseOut=\\\"closebox()\\\"></div>\";\n else if ($ext and $file_exists and !$isImg) $ret=\"<span style='color: gray'>Document $ext</span>\";\n else if ($ext and !$file_exists) $ret=\"<span style='color: gray'>Error $ext</span>\";\n else $ret=\"<span style='color: gray'>Empty</span>\";\n return $ret;\n //die;\n }", "function fetchRow ()\n {\n return pg_fetch_array($this->_result);\n }", "public function current() {\n\t\t$this->checkResultSet();\n\t\treturn $this->fetchRowAssoc($this->index, true);\n\t}", "function FetchRow() {}", "public function getRow()\n {\n return isset($this->row) ? $this->row : null;\n }", "protected function value()\n {\n return $this->row($this->row);\n }", "public function getCellValueForRendering($row, $cell=null);", "public function first(){\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function fetch_row()\n\t{\n\t\t$row = array();\n\t\tif (current($this->result)) {\n\t\t\tforeach (current($this->result) AS $value) {\n\t\t\t\t$row[] = $value;\n\t\t\t}\n\t\t}else {\n\t\t\t$row = FALSE;\n\t\t}\n\t\tnext($this->result);\n\t\treturn $row;\n\t}", "public function getResultSingle() {\n $this->execute();\n return $this->statement->fetch(PDO::FETCH_OBJ);\n }", "public function row($index = 0) {\n if($this->result) {\n if(isset($this->result[$index])) {\n return $this->result[$index];\n }\n }\n return null;\n }", "public function getRow()\n {\n return $this->row;\n }", "public function queryRow()\n\t{\n\t\treturn $this->queryInternal('fetch',$this->_fetchMode);\n\t}", "function GetRow()\n {\n return $this->row;\n }", "public function first() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_shift( $result );\n\t}", "public function single()\n {\n $this->executeQuery($this->statement);\n return $this->fetch($this->statement);\n }", "public function getRow(){\n return oci_fetch_array($this->result);\n\n }", "public function getRow()\n {\n return $this->get('Row');\n }", "function Get($col)\n {\n return $this->row ? $this->row[$col] : NULL;\n }", "function db_getone($sql, $index){\n\t\t$row = $this->db->query($sql)->row_array();\n\t\tif(!empty($row[$index])){\n\t\t\treturn $row[$index];\n\t\t}\n\t}", "public function first(){\n\n //using the above (results) method here\n return $this->results()[0]; //depends on the version of your PHP server\n //return $this->results[0];\n }", "public function single()\n\t{\n\t\t$this->execute();\n\t\treturn $this->stm->fetch(PDO::FETCH_OBJ);\n\t}", "public function getData_row()\n {\n return $this->data_row;\n }", "public function get($token)\n {\n return $this->row;\n }", "public function fetch() {\n\t\t$this->checkResultSet();\n\t\treturn $this->fetchRowAssoc();\n\t}", "public function testResultGetColumn()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test WHERE status='ACTIVE'\");\n \t$this->assertEquals(array('first row', 'next row'), $result->getColumn(2), \"Get column 2\");\n \t$this->assertEquals(array('first row', 'next row'), $result->getColumn('title'), \"Get column 'title'\");\n \t$this->assertEquals(array(1, 2), $result->getColumn(0), \"Get column 0\");\n }", "public function getEditCellValue($row);", "public function current()\n {\n return $this->getRow($this->pointer);\n }", "public function row() {\n\t\tif ($this->returned) return false;\n\t\t$this->returned = true;\n\t\treturn $this->query;\n\t}", "function readOne() {\n\t\t\t$query = \"SELECT * FROM `\".$this->table_name.\"` WHERE id ='\".$this->id.\"'\";\n\t\t \n\t\t\t// prepare query statement\n\t\t\t$hasil = mysqli_query($this->conn, $query);\n\t\t\t \n\t\t\t$row = mysqli_fetch_array($hasil);\n\t\t\t\n\t\t\treturn $row;\n\t\t}", "public function first()\n {\n return $this->results()[0];\n }", "public function singleResult() {\n $this->_pstmt->setFetchMode(PDO::FETCH_CLASS, $this->_className);\n return $this->_pstmt->fetch(PDO::FETCH_CLASS);\n }", "function fetchRow() {\n $result = $this->_conn->fetchRow();\n if ($result == false) {\n return false;\n }\n $dm = $this->_formatTag($result);\n return $dm;\n }", "public function single()\n {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_ASSOC);\n }", "public function first()\n {\n return $this->getData(0);\n }", "public function fetchRow();", "public function getOne() {\n $prepareStatement = $this->pdo->prepare($this->sql);\n $prepareStatement->execute($this->param);\n\n Connection::disconnect();\n\n if ($this->fetch !== PDO::FETCH_CLASS) {\n if (1 == $prepareStatement->columnCount())\n return $prepareStatement->fetch(PDO::FETCH_COLUMN);\n return $prepareStatement->fetch($this->fetch);\n }\n\n return $prepareStatement->fetchObject();\n }", "public function first()\n {\n // return $this->_results[0];\n return $this->results()[0];\n }", "function Get($col)\n {\n return isset($this->row) ? $this->row[$col] : null;\n }", "public function first()\n {\n $this->cursor = 0;\n\n return $this->at($this->cursor);\n }", "public function fetch_row()\n {\n return $this->fetch_assoc();\n }", "public function find(){\n\t\t$row = mysql_fetch_assoc($this->result);\n\t\treturn $row;\n\t}", "public function getCells()\n {\n return $this->cells;\n }", "public function fetchSingle() {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_OBJ);\n }", "final public function cell($key):?string\n {\n return $this->get(['cell',$key]);\n }", "public function findOneByCell($name, $value)\n {\n return $this->defineFindOneByCellQuey($name, $value)->getSingleResult();\n }", "public function single()\n {\n if($this->length()==1)\n {\n return $this->getAt(0);\n }\n throw new \\LengthException();\n }", "public function single(){\n\t\t$this->execute();\n\t\treturn $this->stmt->fetch(PDO::FETCH_OBJ);\n\t}", "public function fetchRow()\n\t{\n\t\t$this->_query();\n\n\t\treturn $this->stmt->fetch(\\PDO::FETCH_ASSOC);\n\t}", "protected function fetch_row()\n\t{\n\t\treturn $this->resResult->fetch(PDO::FETCH_NUM);\n\t}", "public function single(){\r\n $this->execute();\r\n return $this->stmt->fetch(PDO::FETCH_OBJ);\r\n }", "public function first_row($type = 'object')\n\t{\n\t\treturn $this->row(0, $type);\n\t}", "function get(array &$grid, int $rowIndex, int $columnIndex): int {//tiene\n \n return $grid[$rowIndex][$columnIndex]; \n}", "public function fetchOne() {\r\n\t\t$data = $this->fetch();\r\n\r\n\t\t$this->freeResult();\r\n\r\n\t\treturn $data ? current($data) : null;\r\n\t}", "public function fetchSingleRow($result){\r\n\t\t\r\n\t\t$row = mysqli_fetch_assoc($result);\r\n\t\treturn $row;\r\n\t}", "abstract public function getRow();", "abstract public function getRow();", "function fetchResult() {\n\t\tif ($row = mysql_fetch_row($this->results)) {\n\t\t\t$resultRow = array();\n\t\t\t$i = 0;\n\t\t\tforeach ($row as $index => $field) {\n\t\t\t\tlist($table, $column) = $this->map[$index];\n\t\t\t\t$resultRow[$table][$column] = $row[$index];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $resultRow;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function get_data ($row, $column)\n {\n global $data_array;\n $column_array = array ();\n $column_array = explode (\"\\t\", $data_array[$row]);\n return ($column_array[$column]);\n }", "abstract public function FetchRow();", "public function cellValue ($row)\n {\n $strIndex = $this->getOption('index');\n \n if (isset($row[$strIndex])){\n \n $strValue = $row[$strIndex];\n \n $arrValues = $this->getValues();\n \n if (isset($arrValues[$strValue])){\n return $arrValues[$strValue];\n }\n }\n \n $strValue = $this->_column->cellValue($row);\n return $strValue;\n }", "public function getSingleResult()\n {\n }", "public function single() {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_OBJ);\n }", "function db_get_row($result)\n{\n\treturn $result->fetch_assoc();\n}", "public function getData()\n {\n return $this->rowData;\n }", "public function readone(){\r\t\t\t$query=\"select * from `\".$this->tablename.\"` where `id`='\".$this->id.\"'\";\r\t\t\t$result=mysqli_query($this->conn,$query);\r\t\t\t$value=mysqli_fetch_row($result);\r\t\t\treturn $value;\r\t\t}", "public function first()\n {\n return $this->results()[0];\n }", "public function getItemaPt() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(4, $this->_result)) return (string) $this->_result[4];\n\t\t\telse parent::throwGetColException('Not set PollTemplatesModel::getItemaPt', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From PollTemplatesModel::getItemaPt', __LINE__, __FILE__);\n\t}", "public abstract function FetchRow();", "public function current() {\n if (isset($this->results[$this->cursor_offset])) {\n return $this->results[$this->cursor_offset];\n }\n return $this->results[$this->cursor_offset] = $this->fetch();\n }", "public function testResultCellReturnsNull(): void\n {\n $this->assertNull($this->class->result_cell('cell'));\n }", "public function First()\n {\n return $this->Results()[0];\n }", "public function getFirstResult();", "public function getFirstResult();", "function loadResult() {\n\t\tif (!($cur = $this->query())) {\n\t\t\treturn null;\n\t\t}\n\t\t$ret = null;\n\t\tif ($row = mysql_fetch_row( $cur )) {\n\t\t\t$ret = $row[0];\n\t\t}\n\t\tmysql_free_result( $cur );\n\t\treturn $ret;\n\t}", "public function current()\n {\n return $this->_row;\n }", "public function fetch()\n {\n return mysql_fetch_object($this->res);\n }", "public function first(){\n return (!empty($this->_result)) ? $this->_result[0] : [];\n }" ]
[ "0.7456431", "0.70577544", "0.6930545", "0.6730971", "0.6726225", "0.66969883", "0.6592968", "0.65387857", "0.64410925", "0.6325064", "0.6315112", "0.6244848", "0.62076354", "0.6174893", "0.6162205", "0.6141757", "0.6105894", "0.6096847", "0.60822684", "0.6069991", "0.60611147", "0.60611147", "0.60127085", "0.60103685", "0.6003859", "0.59975207", "0.594932", "0.5936816", "0.59318376", "0.5930573", "0.59262526", "0.5918077", "0.5915741", "0.5914738", "0.5911219", "0.5904266", "0.59026027", "0.58921504", "0.5887416", "0.58740187", "0.5871769", "0.5869241", "0.5865087", "0.5860482", "0.58559895", "0.58471805", "0.58366495", "0.58327234", "0.58283615", "0.58111817", "0.58093", "0.58047754", "0.57823235", "0.57744056", "0.57728404", "0.576509", "0.5761842", "0.5760975", "0.5755136", "0.57529014", "0.57500243", "0.5739367", "0.5738348", "0.57381374", "0.57250905", "0.5715942", "0.57148504", "0.57144725", "0.57085043", "0.5706197", "0.57006913", "0.5696864", "0.5691107", "0.5690831", "0.5686772", "0.5682817", "0.5681872", "0.5669314", "0.5669314", "0.5668919", "0.5662347", "0.56621563", "0.5656258", "0.5654638", "0.5653353", "0.56460464", "0.5643999", "0.56422114", "0.5640024", "0.5635389", "0.5634478", "0.5632989", "0.56319135", "0.56226146", "0.5619946", "0.5619946", "0.5617823", "0.56172454", "0.56104255", "0.56062466" ]
0.5986971
26
////////////////////////////////////////////////////////////////////////// MOVE TO THE NEXT ROW IN THIS RESULT AND RETURN THAT ROW'S DATA //////////////////////////////////////////////////////////////////////////
public function row() { if ($this->returned) return false; $this->returned = true; return $this->query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function moveToNextRow();", "function moveNext() {\r\n\r\n $row = $this->result->fetchRow( MDB2_FETCHMODE_ASSOC );\r\n $this->EOF = !is_array( $row );\r\n $this->fields = $row;\r\n\r\n }", "public function next()\n\t{\n\t\t$this->pointer++;\n\t\t$this->row = $this->result->get($this->pointer);\n\t}", "abstract public function nextRow($result = false);", "public function next()\n {\n $row = $this->getRow($this->pointer);\n if($row){\n $this->pointer++;\n }\n return $row;\n }", "function nextResult()\n {\n return $this->dbh->nextResult($this->result);\n }", "public function getNextRow() {\n $row = mssql_fetch_object($this->result);\n\n // Might be totally out of data, or just out of this batch - request another\n // batch and see\n if (!is_object($row)) {\n mssql_fetch_batch($this->result);\n $row = mssql_fetch_object($this->result);\n }\n if (is_object($row)) {\n return $row;\n }\n else {\n return NULL;\n }\n }", "function getNextRow()\n\t{\n\t\t\n\t\tif($record=mysql_fetch_array($this->resultset))\n\t\t{\n\t\t\t//fill the serialno also in the record\n\t\t\t$record[\"serialno\"]=$this->tmp_present;\n\t\t\t$this->tmp_present++;\n\t\t}\n\t\treturn $record;\n\t}", "public function next() {\n $this->currentRow = $this->result->fetchObject();\n $this->currentKey = array();\n if (!is_object($this->currentRow)) {\n $this->currentRow = NULL;\n }\n else {\n foreach ($this->sourceKeyMap as $map_field) {\n $this->currentKey[$map_field] = $this->currentRow->$map_field;\n // Leave only destination fields\n unset($this->currentRow->$map_field);\n }\n }\n }", "public function next() {\n\t\t$this->checkResultSet();\n\t\t$this->rowData = null;\n\t\t$this->index ++;\n\t\treturn $this;\n\t}", "public function getNextRow() {\n $next_call_count = $this->currentPage * $this->pagination;\n if ($this->currentCount == $this->totalCount) {\n return NULL;\n }\n if ($this->currentCount == $next_call_count && $next_call_count < $this->totalCount) {\n $start = $this->currentPage * $this->pagination;\n if ($str = elis_consumer_http_request($this->url_pattern . '&rows=' . $this->pagination . '&start=' . $start, array('Accept' => 'application/json'))) {\n if ($json = json_decode($str)) {\n $this->data = $json->response->docs;\n $this->currentPage++;\n }\n }\n }\n // TODO Messages in case of empty data / failed call etc.\n $item = NULL;\n if (count($this->data)) {\n $item = current($this->data);\n next($this->data);\n $this->currentCount++;\n }\n return $item;\n }", "function moveNext()\n{\n\t$this->res2 = mysql_fetch_array($this->res);\n\t$status = is_array($this->res2);\n\t\n\treturn ($status);\n}", "function getNextRow()\r\n\t{\r\n\t\t$this->node_priority = false;\r\n\t\t\r\n\t\t// set mapping array\r\n\t\t$this->first_field = true;\r\n\t\treset( $this->mapping );\r\n\r\n\t\tif( $this->ignore_first_row )\r\n\t\t{\r\n\t\t\t$this->ignore_first_row = false;\r\n\t\t\tfgetcsv( $this->m_aData , 100000, $this->delimiter, $this->enclosure ); // nirvana\r\n\t\t}\r\n\r\n\t\t$this->row = fgetcsv( $this->m_aData , 100000, $this->delimiter, $this->enclosure);\r\n\r\n\t\treturn $this->row;\r\n\t}", "function getNextRow()\n {\n $this->current_row_index++;\n if ( $this->current_row_index > ( $this->offset + $this->limit - 1 ) )\n {\n $this->current_row = false;\n $this->current_row_hash = false;\n $this->mapping = false;\n return $this->current_row;\n }\n\n $result = $this->mysqli->query( 'SELECT * FROM ' . $this->table .\n ' LIMIT 1 OFFSET ' . $this->current_row_index );\n if ( $result->num_rows == 1 )\n {\n $this->current_row = $result->fetch_row();\n $this->current_row_hash = array();\n $this->mapping = array();\n foreach ( $result->fetch_fields() as $key => $field )\n {\n $this->current_row_hash[$field->name] = $this->current_row[$key];\n $this->mapping[$key] = $field->name;\n }\n $this->current_field = current( $this->mapping );\n }\n else\n {\n $this->current_row = false;\n $this->current_row_hash = false;\n $this->mapping = false;\n }\n $result->free();\n\n return $this->current_row;\n }", "function MoveNext() \r\n\t{\r\n\t\tif (!$this->EOF) {\r\n\t\t\t$this->_currentRow++;\r\n\t\t\tif ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) {\r\n\t\t\t\t$this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);\r\n\t\t\t\r\n\t\t\t\tif (is_array($this->fields)) {\r\n\t\t\t\t\tif (isset($this->_blobArr)) $this->_fixblobs();\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->fields = false;\r\n\t\t\t$this->EOF = true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function next(): void\n {\n if (count($this->data) > 0) {\n array_shift($this->data);\n }\n ++$this->position;\n\n if ($this->position > $this->numberOfRecords()) {\n return;\n }\n\n if (count($this->data) == 0) {\n $this->fetchMore();\n }\n }", "public function next_row()\n\t\t{\tif (isset($this->res))\n\t\t\t\treturn mysql_fetch_row($this->res);\n\n\t\t\techo \"You need to make a query first! <br />\";\n\t\t\treturn false;\n\t\t}", "function MoveNext()\n\t{\n\t\tif (!$this->EOF) {\n\t\t\t$this->_currentRow++;\n\t\t\tif ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) {\n\t\t\t\t$this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);\n\t\t\t\tif (is_array($this->fields) && $this->fields) {\n\t\t\t\t\tif (isset($this->_blobArr)) $this->_fixblobs();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->fields = false;\n\t\t\t$this->EOF = true;\n\t\t}\n\t\treturn false;\n\t}", "public function next()\n\t{\n\t\t$this->databaseResult->next();\n\t}", "protected function _getNextRow()\n {\n $key = $this->key();\n $this->_index = $this->getIndex($key);\n\n if ($key > $this->_limit) {\n return false;\n }\n return $this->_pattern->getRow($this->_index, $key);\n }", "function Next()\n {\n $this->row = $this->rows[$this->index + 1];\n $this->index++;\n\n return !!$this->row;\n }", "function next_record()\n\t{\n\t\t/* goto next record */\n\t\t$this->m_record = @mysqli_fetch_array($this->m_query_id, MYSQLI_ASSOC|atkconfig(\"mysqlfetchmode\"));\n\t\t$this->m_row++;\n\t\t$this->m_errno = mysqli_errno($this->m_link_id);\n\t\t$this->m_error = mysqli_error($this->m_link_id);\n\n\t\t/* are we there? */\n\t\t$result = is_array($this->m_record);\n\t\tif (!$result && $this->m_auto_free)\n\t\t{\n\t\t\t@mysqli_free_result($this->m_query_id);\n\t\t\t$this->m_query_id = 0;\n\t\t}\n\n\t\t/* return result */\n\t\treturn $result;\n\t}", "public function next_row($type = 'object')\n\t{\n\t\tif (is_array($this->row_data))\n\t\t{\n\t\t\t$count = count($this->row_data);\n\t\t\tif ($this->current_row > $count OR ($this->current_row === 0 && $count === 0))\n\t\t\t{\n\t\t\t\t$n = $count;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$n = $this->current_row + 1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$n = 0;\n\t\t}\n\n\t\treturn $this->row($n, $type);\n\t}", "function dataSeek( $res, $row );", "function getNextRecord() { return mysql_fetch_array( $this->recordSet ); }", "public function next() {\n\t\t$this->_currentRow++;\n\t}", "function next()\n {\n if(!$this->buffer_row){\n $this->z->next('TABLE');\n }\n\n $this->position++ ;\n }", "protected function _moveNext()\n {\n if ($nextRow = $this->_getNextRow()) {\n $this->_currentRow = $this->_formatRow($nextRow);\n } else {\n $this->_currentRow = array();\n }\n \n if (!$this->_currentRow) {\n fclose($this->_handle);\n $this->_valid = false;\n $this->_handle = null;\n }\n }", "function nextRecord() {\n @$this->Record = mysqli_fetch_array($this->result, MYSQLI_ASSOC);\n $this->rs = $this->Record;\n $this->Row += 1;\n $this->Errno = mysqli_errno($this->con);\n $this->Error = mysqli_error($this->con);\n $stat = is_array($this->Record);\n if (!$stat) {\n @mysqli_free_result($this->result);\n $this->result = 0;\n }\n return $stat;\n }", "function next() {\n @$this->Record = mysqli_fetch_array($this->result, MYSQLI_ASSOC);\n $this->rs = $this->Record;\n $this->Row += 1;\n $this->Errno = mysqli_errno($this->con);\n $this->Error = mysqli_error($this->con);\n $stat = is_array($this->Record);\n if (!$stat) {\n @mysqli_free_result($this->result);\n $this->result = 0;\n }\n return $stat;\n }", "function db_fetch_next_row( $fetch_mode = DB_FETCHMODE_ASSOC ) {\n\n $this->pm_clear_cols();\n if( ! is_object( $this->dataset_obj )) return NULL;\n\n $this->curr_row_array = $this->dataset_obj->fetchRow( $fetch_mode );\n $this->pm_die_if_error( 'curr_row_array' );\n\n if( is_array( $this->curr_row_array )) { # Some data was retrieved\n $this->curr_rowno++;\n $this->cols_in_curr_row = count( $this->curr_row_array );\n }\n\n return $this->curr_row_array;\n }", "function firstrow() {\r\n\t\t$result=@mysql_data_seek($this->result,0);\r\n\t\tif ($result) {\r\n\t\t\t$result=$this->getrow();\r\n\t\t}\r\n\t\treturn $this->row;\r\n\t}", "function getNextRow() {\n\t\tglobal $LANG, $TYPO3_CONF_VARS;\n\t\t\n\t\tif (!empty($this->conf['dontUsePHPFunction'])) {\n\t\t\treturn next($this->rows);\n\t\t}\n\t\t\n\t\t// if there is no enclosure set, the parameter has to be omited\n\t\tif(strlen(trim($this->conf['enclosure'])) > 0) {\n\t\t\twhile (($arrayLine = fgetcsv($this->resource, 10000, $this->conf['delimiter'], trim($this->conf['enclosure']))) !== FALSE) {\n\t\t\t\t$imploded = trim(implode($arrayLine));\n\t\t\t\tif (strlen($imploded) > 1) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\twhile (($arrayLine = fgetcsv($this->resource, 10000, $this->conf['delimiter'])) !== FALSE) {\n\t\t\t\t$imploded = trim(implode($arrayLine));\n\t\t\t\tif (strlen($imploded) > 1) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t// return values from array with increased key-ids\n\t\tif($arrayLine !== FALSE) {\n\t\t\tforeach($arrayLine as $key => $value){\n\t\t\t\tif(substr(trim($value), - 1) == '\"') {\n\t\t\t\t\t$value = str_replace('\"', '', $value);\n\t\t\t\t\t// if the first characted becomes a \"?\", this means, it is related to this bug: https://bugs.php.net/bug.php?id=63433\n\t\t\t\t\tif(utf8_decode($value[0]) == '?') {\n\t\t\t\t\t\t// so strip the quotes in the beginning\n\t\t\t\t\t\t$value = substr($value, 3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$arrayLine[$key+1] = $value;\n\t\t\t}\n\t\t\treturn $arrayLine;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getNext(){\n $tempRow = &$this->tempRow;\n $output = array();\n // get first row\n if($tempRow == FALSE) $tempRow = mysql_fetch_assoc($this->result);\n if($tempRow == FALSE) return(FALSE);\n $this->currentId = ((int) $tempRow['id']);\n $output['id'] = ((int) $tempRow['id']);\n $output['playerName'] = $tempRow['playerName'];\n $output['price'] = ((float)$tempRow['price']);\n $output['price total'] = ((float)$tempRow['price']) * ((float)$tempRow['qty']);\n $output['created'] = ((int) $tempRow['created']);\n // create item object\n $output['Item'] = new ItemClass(array(\n 'itemId' => ((int)$tempRow['itemId']),\n 'itemDamage' => ((int)$tempRow['itemDamage']),\n 'qty' => ((int)$tempRow['qty']) ));\n // get first enchantment\n if(!empty($tempRow['enchName']))\n $output['Item']->addEnchantment($tempRow['enchName'], ((int)$tempRow['enchId']), ((int)$tempRow['level']) );\n // get more rows (enchantments)\n while($tempRow = mysql_fetch_assoc($this->result)){\n if($tempRow['id'] != $this->currentId) break;\n $output['Item']->addEnchantment($tempRow['enchName'], ((int)$tempRow['enchId']), ((int)$tempRow['level']) );\n }\n if(count($output) == 0) $output=FALSE;\n return($output);\n}", "public function current() {\n\t\t$this->checkResultSet();\n\t\treturn $this->fetchRowAssoc($this->index, true);\n\t}", "function next_record() {\r\n\t\treturn $this->dbh->next_record();\r\n\t}", "function nextRecord() \n \t{\n \t\t$this->record = @mysql_fetch_array($this->queryId);\n\t\t++$this->row;\n\n\t\t$stat = is_array($this->record);\n \t\tif ( !$stat )\n \t\t{\n \t\t\t@mysql_free_result($this->Query_ID);\n \t\t\t$this->queryId = 0;\n \t\t}\n \t\t\n \t\treturn $stat;\n \t}", "public function next($asArray = false)\n {\n // Advance pointer\n $this->pointer ++;\n $row = ($asArray ? mysql_fetch_array($this->result) : mysql_fetch_object($this->result));\n \n return $row;\n }", "public function next()\n {\n\t\tnext($this->_data);\n $this->_index++;\n\t}", "function Next()\n {\n $this->row = mysqli_fetch_array($this->rs);\n return !!$this->row;\n }", "function nextRecord(){\r\n @ $this->Record = mysql_fetch_assoc( $this->Query_ID );\r\n $this->Row += 1;\r\n $this->Errno = mysql_errno();\r\n $this->Error = mysql_error();\r\n $stat = is_array( $this->Record );\r\n if( !$stat ) {\r\n @ mysql_free_result( $this->Query_ID );\r\n $this->Query_ID = 0;\r\n }\r\n return $stat;\r\n }", "public function nextRowset()\n {\n }", "public function next()\n {\n # Pegando a posição atual do array e com ternario, verificando se é reverso e aplicando a operação.\n $this->posicao = $this->posicao + ($this->reverso ? -1 : 1);\n }", "public function next() {\n next($this->data);\n }", "public function next() {\n next($this->data);\n }", "function NextPrevRow($OrderID,$Next) {\r\n\t\tglobal $Config;\r\n\t\t$strAddQuery='';\r\n\t\tif($OrderID>0){\t\t\t\r\n\t\t\t$strAddQuery .= ($Config['vAllRecord'] != 1) ? (\" and (FIND_IN_SET(\" . $_SESSION['AdminID'] . \",l.AssignTo) OR l.created_id='\" . $_SESSION['AdminID'] . \"') \") : (\"\");\r\n\t\t\r\n\t\t\tif($Next==1){\r\n\t\t\t\t$operator = \"<\"; $asc = 'desc';\r\n\t\t\t}else{\r\n\t\t\t\t$operator = \">\"; $asc = 'asc';\r\n\t\t\t}\r\n\r\n\t\t\t$strSQLQuery = \"select o.OrderID from e_orders o where o.OrderID \".$operator.\"'\" . $OrderID . \"' \". $strAddQuery. \" order by o.OrderID \".$asc.\" limit 0,1\";\r\n\t\t\t$arrRow = $this->query($strSQLQuery, 1);\r\n\t\t\treturn $arrRow;\r\n\t\t}\r\n\t}", "public function Next()\n {\n //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer\n }", "public function Next()\n {\n //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer\n }", "public function Next()\n {\n //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer\n }", "public function next()\n {\n next($this->data);\n }", "public function next()\n {\n next($this->data);\n }", "public function next()\n {\n next($this->data);\n }", "public function next()\n {\n return next($this->data);\n }", "public function next()\n {\n return next($this->data);\n }", "public function next()\n {\n return next( $this->data );\n }", "public function testResultSeekRows()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n }", "public function next() {\n\t\tnext($this->_data);\n\t}", "function next_result ($result, $resulttype = MYSQLI_ASSOC) {\n\t\treturn mysqli_fetch_array($result, $resulttype);\n\t}", "public function next()\n\t{\n\t\t$this->current = $this->runFetch();\n\n\t\tif ($this->current) {\n\t\t\t$this->index++;\n\t\t}\n\t}", "public function next()\n\t{\n\t\t$this->j++;\n\t\t$this->c += $this->grid->getRowCount();\n\t}", "function db_data_seek($qid, $row) {\n\n\tif (db_num_rows($qid)) { return mysqli_data_seek($qid, $row); }\n}", "public function next(){\n\t\treturn (is_array($this->data) ? next($this->data) : null);\n\t}", "public function next()\n {\n $this->dataSource->next();\n $this->position++;\n }", "function db2_next_result($stmt)\n{\n}", "public function readNextLine() {\n\t\tif ($this->data->rows >= $this->linepointer) {\n\t\t\t$newdata = array();\n\t\t\t$newdata = $this->data->_data[$this->linepointer];\n\t\t\t$this->linepointer++;\n\t\t\treturn $newdata;\n\t\t}\n\t\telse return false;\n\t}", "public function next($search=null){\n\t\treturn $this->look_on_same_row(\"next\",$search);\n\t}", "function currentRow();", "function next() {\n\n return $this->skip(1);\n }", "public function next(){\n\t\t$this->nextRow(1,'max');\n\t}", "public function getNextRow(string $type = 'object')\n {\n $result = $this->getResult($type);\n if (empty($result)) {\n return null;\n }\n\n return isset($result[$this->currentRow + 1]) ? $result[++$this->currentRow] : null;\n }", "public function next()\n\t{\n\t\t// Init a query to the first shard\n\t\tif ($this->query === null)\n\t\t\t$this->nextShard();\n\n\t\tdo\n\t\t{\n\t\t\t$this->query->next();\n\t\t}\n\t\t// Move to the next shard after the last row from the current shard\n\t\twhile (!$this->valid() && $this->nextShard());\n\n\t\t$this->index++;\n\t}", "protected function _getNextRow()\n {\n $currentRow = array();\n $handle = $this->_getFileHandle();\n while (($row = fgets($handle)) !== FALSE) {\n $this->_currentRowNumber++;\n return $row;\n }\n }", "function movenext(){\n\t\t\n\t\tif ($this->debug) echo \"Fetching next record ... \";\n\t $this->record = @mysql_fetch_array($this->rstemp);\n\t $status = is_array($this->record);\n\t\t\n\t\tif ($this->debug && $status) echo \"OK <br>\\n\\n\";\n\t\telseif ($this->debug) echo \"EOF <br>\\n\\n\";\n\t\t\n\t return($status);\n\t}", "public function GetNextRow($rows)\r\n {\r\n return $rows->fetch_assoc();\r\n }", "private function next()\n {\n $clone = clone $this;\n $clone->offset++;\n return $clone;\n }", "function nextRecord()\n {\n @ $this->Record = mysql_fetch_array( $this->Query_ID );\n $this->Row += 1;\n $this->Errno = mysql_errno();\n $this->Error = mysql_error();\n $stat = is_array( $this->Record );\n if( !$stat )\n {\n @ mysql_free_result( $this->Query_ID );\n $this->Query_ID = 0;\n }\n return $stat;\n }", "function FetchRow() {}", "public function next()\n\t{\n\t\tif (is_a($this->rs,'iterator'))\n\t\t{\n\t\t\treturn $this->rs->next();\n\t\t}\n\t}", "public function next()\n {\n $this->incrIndex();\n\n return $this->getCurrent();\n }", "public function fetchRow();", "public function next()\n {\n if (isset($this->data[$this->i])) {\n $data = $this->data[$this->i];\n $this->i++;\n return $data;\n } else {\n return false;\n }\n }", "function next_record($Type = MYSQLI_BOTH, $Escape = true) {\n\t\tif ($this->LinkID) {\n\t\t\t$this->Record = mysqli_fetch_array($this->QueryID, $Type);\n\t\t\t$this->Row++;\n\t\t\tif (!is_array($this->Record)) {\n\t\t\t\t$this->QueryID = false;\n\t\t\t} elseif ($Escape !== false) {\n\t\t\t\t$this->Record = Misc::display_array($this->Record, $Escape);\n\t\t\t}\n\t\t\treturn $this->Record;\n\t\t}\n\t}", "public function next()\r\n {\r\n if ($this->index < $this->aggregate->size()) {\r\n $this->index = $this->index+1;\r\n }\r\n }", "public function next()\n {\n next($this->iterator_data);\n }", "public function copycurrentrow()\n\t{\n\t\t// 1005 = Copy Profile\n\t\t$reasonID = 1005; // copy profile\n\t\treturn $this->copyrow($this->id, $reasonID);\n\t}", "public function next()\n {\n if ($this->list === null)\n $row = $this->rewind();\n else\n $row = next($this->list);\n return $row;\n }", "public function current()\n {\n return $this->_row;\n }", "public function current()\n {\n return $this->get_row();\n }", "public function next() {\n\t\tif ($this->rowIndex++ < count($this->rows)) {\n\t\t\treturn true;\n\t\t}\n\t}", "function next_result()\n\t{\n\t\tif (is_object($this->conn_id))\n\t\t{\n\t\t\treturn mysqli_next_result($this->conn_id);\n\t\t}\n\t}", "public function current()\n {\n mysql_data_seek($this->res, $this->index);\n \n return $this->fetch();\n }", "public function next($index=1){\n return $this->results()[$index]; //depends on the version of your PHP server\n //return $this->results[0];\n }", "public function nextRowset() {\n return odbc_next_result($this->stmt);\n }", "public function next()\n {\n next($this->values);\n }", "public function current() {\n if (isset($this->results[$this->cursor_offset])) {\n return $this->results[$this->cursor_offset];\n }\n return $this->results[$this->cursor_offset] = $this->fetch();\n }", "abstract public function FetchRow();", "public function current() {\n return $this->currentRow;\n }", "public function first_row() {\n if ($this->first_row_memo === null) {\n $this->next();\n $this->first_row_memo = $this->current();\n }\n return $this->first_row_memo;\n }", "protected abstract function perform_next();", "public function loadNextRow()\n {\n $this->connect();\n\n // Execute the query and get the result set cursor.\n if (!$this->executed) {\n if (!($this->execute())) {\n return $this->errorNum ? null : false;\n }\n }\n\n // Get the next row from the result set as an object of type $class.\n if ($row = $this->fetchArray()) {\n return $row;\n }\n\n // Free up system resources and return.\n $this->freeResult();\n\n return false;\n }", "public function testResultFetchRow()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n \t\n \t$this->assertEquals(array(1, 'one', 'first row', 'ACTIVE'), $result->fetchRow(DB::FETCH_ORDERED));\n \t$this->assertEquals(array('id'=>2, 'key'=>'two', 'title'=>'next row', 'status'=>'ACTIVE'), $result->fetchAssoc(DB::FETCH_ASSOC));\n \t$this->assertEquals(array(3, 'three', 'another row', 'PASSIVE', 'id'=>3, 'key'=>'three', 'title'=>'another row', 'status'=>'PASSIVE'), $result->fetchRow(DB::FETCH_FULLARRAY));\n \t$this->assertNull($result->fetchRow(DB::FETCH_ORDERED));\n \t\n \t$result->resetPointer();\n \t$this->assertEquals(array('id'=>1, 'key'=>'one', 'title'=>'first row', 'status'=>'ACTIVE'), $result->fetchRow(DB::FETCH_ASSOC));\n \t$this->assertEquals(2, $result->fetchRow(DB::FETCH_VALUE), \"Fetch after reset pointer: \");\n }" ]
[ "0.7505312", "0.7501055", "0.72083867", "0.71811765", "0.7164599", "0.7106993", "0.71037734", "0.70987976", "0.7098266", "0.70537627", "0.69746184", "0.6896746", "0.68587655", "0.6708026", "0.6697049", "0.6661285", "0.6615237", "0.6612063", "0.6595237", "0.6538552", "0.6530533", "0.6518487", "0.6511025", "0.649616", "0.6447657", "0.6414876", "0.64082205", "0.63958687", "0.63690233", "0.6368176", "0.63539636", "0.6323742", "0.6303382", "0.6271516", "0.62643915", "0.62521213", "0.6230135", "0.62218004", "0.6221401", "0.6219684", "0.6219225", "0.6201677", "0.61982554", "0.6189779", "0.6189779", "0.61733824", "0.6166399", "0.6166399", "0.6166399", "0.6161374", "0.6161374", "0.6161374", "0.6125621", "0.6125621", "0.61251354", "0.6111", "0.61032104", "0.6099033", "0.6098738", "0.60889775", "0.6081564", "0.6069002", "0.60662025", "0.60630983", "0.60528684", "0.60472715", "0.60372686", "0.6032957", "0.60282195", "0.60195035", "0.6016988", "0.5999792", "0.59975564", "0.59915763", "0.5976826", "0.59663904", "0.5960599", "0.5953491", "0.59530604", "0.5930796", "0.5926249", "0.5921236", "0.59174883", "0.5910743", "0.5901272", "0.5897151", "0.58872956", "0.58869314", "0.5873829", "0.58600783", "0.5847491", "0.58418125", "0.5836817", "0.5824434", "0.5806274", "0.5804912", "0.5803629", "0.5800954", "0.5794141", "0.57908714", "0.57747114" ]
0.0
-1
////////////////////////////////////////////////////////////////////////// GET ALL ROWS IN THE RESULT SET //////////////////////////////////////////////////////////////////////////
public function rows() { return $this->row(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_all(){\r\n\t\t$rows = array();\r\n\t\twhile($row = $this->get_row()){\r\n\t\t\t$rows[] = $row;\r\n\t\t}\r\n\t\treturn $rows;\r\n\t}", "abstract protected function getRows();", "public function getRows();", "public function getRows();", "function all() {\n\t\t$results = array();\n\t\twhile ($result = $this->fetch())\n\t\t\t$results[] = $result;\n\t\treturn $results;\n\t}", "abstract public function get_rows();", "public function fetchRowset()\n\t{\n\t\t$this->_query();\n\n\t\treturn $this->stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t}", "public function getAllRows()\n\t{\n\t\treturn $this->foundRows;\n\t}", "function getALL(){\n\t\t$result=$this->rstemp;\n\t\t$rows = array();\n\t\twhile($row=mysql_fetch_assoc($result)){\n\t\t\t $rows[]=$row;\n\t\t\t}\n\t\t\treturn $rows;\n\n\t\t\n\t}", "public function getAll() {\n\t\treturn $this->rows;\n\t}", "public static function getAll()\n {\n return self::doSearch()->resultRows;\n }", "public function get_rows() {\n\t\tif (!isset($this->rows)) {\n\t\t\t$this->rows = $this->get_array();\n\t\t\t// Take out the header\n\t\t\tarray_shift($this->rows);\n\t\t}\n\t\telse {\n\t\t\treset($this->rows);\n\t\t}\n\t\treturn $this->rows;\n\t}", "public function getAllResult() {\n $rowsArray = array();\n while($row = mysql_fetch_array($this->result)) {\n $rowsArray[] = $row;\n }\n return $rowsArray;\n }", "public function resultset(){\n\t\t$this->execute() ;\n\t\treturn $this->statement->fetchAll(PDO::FETCH_ASSOC) ;\n\t}", "public function getFoundRows();", "function getRows() {\n\t\treturn $this->rows;\n\t}", "public function getRows ()\n {\n return $this->_rows;\n }", "public function result_set() {\n $this -> execute();\n return $this -> stmt -> fetchAll();\n }", "function getRows() { return $this->_rows; }", "public function all(): ResultSetContract;", "public function resultaSet(){\n $this->execute();\n return $this->statemet->fetchAll(PDO::FETCH_OBJ);\n }", "public function get_rows() {\n return $this->rows;\n }", "public function getAllRows() {\n\t\t$rows = array();\n\t\t\n\t\tfor($x = 0; $x < $this->getNumRows(); $x++) {\n\t\t\t$rows[] = mysqli_fetch_assoc($this->_result);\n\t\t}\n\t\treturn $rows;\n\t}", "public function all()\r\n {\r\n return new IteratorResult(R::findAll($this->table),'redbean');\r\n }", "public function getCells();", "public function getRows()\n {\n return $this->_rows;\n }", "public function getRows()\n {\n if (is_null($this->summaryRow)) {\n return $this->rows;\n } else {\n return $this->rows + array(self::ID_SUMMARY_ROW => $this->summaryRow);\n }\n }", "public function get_rows()\n\t{\n//\t\t$rows = new object_list($this->connections_from(array(\"type\" => \"RELTYPE_CHILD\", \"to.class_id\" => crm_bill_row_obj::CLID)));\n\t\t$rows = new object_list(array(\n\t\t\t\"class_id\" => crm_bill_row_obj::CLID,\n\t\t\t\"CL_CRM_BILL_ROW.RELTYPE_CHILD(CL_CRM_BILL_ROW_GROUP).oid\" => $this->id(),\n\t\t\tnew obj_predicate_sort(array(\"jrk\" => \"asc\")),\n\t\t));\n\t\treturn $rows;\n\t}", "public function getRows()\n {\n return $this->rows;\n }", "public function getRows()\n {\n return $this->rows;\n }", "public function getRows()\n {\n \treturn $this->previouslyExecuted->fetch_array(MYSQLI_ASSOC);\n }", "public function get_all ();", "function GetRows()\n {\n $arr = [];\n for ($i = 0, mysqli_data_seek($this->rs, 0); $this->Next(); $i++) $arr[$i] = $this->row;\n return $arr;\n }", "public function getRows()\n\t{\n\t\treturn $this->driver->getRows();\n\t}", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function getRows()\n {\n return $this->last->fetch_array(MYSQLI_ASSOC);\n \n }", "public function getRows()\n {\n $query = $this->getQuery();\n \n if (!empty($this->columns)) {\n $query->select(implode(', ', $this->columns));\n }\n \n foreach ($this->sort as $key => $value) {\n $query->sortBy($key, $value);\n }\n \n if ($this->range) {\n $query->limit($this->start, $this->range);\n }\n \n if (!empty($this->group)) {\n $query->groupBy($this->group);\n }\n \n return $this->database->query($query, $this->database->getBinds());\n }", "public function All()\n {\n $query = \"SELECT * FROM $this->table\";\n $result = $this->query($query);\n return $this->convertArray($result);\n }", "public function fetchAll() {\n\n if (!$this->results) {\n\n $this->results = [];\n while ($row = $this->nextRow()) {\n $this->results[] = $row;\n }\n\n }\n\n return $this->results;\n }", "function getRows() {\n if ($this->_recordset === null) {\n // begin processing result into recordset\n $this->_entries = ldap_get_entries($this->dbh->connection, $this->result);\n $this->row_counter = $this->_entries['count'];\n $i = 1;\n $rs_template = array();\n if (count($this->dbh->attributes) > 0) {\n reset($this->dbh->attributes);\n while (list($a_index, $a_name) = each($this->dbh->attributes)) $rs_template[$a_name] = '';\n }\n while (list($entry_idx, $entry) = each($this->_entries)) {\n // begin first loop, iterate through entries\n if (!empty($this->dbh->limit_from) && ($i < $this->dbh->limit_from)) continue;\n if (!empty($this->dbh->limit_count) && ($i > $this->dbh->limit_count)) break;\n $rs = $rs_template;\n if (!is_array($entry)) continue;\n while (list($attr, $attr_values) = each($entry)) {\n // begin second loop, iterate through attributes\n if (is_int($attr) || $attr == 'count') continue;\n if (is_string($attr_values)) $rs[$attr] = $attr_values;\n else {\n $value = '';\n while (list($value_idx, $attr_value) = each($attr_values)) {\n // begin third loop, iterate through attribute values\n if (!is_int($value_idx)) continue;\n if (empty($value)) $value = $attr_value;\n else {\n if (is_array($value)) $value[] = $attr_value;\n else $value = array($value, $attr_value);\n }\n// else $value .= \"\\n$attr_value\";\n // end third loop\n }\n $rs[$attr] = $value;\n }\n // end second loop\n }\n reset($rs);\n $this->_recordset[$entry_idx] = $rs;\n $i++;\n // end first loop\n }\n $this->_entries = null;\n if (!is_array($this->_recordset))\n $this->_recordset = array();\n if (!empty($this->dbh->sorting)) {\n $sorting_method = (!empty($this->dbh->sorting_method) ? $this->dbh->sorting_method : 'cmp');\n uksort($this->_recordset, array(&$this, $sorting_method));\n }\n reset($this->_recordset);\n // end processing result into recordset\n }\n return DB_OK;\n }", "public function resultSet(){\n\t\t$this->execute();\n\t\treturn $this->stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "function returnArrays()\r\n\t\t{\r\n\t\tif (mysql_num_rows($this->result) > 0)\r\n\t\t\t{\r\n\t\t\twhile($row=mysql_fetch_assoc($this->result))\r\n\t\t\t\t{\r\n\t\t\t\t$arrays[]=$row;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn $arrays;\r\n\t\t}", "function index_all(){\n\t\t$this->_clear_tmp(0);\n\t\t$this->del_results();\n\t\treturn $this->index(0,true);\n\t}", "public function fetchAll()\r\n {\r\n $this->query();\r\n return $this->sth->fetchAll();\r\n }", "public function fetchAll() {\r\n\t\t$result = array();\r\n\r\n\t\twhile ($data = $this->fetch()) {\r\n\t\t\t$result[] = $data;\r\n\t\t}\r\n\r\n\t\t$this->freeResult();\r\n\r\n\t\treturn $result;\r\n\t}", "public function fetchAll()\n\t{\n\t\t$aReturn = Array();\n\t\twhile( $oRecord = $this->next() )\n\t\t\tarray_push( $aReturn, $oRecord );\n\t\t$this->rewind();\n\t\treturn $aReturn;\n\t}", "function fetchAll() {\r\n if($this->getNumRows() <= 0)\r\n throw new Exception(\"No Recored Found\");\r\n \r\n while ($row = mysql_fetch_array($this->m_Result)) {\r\n $a_rs[] = $row;\r\n }\r\n mysql_free_result($this->m_Result);\r\n return $a_rs;\r\n \r\n }", "public function get_all () {\r\n\t\treturn $this->_data;\r\n\t}", "public function GetAllRows() : ARRAY\r\n {\r\n return($this->preparedStatement->fetchAll(\\PDO::FETCH_ASSOC));\r\n }", "public function result_array()\n\t{\n\t\tif (count($this->result_array) > 0)\n\t\t{\n\t\t\treturn $this->result_array;\n\t\t}\n\t\telseif (count($this->result_object) > 0)\n\t\t{\n\t\t\tfor ($i = 0, $c = count($this->result_object); $i < $c; $i++)\n\t\t\t{\n\t\t\t\t$this->result_array[$i] = (array) $this->result_object[$i];\n\t\t\t}\n\n\t\t\treturn $this->result_array;\n\t\t}\n\t\telseif (is_array($this->row_data))\n\t\t{\n\t\t\tif (count($this->row_data) === 0)\n\t\t\t{\n\t\t\t\treturn $this->result_array;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$row_index = count($this->row_data);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$row_index = 0;\n\t\t\t$this->row_data = array();\n\t\t}\n\n\t\t$row = NULL;\n\t\twhile ($row = $this->_fetch_assoc())\n\t\t{\n\t\t\t$this->row_data[$row_index++] = $row;\n\t\t}\n\n\t\t// Un-comment the following line, in case it becomes needed\n\t\t// $this->_data_seek();\n\t\treturn $this->result_array = $this->row_data;\n\t}", "public function fetchAll() {\r\n\t\treturn $this->getMapper()->fetchAll();\r\n\t\t\r\n\t}", "public function getAllResults()\n {\n return $this->all_results;\n }", "public function GetResults() {\n return $this->rs; \n }", "public function resultSet()\n\t{\n\t\t$this->execute();\n\t\treturn $this->stm->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function resultSet(){\n $this->execute();\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\n }", "public static function FetchAll(){\r\n\t\t$cutsArray = array();\r\n\t\t$query = new Query();\r\n\t\t$query->createSelect(array('*'), 'cuts');\r\n\t\t$arrayArraysCut = $query->execute(true);\r\n\t\tif(!empty($arrayArraysCut)){\r\n\t\t\tforeach($arrayArraysCut as $arrayCut){\r\n\t\t\t\tarray_push($cutsArray, self::CreateObjectFromArray($arrayCut));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $cutsArray;\r\n\t}", "public function fetchAll()\r\n {\r\n $sql = new Sql($this->dbAdapter);\r\n $select = $sql->select();\r\n $select\r\n ->from(array('a_s' => $this->table))\r\n ->order('a_s.sector_order ASC');\r\n \r\n $selectString = $sql->getSqlStringForSqlObject($select);\r\n $execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\r\n $result = $execute->toArray();\r\n return $result;\r\n }", "function getResult() {\n $rows = array();\n while ($row = mysqli_fetch_assoc($this->theResult)) {\n $rows[] = $row;\n }\n return $rows;\n }", "protected function getAll()\n {\n $statement = $this->connection->query($this->sqlToString());\n return $this->fetchAll($statement);\n }", "public function fetchAll() {\n\t\t$queryBuilder = $this->db->createQueryBuilder();\n\t\t$queryBuilder\n\t\t\t->select('*')\n\t\t\t->from($this->table_name, 't1')\n\t\t;\n\t\t$result = $queryBuilder->execute()->fetchAll();\n\n\t\treturn $result;\n\t}", "public function getAll()\r\n {\r\n $data = $this->select()\r\n ->from($this->_name);\r\n return $this->fetchAll($data);\r\n }", "public function get_all() {\n $where = func_get_args();\n $this->_set_where($where);\n\n $this->_callbacks('before_get', array($where));\n\n if ($this->result_mode == 'object') {\n $result = $this->db->get($this->_table())->result();\n } else {\n $result = $this->db->get($this->_table())->result_array();\n }\n\n foreach ($result as &$row) {\n $row = $this->_callbacks('after_get', array($row));\n }\n\n return $result;\n }", "public function getRows ($length='all') {\n\n // We return multiple results unless $length equals anything other than 'all'\n if($length!=='all') {\n\n // $length does not equal 'all' so return just the first record [0]\n return $this->_results[0];\n\n } else {\n\n // $length does equal 'all' so return all records\n return $this->_results;\n }\n\n\n }", "public final function get_all()\n {\n }", "public function results()\r\n\t{\r\n\t\treturn $this->model->get($this->select);\r\n\t}", "function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE) {\n//echo ($this->sql($this->select(), $offset, $rowcount, $sort, $includeContactIDs, NULL));\n return $this->sql($this->select(), $offset, $rowcount, $sort, $includeContactIDs, NULL);\n\n }", "public function all()\n {\n $records = R::findAll( $this->table_name(), \" order by id \");\n\n $object = array_map( function($each_record) {\n return $this->map_reford_to_object( $each_record );\n },\n $records\n );\n\n return array_values( $object );\n }", "function getElements() {\n return $this->rows_object;\n }", "function rows($res){\t\n\t\treturn(0);\n\t}", "public abstract function getResults();", "function getRows($params = array()){\n $result = $this->get_by($params, TRUE);\n\n if ($result) {\n return $result;\n } else {\n return false;\n }\n }", "function all()\n\t{\n\t\treturn $this->_data;\n\t}", "public function all()\n\t{\n\t\treturn $this->getArray();\n\t}", "function get_all()\n {\n return $this->db->get($this->table)->result();\n }", "public function getRows($rows){\n\t\treturn $this->rows;\n\t}", "public function all() : array;", "public function rows() {\n return $this->schema->rows;\n }", "private static function getResultRows($result)\n\t{\n\t $rows = array();\n\t while($row = $result->fetch_row()) \n\t $rows[]=$row;\n\t\t$result->free();\n\t return $rows;\n\t}", "function numRows( $res );", "public function fetchResults(){\n $resultsValues = $this->data;\n return $resultsValues;\n }", "public function getResults();", "public function results(): array;", "function result()\n {\n return $this->rows;\n }", "public function resultSet()\n {\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public function fetchAll() {\n\t\t$rows = array();//Default\n\t\t//SQL\n\t\t$sql = \"SELECT * FROM `$this->table` WHERE 1 ORDER BY sort_order, uuid ASC\";\n\t\t// excecute SQL statement\n\t\t$result = mysqli_query ( $this->adapter, $sql );\n\t\tif (mysqli_num_rows($result) > 0) {\n\t\t\t// output data of each row\n\t\t\twhile($row = mysqli_fetch_assoc($result)){\n\t\t\t\t$row['done'] = $row['done'] == 0 ? false : true;\n\t\t\t\t$rows[] = $row;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $rows;\t\t\n\t}" ]
[ "0.7300118", "0.71101326", "0.7085464", "0.7085464", "0.6979606", "0.69683176", "0.69269425", "0.68508404", "0.678911", "0.6751223", "0.67291707", "0.6612199", "0.65221125", "0.65108705", "0.6505553", "0.64840156", "0.6481147", "0.6455391", "0.6432074", "0.64239824", "0.63910586", "0.6379949", "0.63583493", "0.6348321", "0.633561", "0.6323486", "0.6319349", "0.6318645", "0.6304296", "0.6304296", "0.6290871", "0.628863", "0.62654483", "0.6251733", "0.6241467", "0.6241467", "0.6241467", "0.6241467", "0.6241467", "0.6241467", "0.6241467", "0.6241467", "0.6241467", "0.6241467", "0.6241467", "0.6241467", "0.6241467", "0.6241467", "0.6241467", "0.6241467", "0.62223214", "0.62113017", "0.6200963", "0.61939543", "0.61882025", "0.6158998", "0.614826", "0.61404485", "0.61375874", "0.6121503", "0.61127794", "0.61092854", "0.6102054", "0.60991466", "0.60970366", "0.6090694", "0.6084214", "0.6072586", "0.606901", "0.6062428", "0.6058737", "0.60544616", "0.6050315", "0.60413593", "0.6035694", "0.6021313", "0.6021255", "0.6019187", "0.60136366", "0.60055685", "0.60055536", "0.600369", "0.6001518", "0.59997374", "0.59955496", "0.59939647", "0.59926474", "0.5991064", "0.59873617", "0.59823954", "0.5981852", "0.5977097", "0.59752536", "0.59695125", "0.59513956", "0.5948635", "0.594835", "0.5940671", "0.5940189", "0.59400785" ]
0.7018246
4
Display a listing of the resource.
public function index() { $cita=Cita::all(); return($cita->toJson()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\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 create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $campos=$request->all(); $cita=Cita::create($campos); return($cita->toJson()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.7286258", "0.71454436", "0.7132821", "0.6640289", "0.6621105", "0.6566493", "0.65255576", "0.65087926", "0.6448317", "0.63752604", "0.63736314", "0.6365631", "0.6365631", "0.6365631", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229" ]
0.0
-1
Display the specified resource.
public function show($id) { $cita=Cita::all()->where('id',$id); return($cita->toJson()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($cita) { $cita->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Constructor method for BSGHistoryType
public function __construct(\Sabre\UpdateReservation\StructType\BSGRefHistoryType $bSGReference = null, \Sabre\UpdateReservation\StructType\BSGCounterHistoryType $bSGCounter = null) { $this ->setBSGReference($bSGReference) ->setBSGCounter($bSGCounter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(LogHistory $log)\n {\n parent::__construct();\n $this->log = $log;\n }", "public function __construct($history_id)\n {\n $this->history_id = $history_id;\n }", "public function __construct(array $attributes = [])\n {\n \t$this->setTable(config('status.history_table'));\n\n \tparent::__construct($attributes);\n }", "public function __construct($symbol = '', $stat = 'all', $history = false)\n {\n if ($symbol)\n $this->_setParam('symbol', $symbol);\n $this->_setParam('stat', $stat);\n $this->_setParam('history', $history);\n }", "public function __construct()\n {\n parent::__construct('Log', 'gems__log_activity', 'gla', true);\n $this->addTable('gems__log_setup', array('gla_action' => 'gls_id_action'))\n ->addLeftTable('gems__respondents', array('gla_respondent_id' => 'grs_id_user'))\n ->addLeftTable('gems__staff', array('gla_by' => 'gsf_id_user'));\n\n $this->setKeys(array(\\Gems_Model::LOG_ITEM_ID => 'gla_id'));\n }", "public function __construct($type)\n {\n }", "function __construct($xml)\n\t{\n\t\tparent::__construct($xml);\n\t\t$this->infolog = new infolog_bo();\n\t}", "public function __construct(){\n parent::__construct();\n\n # load history\n # have to get it from database manually to get past the cache\n $config = Mage::getModel(\"core/config_data\")->getCollection()\n ->addFieldToFilter(\"scope_id\",\"0\")\n ->addFieldToFilter(\"path\",self::XML_PATH_DATASTORE)\n ->getFirstItem();\n\n if($config->getId()){\n $this->_dataStore = json_decode($config->getValue(),true);\n } else {\n $this->_dataStore = json_decode(Mage::getStoreConfig(self::XML_PATH_DATASTORE,0),true);\n }\n }", "public function __construct()\n {\n parent::__construct('gems__tracks');\n\n $this->addColumn(\"CASE WHEN gtr_track_class = 'SingleSurveyEngine' THEN 'deleted' ELSE '' END\", 'row_class');\n\n \\Gems_Model::setChangeFieldsByPrefix($this, 'gtr');\n\n $this->set('gtr_date_start', 'default', new \\Zend_Date());\n }", "public function __construct()\n {\n parent::__construct(ChartTypes::BAR);\n }", "function __construct($type) {\n\t$this->type = $type;\n\t}", "public function __construct() {\n $this->_blockGroup = 'wsu_auditing';\n $this->_controller = 'adminhtml_history';\n $this->_headerText = Mage::helper('wsu_auditing')->__('History');\n parent::__construct();\n $this->removeButton('add');\n }", "public function __construct($_oprL = null,$_oprType = null,$_label = null,$_name = null,$_oper = null,$_debit = null,$_credit = null)\n {\n parent::__construct(array('oprL'=>$_oprL,'oprType'=>$_oprType,'Label'=>$_label,'Name'=>$_name,'oper'=>$_oper,'Debit'=>$_debit,'Credit'=>$_credit), false);\n }", "public function initHistorys()\n\t{\n\t\t$this->collHistorys = array();\n\t}", "public function __construct($type='htag') {\n\t\tparent::__construct($type);\n\t}", "public function __construct(array $options=null) {\r\n\t\tparent::__construct($options);\r\n\t\t$this->setDbTable('Applicant_Model_DbTable_ApplicantRentalCriminalHistory');\r\n\t}", "function __construct ($strId)\n\t\t{\n\t\t\tparent::__construct ('ServiceStateType');\n\t\t\t\n\t\t\t$strName = 'Unknown';\n\t\t\t\n\t\t\tswitch ($strId)\n\t\t\t{\n\t\t\t\tcase SERVICE_STATE_TYPE_ACT:\n\t\t\t\t\t$strName = 'Australian Capital Territory';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_NSW:\n\t\t\t\t\t$strName = 'New South Wales';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_NT:\n\t\t\t\t\t$strName = 'Northern Territory';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_QLD:\n\t\t\t\t\t$strName = 'Queensland';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_SA:\n\t\t\t\t\t$strName = 'South Australia';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_TAS:\n\t\t\t\t\t$strName = 'Tasmania';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_VIC:\n\t\t\t\t\t$strName = 'Victoria';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_WA:\n\t\t\t\t\t$strName = 'Western Australia';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->oblstrType\t\t= $this->Push (new dataString\t('Id',\t\t$strId));\n\t\t\t$this->oblstrName\t\t= $this->Push (new dataString\t('Name',\t$strName));\n\t\t}", "public function __construct()\n\t\t{\n\t\t\t$this->_db_table = new Application_Model_DbTable_TourType();\n\t\t}", "public function __construct() {\n\t\tglobal $wgHooks;\n\t\t$wgHooks['SpecialRecentChangesQuery'][] = $this;\n\t\tif( !$this->getRequest()->getVal( 'feed' ) ) $this->getRequest()->setVal( 'feed', 'rss' );\n\t\tif( !$this->getRequest()->getVal( 'days' ) ) $this->getRequest()->setVal( 'days', 1000 );\n\t\tparent::__construct( 'BlikiFeed' );\n\t}", "public function initialize()\n {\n // attributes\n $this->setName('so_lot_ser_hist');\n $this->setPhpName('SalesHistoryLotserial');\n $this->setIdentifierQuoting(false);\n $this->setClassName('\\\\SalesHistoryLotserial');\n $this->setPackage('');\n $this->setUseIdGenerator(false);\n // columns\n $this->addForeignPrimaryKey('OehhNbr', 'Oehhnbr', 'INTEGER' , 'so_head_hist', 'OehhNbr', true, 10, 0);\n $this->addForeignPrimaryKey('OehhNbr', 'Oehhnbr', 'INTEGER' , 'so_det_hist', 'OehhNbr', true, 10, 0);\n $this->addForeignPrimaryKey('OedhLine', 'Oedhline', 'INTEGER' , 'so_det_hist', 'OedhLine', true, 4, 0);\n $this->addForeignPrimaryKey('InitItemNbr', 'Inititemnbr', 'VARCHAR' , 'inv_item_mast', 'InitItemNbr', true, 30, '');\n $this->addPrimaryKey('OeshTag', 'Oeshtag', 'CHAR', true, null, '');\n $this->addPrimaryKey('OeshLotSer', 'Oeshlotser', 'VARCHAR', true, 20, '');\n $this->addPrimaryKey('OeshBin', 'Oeshbin', 'VARCHAR', true, 8, '');\n $this->addPrimaryKey('OeshPlltNbr', 'Oeshplltnbr', 'INTEGER', true, 4, 0);\n $this->addPrimaryKey('OeshCrtnNbr', 'Oeshcrtnnbr', 'INTEGER', true, 4, 0);\n $this->addColumn('OeshYear', 'Oeshyear', 'CHAR', true, 4, '');\n $this->addColumn('OeshQtyShip', 'Oeshqtyship', 'DECIMAL', true, 20, 0);\n $this->addColumn('OeshCntrQty', 'Oeshcntrqty', 'DECIMAL', true, 20, 0);\n $this->addColumn('OeshSpecOrdr', 'Oeshspecordr', 'CHAR', true, null, '');\n $this->addColumn('OeshLotRef', 'Oeshlotref', 'VARCHAR', true, 20, '');\n $this->addColumn('OeshBatch', 'Oeshbatch', 'VARCHAR', true, 15, '');\n $this->addColumn('OeshCureDate', 'Oeshcuredate', 'VARCHAR', true, 10, '');\n $this->addColumn('OeshAcStatus', 'Oeshacstatus', 'VARCHAR', true, 4, '');\n $this->addColumn('OeshTestLot', 'Oeshtestlot', 'VARCHAR', true, 4, '');\n $this->addColumn('OeshPlltType', 'Oeshpllttype', 'CHAR', true, null, '');\n $this->addColumn('OeshTareWght', 'Oeshtarewght', 'DECIMAL', true, 20, 0);\n $this->addColumn('OeshUseUp', 'Oeshuseup', 'CHAR', true, null, '');\n $this->addColumn('OeshLblPrtd', 'Oeshlblprtd', 'CHAR', true, null, '');\n $this->addColumn('OeshOrigBin', 'Oeshorigbin', 'VARCHAR', true, 8, '');\n $this->addColumn('OeshActvDate', 'Oeshactvdate', 'CHAR', true, 8, '');\n $this->addColumn('OeshPlltID', 'Oeshplltid', 'VARCHAR', true, 15, '');\n $this->addColumn('DateUpdtd', 'Dateupdtd', 'CHAR', true, 8, '');\n $this->addColumn('TimeUpdtd', 'Timeupdtd', 'CHAR', true, 8, '');\n $this->addColumn('dummy', 'Dummy', 'CHAR', true, null, 'P');\n }", "function __construct ($intCreditCardType=null)\n\t\t{\n\t\t\tparent::__construct ('CreditCardTypes');\n\t\t\t\n\t\t\t// Instantiate the Variable Values for possible selection\n\t\t\t$this->_VISA\t\t= $this->Push (new CreditCardType (CREDIT_CARD_VISA));\n\t\t\t$this->_MASTERCARD\t= $this->Push (new CreditCardType (CREDIT_CARD_MASTERCARD));\n\t\t\t$this->_AMEX\t\t= $this->Push (new CreditCardType (CREDIT_CARD_AMEX));\n\t\t\t$this->_DINERS\t\t= $this->Push (new CreditCardType (CREDIT_CARD_DINERS));\n\t\t\t\n\t\t\t$this->setValue ($intCreditCardType);\n\t\t}", "public function initialize()\n {\n // attributes\n $this->setName('email_manager_history');\n $this->setPhpName('EmailManagerHistory');\n $this->setClassName('\\\\TheliaEmailManager\\\\Model\\\\EmailManagerHistory');\n $this->setPackage('TheliaEmailManager.Model');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);\n $this->addForeignKey('TRACE_ID', 'TraceId', 'INTEGER', 'email_manager_trace', 'ID', true, null, null);\n $this->addColumn('STATUS', 'Status', 'INTEGER', false, null, 0);\n $this->addColumn('SUBJECT', 'Subject', 'LONGVARCHAR', false, null, null);\n $this->addColumn('INFO', 'Info', 'LONGVARCHAR', false, null, null);\n $this->addColumn('BODY', 'Body', 'BLOB', false, null, null);\n $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);\n $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);\n }", "function __construct($id='', $type='current'){\r\n\t\tGLOBAL $strLocal;\r\n\t\tGLOBAL $arrUsrData;\r\n\t\t\r\n\t\t$this->gridName = self::GridName;\t\t\r\n\t\t$this->gridClass = 'headcount_record';\t\t\r\n\t\t$this->register = self::Register;\r\n\t\t\r\n\t\tswitch($type){\r\n\t\t\tcase 'new':\r\n\t\t\t\t$this->table = 'tbl_new_employee';\r\n\t\t\t\t$this->prefix = 'nem';\r\n\t\t\tbreak;\r\n\t\t\tcase 'current':\r\n\t\t\tdefault:\r\n\t\t\t\t$this->table = 'tbl_current_employee';\r\n\t\t\t\t$this->prefix = 'cem';\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t$this->type = $type;\r\n\t\t\r\n\t\tparent::__construct($id);\r\n\t\t\r\n\t}", "public function __construct($type) {\n $this->type = $type;\n }", "public function __construct()\n {\n parent::__construct();\n\n // Set data types\n $this->data_types = array(\n 'title' => 'string',\n 'url' => 'url',\n 'url_key' => 'md5',\n 'embed' => 'string',\n 'created_on' => 'datetime'\n );\n\n }", "function WeblogTrackbackBase() {\n $this->XoopsObject();\n\n $this->initVar(\"blog_id\", XOBJ_DTYPE_INT, 0, false);\n $this->initVar(\"tb_url\", XOBJ_DTYPE_TXTBOX, null, true);\n $this->initVar(\"blog_name\", XOBJ_DTYPE_TXTBOX, null, false);\n $this->initVar(\"title\", XOBJ_DTYPE_TXTBOX, null, false);\n $this->initVar(\"description\", XOBJ_DTYPE_TXTBOX, null, false);\n $this->initVar(\"link\", XOBJ_DTYPE_TXTBOX, null, false);\n $this->initVar(\"direction\", XOBJ_DTYPE_TXTBOX, null, false);\n $this->initVar(\"trackback_created\", XOBJ_DTYPE_INT, 0, false);\n }", "public function __construct($type, $args = NULL);", "public function __construct($_cardType = NULL,$_cardNumber = NULL,$_bankName = NULL,$_bankCode = NULL)\n {\n parent::__construct(array('CardType'=>$_cardType,'CardNumber'=>$_cardNumber,'BankName'=>$_bankName,'BankCode'=>$_bankCode),false);\n }", "public function __construct(Temboo_Session $session)\n {\n parent::__construct($session, '/Library/LastFm/User/GetBannedTracks/');\n }", "public function __construct($type)\n {\n $this->type = $type;\n }", "public function __construct()\n {\n parent::__construct();\n $this->binRequest = new BinanceRequest();\n $this->candidates = [];\n }", "public function __construct()\n {\n parent::__construct();\n $this->bsodOrder = new BsodOrder();\n }", "protected function __construct($activity)\n {\n $model = new $activity->loggable_type;\n\n $this->raw = $this->getConfig($model, 'raw');\n\n $this->granularity = $this->getConfig($model, 'granularity');\n\n $this->before = $this->getData($model, (array) $activity->before);\n\n $this->after = $this->getData($model, (array) $activity->after);\n }", "public function __construct($title = null, $type = 'global', $items = null)\n {\n $this->title = is_null($title) ? __('sp::field.history') : $title;\n $this->type = in_array($type,['global','model','user']) ? $type : 'global';\n $this->items = $items;\n }", "public function __construct($content, $url = RANKSURL)\r\n\t{\r\n\t\tif ( isset($content) ) {\r\n\t\t\t\r\n\t\t\t$this->content = $content;\r\n\t\t\t$this->contentURL = $url;\r\n\t\t}else {\r\n\t\t\t// We got nothing - this also ends page\r\n\t\t\tRestUtils::sendResponse(204);\r\n\t\t\texit;\r\n\t\t}\r\n\t\t\r\n\t\tif ( SC2Utils::isbnetURL($this->contentURL) ) {\r\n\t\t\t$this->jsonData = json_encode($this->getBNETHistory());\r\n\t\t}else {\r\n\t\t\t$this->jsonData = json_encode($this->getRanksHistory());\r\n\t\t}\r\n\t}", "public function __construct($type)\n {\n $this->type=$type;\n }", "public function __construct() {\n $this->Types;\n }", "function initialize_history($nonce,$sanse=false)\n \t{\n\tif ($nonce)\t \n \tself::kcollect($nonce);\n $this->history_collector = $this->collector;\n\t$this->history_collector_state \t= $this->new_collector;\n $this->history_key = $this->roll_key;\n\tif (!$sanse)\n \tself::kdigest($this->TAG_SIZE);\n $this->e_attr = 0;\n\t}", "public function __construct($type, $params, $culture) {\n\n parent::__construct($type, $params, $culture);\n\n \n }", "public function __construct()\n {\n $this->types = array(self::TYPE_EMISSION, self::TYPE_TRANSFER);\n }", "public function __construct()\n {\n $this->city = new City;\n $this->country = new Country;\n $this->event = new Event;\n $this->experience = new Experience;\n $this->place = new Place;\n $this->type = new Type;\n $this->subcategory = new Subcategory;\n }", "public function __construct(Stock $stock)\n {\n $this->stock = $stock;\n }", "public function __construct() {\n\n $this->tableName = \"re_event_type\";\n $this->setColumnsInfo(\"id\", \"int(11)\", 0);\n $this->setColumnsInfo(\"name\", \"varchar(250)\", \"\");\n $this->setColumnsInfo(\"id_space\", \"int(11)\", 0);\n $this->primaryKey = \"id\";\n }", "public function __construct(Temboo_Session $session)\n {\n parent::__construct($session, '/Library/LastFm/User/GetWeeklyTrackChart/');\n }", "function __construct ()\n\t\t{\n\t\t\tparent::__construct ('Charges', 'Charge', 'Charge');\n\t\t}", "public function __construct()\n {\n $fullClassName = explode('\\\\', get_class($this));\n $this->type = (string)array_pop($fullClassName);\n }", "function __construct() {\n\t\tparent::__construct('1', $this->sMod); //this calls cls.company constructor\n\t}", "public function __construct($db)\n {\n parent::__construct($db, 'comment_history', 'edit_id');\n\n \t// Set up new date time\n $this->dateTime = new DateTime(\"now\", new DateTimeZone(date_default_timezone_get()));\n\n // These are required\n $this->add('comment_id');\n $this->add('rsrc_id');\n $this->add('editor_id');\n $this->add('date_edited', $this->dateTime->format(\"Y-m-d H:i:s\"));\n $this->add('title');\n $this->add('comment');\n }", "public function __construct(StockPrice $stockPrice)\n {\n //\n $this->stockPrice = $stockPrice;\n\n }", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.shiftPreferences');\n }", "protected abstract function __construct();", "public function __construct(Temboo_Session $session)\n {\n parent::__construct($session, '/Library/LastFm/User/GetWeeklyAlbumChart/');\n }", "public function __construct(){\n $this->taskHistoryModel = $this->model('TaskHistoryModel');\n }", "public function __construct()\n {\n if (17 == func_num_args()) {\n $this->id = func_get_arg(0);\n $this->number = func_get_arg(1);\n $this->name = func_get_arg(2);\n $this->balance = func_get_arg(3);\n $this->type = func_get_arg(4);\n $this->aggregationStatusCode = func_get_arg(5);\n $this->status = func_get_arg(6);\n $this->customerId = func_get_arg(7);\n $this->institutionId = func_get_arg(8);\n $this->balanceDate = func_get_arg(9);\n $this->aggregationSuccessDate = func_get_arg(10);\n $this->aggregationAttemptDate = func_get_arg(11);\n $this->createdDate = func_get_arg(12);\n $this->currency = func_get_arg(13);\n $this->lastTransactionDate = func_get_arg(14);\n $this->institutionLoginId = func_get_arg(15);\n $this->displayPosition = func_get_arg(16);\n }\n }", "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->catalogName = func_get_arg(0);\n $this->brands = func_get_arg(1);\n }\n }", "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.windowsQualityUpdateCatalogItem');\n }", "public function __construct(Temboo_Session $session)\n {\n parent::__construct($session, '/Library/LastFm/User/GetRecentTracks/');\n }", "public function __construct()\n {\n if (5 == func_num_args()) {\n $this->type = func_get_arg(0);\n $this->currentBalance = func_get_arg(1);\n $this->twoMonthAverage = func_get_arg(2);\n $this->sixMonthAverage = func_get_arg(3);\n $this->beginningBalance = func_get_arg(4);\n }\n }", "public function construct()\n\t\t{\n\t\t}", "public function __construct()\n {\n $this->middleware('auth');\n $this->field_list = ['number_usuario'=>'Memebresía','points'=>'Puntos','value'=>'Valor','todate'=>'Fecha'];\n $this->name = 'Mi Historial';\n $this->name_plural = 'fa fa-newspaper-o';\n $this->form = 'App\\Core\\Forms\\Admin\\HistoryForm';\n $this->model = 'App\\Models\\Catalogos\\History';\n $this->url_prefix = 'usuariohistory';\n $validation_add = [\n 'folio'=>'required|max:25',\n ];\n $validation_edit = $validation_add;\n $this->setValidatorAdd($validation_add);\n $this->setValidatorEdit($validation_edit);\n }", "public function __construct()\n {\n parent::__construct('BaseAta_program_category');\n }", "public function __construct()\n {\n if (1 == func_num_args()) {\n $this->insuranceTypesCount = func_get_arg(0);\n }\n }", "public function __construct($Bdata)\n {\n $this->data = $Bdata;\n }", "function __construct($type='simple')\n {\n $this->type = $type;\n }", "public function __construct(Temboo_Session $session)\n {\n parent::__construct($session, '/Library/LastFm/User/GetWeeklyChartList/');\n }", "function __constructor(){}", "public function __construct(Temboo_Session $session)\n {\n parent::__construct($session, '/Library/Google/Spreadsheets/RetrieveLastColumnValue/');\n }", "public function __construct(Temboo_Session $session)\n {\n parent::__construct($session, '/Library/LastFm/User/GetRecentStations/');\n }", "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->name = func_get_arg(0);\n $this->values = func_get_arg(1);\n }\n }", "public function __construct()\n {\n parent::__construct('BaseMtc_open_dates');\n }", "public function __construct(Temboo_Session $session)\n {\n parent::__construct($session, '/Library/Google/ComputeEngine/MachineTypes/AggregatedList/');\n }", "function __construct() {\n $this->ale_demo_history = get_option(ALETHEME_SHORTNAME . '_demo_history');\n }", "function __construct() {\n parent::__construct();\n\n $this->_converter = new \\System\\Data\\Converter();\n }", "public function __construct($_version = NULL,$_shipmentNumber = NULL,$_shipmentOrder = NULL)\n {\n parent::__construct(array('Version'=>$_version,'ShipmentNumber'=>$_shipmentNumber,'ShipmentOrder'=>$_shipmentOrder),false);\n }", "abstract public function __construct($value);", "public function __construct(BeaconStats $stats, BeaconBilling $beacon_billing) {\n $this->stats = $stats;\n $this->beaconBilling = $beacon_billing;\n }", "function _construct(){ }", "final private function __construct() {\n\t\t\t}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "function __construct() {\n parent::__construct('stocks_held', 'id');\n }", "public function __construct() {\n self::getBdd();\n }", "public function __construct($type)\n\t{\n\t\t$this->type = $type;\n\t\t$this->cache_time = Kohana::config($this->type.'.cache_time');\n\t}", "final private function __construct()\n {\n }", "public function __construct( $form_type, $args )\n {\n parent::__construct( $form_type.'_form', $args );\n $this->form_type = $form_type;\n \n $this->add_column( 'id', 'number', 'ID', true );\n $this->add_column( 'date', 'date', 'Date Added', true );\n $this->add_column( 'typist_1', 'string', 'Typist 1', false );\n $this->add_column( 'typist_1_submitted', 'boolean', 'Submitted', false );\n $this->add_column( 'typist_2', 'string', 'Typist 2', false );\n $this->add_column( 'typist_2_submitted', 'boolean', 'Submitted', false );\n $this->add_column( 'conflict', 'boolean', 'Conflict', false );\n }" ]
[ "0.6414826", "0.6120144", "0.5866517", "0.5728219", "0.5634685", "0.5594342", "0.55675554", "0.5566955", "0.5551891", "0.55483204", "0.5523311", "0.55220085", "0.5457646", "0.544002", "0.5428715", "0.54101074", "0.5392327", "0.5355599", "0.534591", "0.5339991", "0.53359264", "0.5329438", "0.53214264", "0.53203416", "0.529329", "0.5267101", "0.5266968", "0.5255013", "0.524491", "0.5244267", "0.52437526", "0.523414", "0.52314806", "0.5228638", "0.52259725", "0.5213741", "0.5211246", "0.52103496", "0.5201535", "0.52001953", "0.5189308", "0.5178708", "0.5174962", "0.51736194", "0.5168484", "0.5168253", "0.5164736", "0.515313", "0.51515716", "0.51444334", "0.5143393", "0.5138186", "0.51349455", "0.51347035", "0.5127488", "0.5123693", "0.51109064", "0.51107156", "0.51056266", "0.5105587", "0.5098797", "0.50937575", "0.5089607", "0.5089601", "0.5079894", "0.50765795", "0.5075927", "0.50752735", "0.50618076", "0.50608873", "0.50597423", "0.50570554", "0.50551933", "0.50412434", "0.5038585", "0.5034295", "0.50329816", "0.5029635", "0.5027202", "0.5027202", "0.5027202", "0.5027202", "0.5027202", "0.5027202", "0.5027202", "0.5027202", "0.5027202", "0.5027202", "0.5027202", "0.5027202", "0.5027202", "0.5027202", "0.5027202", "0.5027202", "0.5027202", "0.5025889", "0.5023993", "0.50181395", "0.5015783", "0.50154066" ]
0.7013523
0
Method called when an object has been exported with var_export() functions It allows to return an object instantiated with the values
public static function __set_state(array $array) { return parent::__set_state($array); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ExportObject() {\n // Init object\n $plugin = new stdClass();\n // Set values\n $plugin->Name = $this->Name;\n $plugin->Version = $this->Version;\n $plugin->Author = $this->Author;\n $plugin->About = $this->About;\n $plugin->Root = $this->Root;\n $plugin->Identifier = $this->Identifier;\n \n // Return result\n return $plugin;\n }", "protected function constructExportObject()\n\t{\n\t\t//default export is \"all public fields\"\n\t\treturn (object) Arrays::getPublicPropertiesOfObject($this);\n\t}", "function from_export($value) {\n return $value;\n }", "public function export(): mixed;", "public function ExportObject() {\n // Init object\n $col = new stdClass();\n \n // Set values\n $col->id = $this->Id;\n $col->type = $this->Type;\n $col->label = $this->Label;\n $col->p = $this->P;\n \n // Return values\n return $col;\n }", "public function exportData() {\n\t\treturn $this->constructExportObject();\n\t}", "public function toObject();", "function ctools_export_new_object($table, $set_defaults = TRUE) {\r\n $schema = ctools_export_get_schema($table);\r\n $export = $schema['export'];\r\n\r\n $object = new $export['object'];\r\n foreach ($schema['fields'] as $field => $info) {\r\n if (isset($info['object default'])) {\r\n $object->$field = $info['object default'];\r\n }\r\n else if (isset($info['default'])) {\r\n $object->$field = $info['default'];\r\n }\r\n else {\r\n $object->$field = NULL;\r\n }\r\n }\r\n\r\n if ($set_defaults) {\r\n // Set some defaults so this data always exists.\r\n // We don't set the export_type property here, as this object is not saved\r\n // yet. We do give it NULL so we don't generate notices trying to read it.\r\n $object->export_type = NULL;\r\n $object->{$export['export type string']} = t('Local');\r\n }\r\n return $object;\r\n}", "public function export();", "public function export();", "public function export();", "public function export();", "public function export();", "public function createExport();", "public function newInstance(): object;", "public static function createFromGlobals();", "public function export (){\n\n }", "function &object(object $value, string $namespace = 'default'): object\n{\n $var = new Variable\\ObjectVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "public function getObj();", "public static function toObject(){\r\n $args = func_get_args();\r\n \r\n if(count($args) >=2){\r\n $className = '\\\\'.str_replace('.', '\\\\', $args[0]);\r\n $refClass = new \\ReflectionClass($className);\r\n $toObjInstance = $refClass->newInstance();\r\n\r\n unset($args[0]);\r\n \r\n foreach($args as $arg){\r\n \r\n if(is_object($arg)){\r\n $arg = Obj::getProperties($arg);\r\n }\r\n \r\n if(is_array($arg)){\r\n foreach($arg as $propertyName=>$propertyValue){\r\n if($refClass->hasProperty($propertyName)){\r\n $property = $refClass->getProperty($propertyName);\r\n $property->setAccessible(true);\r\n $property->setValue($toObjInstance, $propertyValue);\r\n }\r\n }\r\n }\r\n }\r\n return $toObjInstance;\r\n }\r\n }", "public function export()\n {\n }", "function &stdClass(stdClass $value, string $namespace = 'default'): stdClass\n{\n $var = new Variable\\StdClassVariable($value);\n Repository::add($var, $namespace);\n return $var->getValue();\n}", "public function getExportableValues() {\n\t\telgg_deprecated_notice(__METHOD__ . ' has been deprecated by toObject()', 1.9);\n\t\treturn array(\n\t\t\t'id',\n\t\t\t'entity_guid',\n\t\t\t'name',\n\t\t\t'value',\n\t\t\t'value_type',\n\t\t\t'owner_guid',\n\t\t\t'type',\n\t\t);\n\t}", "public function ExportObject() {\n // Init object\n $overviewChart = new stdClass();\n \n // Set values\n $overviewChart->Types = $this->Types;\n $overviewChart->Chart = $this->Chart->ExportObject();\n \n //return result\n return $overviewChart;\n }", "public function export()\n {\n \n }", "public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }", "public function getter () {\n return (object)[\n get_plugin_name => $this->plugin_name,\n get_plugin_version => $this->plugin_version,\n get_translation_slug => $this->translation_slug,\n get_admin_page_slug => $this->admin_page_slug,\n get_api_namespace => $this->api_namespace,\n get_options_name => $this->options_name\n ];\n }", "public function getObject() {}", "public function getObject() {}", "public function export()\n {\n //\n }", "function _instantiateExportDeployment($context) {\n\t\t$exportDeploymentClassName = $this->getExportDeploymentClassName();\n\t\t$this->import($exportDeploymentClassName);\n\t\t$exportDeployment = new $exportDeploymentClassName($context, $this);\n\t\treturn $exportDeployment;\n\t}", "function get_obj()\n {\n $object = new ApiRest;\n return $object;\n }", "public function __CONSTRUCT(){\n\t}", "public function newInstance();", "public function newInstance();", "public function getInstance(): object;", "public function exportedVars(): iterable;", "public static function fromGlobals() {}", "public function ExportObject() {\n // Init object\n $submission = new stdClass();\n \n // Set values\n $submission->Id = $this->Id;\n $submission->DateTime = $this->DateTime;\n $submission->GitHash = $this->GitHash;\n $submission->Categories = array();\n \n // Export each category\n foreach ($this->Categories as $category) {\n $submission->Categories[] = $category->ExportObject();\n }\n \n // return result\n return $submission;\n }", "public function getInstance(): object\n {\n }", "function ctools_get_default_object($table, $name) {\r\n $schema = ctools_export_get_schema($table);\r\n $export = $schema['export'];\r\n\r\n if (!$export['default hook']) {\r\n return;\r\n }\r\n\r\n // Try to load individually from cache if this cache is enabled.\r\n if (!empty($export['cache defaults'])) {\r\n $defaults = _ctools_export_get_some_defaults($table, $export, array($name));\r\n }\r\n else {\r\n $defaults = _ctools_export_get_defaults($table, $export);\r\n }\r\n\r\n $status = variable_get($export['status'], array());\r\n\r\n if (!isset($defaults[$name])) {\r\n return;\r\n }\r\n\r\n $object = $defaults[$name];\r\n\r\n // Determine if default object is enabled or disabled.\r\n if (isset($status[$object->{$export['key']}])) {\r\n $object->disabled = $status[$object->{$export['key']}];\r\n }\r\n\r\n $object->{$export['export type string']} = t('Default');\r\n $object->export_type = EXPORT_IN_CODE;\r\n $object->in_code_only = TRUE;\r\n\r\n return $object;\r\n}", "public function toStdClass() {\n $stdClass = new stdClass();\n $stdClass->number = $this->_number;\n $stdClass->internal = $this->_internal;\n return $stdClass;\n }", "public function getObject(): object;", "public function get_export_data()\n {\n\n $l_sql = \"SELECT isys_obj_type__id, isys_obj_type__title, isys_verinice_types__title, isys_verinice_types__const \" . \"FROM isys_obj_type \" . \"INNER JOIN isys_verinice_types ON isys_obj_type__isys_verinice_types__id = isys_verinice_types__id \";\n\n return $this->retrieve($l_sql);\n\n }", "public function dataProviderExport()\n {\n // Regular :\n $data = [\n [\n 'test string',\n var_export('test string', true),\n ],\n [\n 75,\n var_export(75, true),\n ],\n [\n 7.5,\n var_export(7.5, true),\n ],\n [\n null,\n 'null',\n ],\n [\n true,\n 'true',\n ],\n [\n false,\n 'false',\n ],\n [\n [],\n '[]',\n ],\n ];\n // Arrays :\n $var = [\n 'key1' => 'value1',\n 'key2' => 'value2',\n ];\n $expectedResult = <<<'RESULT'\n[\n 'key1' => 'value1',\n 'key2' => 'value2',\n]\nRESULT;\n $data[] = [$var, $expectedResult];\n $var = [\n 'value1',\n 'value2',\n ];\n $expectedResult = <<<'RESULT'\n[\n 'value1',\n 'value2',\n]\nRESULT;\n $data[] = [$var, $expectedResult];\n $var = [\n 'key1' => [\n 'subkey1' => 'value2',\n ],\n 'key2' => [\n 'subkey2' => 'value3',\n ],\n ];\n $expectedResult = <<<'RESULT'\n[\n 'key1' => [\n 'subkey1' => 'value2',\n ],\n 'key2' => [\n 'subkey2' => 'value3',\n ],\n]\nRESULT;\n $data[] = [$var, $expectedResult];\n // Objects :\n $var = new \\StdClass();\n $var->testField = 'Test Value';\n $expectedResult = \"unserialize('\" . serialize($var) . \"')\";\n $data[] = [$var, $expectedResult];\n $var = function () {return 2;};\n $expectedResult = 'function () {return 2;}';\n $data[] = [$var, $expectedResult];\n return $data;\n }", "public static function export()\n {\n return null;\n }", "function create()\n\t{\n\t\t$names = $this->_fields;\n\t\t$object = new StdClass;\n\t\tforeach ($names as $name)\n\t\t\t$object->$name = \"\";\n\t\treturn $object;\n\t}", "public function construct()\n {\n return $this->object;\n }", "public function metaExport($object = false);", "public function vars()\n {\n \n return new ArrayWrapper(get_object_vars($this->object));\n \n }", "public function getValuesObject()\n {\n $obj = new \\stdClass;\n\n foreach ( $this->keyValues as $key => $value )\n {\n $obj->$key = $value;\n }\n\n return $obj;\n }", "public function getObject();", "public function getObject();", "function newDataObject() {\n\t\t$ofrPlugin =& PluginRegistry::getPlugin('generic', $this->parentPluginName);\n\t\t$ofrPlugin->import('classes.ObjectForReviewPerson');\n\t\treturn new ObjectForReviewPerson();\n\t}", "public function __construct(VariableExportInterface $variableExport)\n {\n $this->serialized = $variableExport->toSerialize();\n }", "public function as_object($class = TRUE, $arguments = array());", "function var_export($expression, $return = false)\n{\n}", "function getObject();", "function getObject();", "abstract public function object();", "abstract protected function createObject();", "public function __construct()\r\n {\r\n $this->_internalObject = new stdClass();\r\n\t\t$a=serialize($this->_internalObject);\r\n\t\t\"echo $a<br>\";\r\n }", "function &getInstance($module_srl)\n\t{\n\t\treturn new ExtraVar($module_srl);\n\t}", "abstract function exportData();", "function createProduct($name,$price,$qty,$id):stdClass\n{\n$product=new stdClass();\n$product->name=$name;\n$product->price=$price;\n$product->quantity= $qty;\n$product->id=$id;\n\nreturn $product;\n}", "abstract protected function exportFunctions();", "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 &__invoke()\r\n\t{\r\n\t\t$result = new stdClass();\r\n\t\tAdhoc::eachTrap('Registry',\r\n\t\t\tfunction ($trap) use (&$result)\r\n\t\t\t{\r\n\t\t\t\t$data =& $trap->GetList();\r\n\t\t\t\tforeach ($data as $k=>$v)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (!isset($result->$k) and isset($v))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$result->$k = $v;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "public static function instantation($the_record){\n\n // can be used to retrieve a string with the name of the called class and static:: introduces its scope.\n $calling_class = get_called_class();\n\n $the_object = new $calling_class;\n\n\n // doing a loop to get all of the values in the object ]\n foreach($the_record as $key => $value) {\n\n if($the_object->has_the_key($key)){\n $the_object->$key = $value;\n \n }\n }\n\n return $the_object;\n }", "public static function get_object() {\n\t\treturn self::$object;\n\t}", "function adminer_object() {\r\n include_once \"./plugins/plugin.php\";\r\n \r\n // autoloader\r\n foreach (glob(\"plugins/*.php\") as $filename) {\r\n include_once \"./$filename\";\r\n }\r\n \r\n $plugins = array(\r\n // specify enabled plugins here\r\n // new AdminerDumpXml,\r\n // new AdminerTinymce,\r\n // new AdminerFileUpload(\"data/\"),\r\n // new AdminerSlugify,\r\n // new AdminerTranslation,\r\n // new AdminerForeignSystem,\r\n // new AdminerLoginPasswordLess(password_hash(\"\", PASSWORD_DEFAULT)),\r\n );\r\n \r\n /* It is possible to combine customization and plugins:\r\n class AdminerCustomization extends AdminerPlugin {\r\n }\r\n return new AdminerCustomization($plugins);\r\n */\r\n class AdminerCustomization extends AdminerPlugin {\r\n function login($login, $password) {\r\n // validate user submitted credentials\r\n return true;\r\n }\r\n }\r\n return new AdminerCustomization($plugins);\r\n \r\n // return new AdminerPlugin($plugins);\r\n}", "public function ExportItem() {\n // Init object\n $submission = new stdClass();\n \n // Set values\n $submission->Id = $this->Id;\n $submission->DateTime = $this->DateTime;\n $submission->ImportDateTime = $this->ImportDateTime;\n $submission->User = $this->User;\n $submission->Good = $this->Good;\n $submission->Bad = $this->Bad;\n $submission->Strange = $this->Strange;\n $submission->GitHash = $this->GitHash;\n $submission->SequenceNumber = $this->SequenceNumber;\n \n // Return result\n return $submission;\n }", "private static function _instantiateThisObject() {\r\n $className = get_called_class();\r\n return new $className();\r\n }", "function instance($obj) {\n\tif (is_string($obj)) {\n\t\t$obj = new $obj;\n\t}\n\treturn $obj;\n}", "function ctools_var_export($var, $prefix = '') {\r\n if (is_array($var)) {\r\n if (empty($var)) {\r\n $output = 'array()';\r\n }\r\n else {\r\n $output = \"array(\\n\";\r\n foreach ($var as $key => $value) {\r\n $output .= $prefix . \" \" . ctools_var_export($key) . \" => \" . ctools_var_export($value, $prefix . ' ') . \",\\n\";\r\n }\r\n $output .= $prefix . ')';\r\n }\r\n }\r\n else if (is_object($var) && get_class($var) === 'stdClass') {\r\n // var_export() will export stdClass objects using an undefined\r\n // magic method __set_state() leaving the export broken. This\r\n // workaround avoids this by casting the object as an array for\r\n // export and casting it back to an object when evaluated.\r\n $output = '(object) ' . ctools_var_export((array) $var, $prefix);\r\n }\r\n else if (is_bool($var)) {\r\n $output = $var ? 'TRUE' : 'FALSE';\r\n }\r\n else {\r\n $output = var_export($var, TRUE);\r\n }\r\n\r\n return $output;\r\n}", "public function getOutputObject()\n {\n $baseObject = parent::getOutputObject();\n $baseObject->name = $this->getName();\n\n return $baseObject;\n }", "public function init_objects() {\n $this->controller_oai = new \\Tainacan\\OAIPMHExpose\\OAIPMH_Expose();\n $this->list_sets = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Sets();\n $this->list_metadata_formats = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Metadata_Formats();\n $this->list_records = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Records();\n $this->get_record = new \\Tainacan\\OAIPMHExpose\\OAIPMH_Get_Record();\n $this->identify = new \\Tainacan\\OAIPMHExpose\\OAIPMH_Identify();\n $this->identifiers = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Identifiers();\n }", "public function _construct(){\n\t\treturn $this->data;\n\t}", "public function _construct(){\n\t\treturn $this->data;\n\t}", "public function regularNew() {}", "function data2Object($data) { \n\t\t\t$class_object = new getData($data); \n\t\t\treturn $class_object; \n\t\t}", "public function newInstance()\n {\n return $this->newInstanceArgs(func_get_args());\n }", "function ctools_export_object($table, $object, $indent = '', $identifier = NULL, $additions = array(), $additions2 = array()) {\r\n $schema = ctools_export_get_schema($table);\r\n if (!isset($identifier)) {\r\n $identifier = $schema['export']['identifier'];\r\n }\r\n\r\n $output = $indent . '$' . $identifier . ' = new ' . get_class($object) . \"();\\n\";\r\n\r\n if ($schema['export']['can disable']) {\r\n $output .= $indent . '$' . $identifier . '->disabled = FALSE; /* Edit this to true to make a default ' . $identifier . ' disabled initially */' . \"\\n\";\r\n }\r\n if (!empty($schema['export']['api']['current_version'])) {\r\n $output .= $indent . '$' . $identifier . '->api_version = ' . $schema['export']['api']['current_version'] . \";\\n\";\r\n }\r\n\r\n // Put top additions here:\r\n foreach ($additions as $field => $value) {\r\n $output .= $indent . '$' . $identifier . '->' . $field . ' = ' . ctools_var_export($value, $indent) . \";\\n\";\r\n }\r\n\r\n $fields = $schema['fields'];\r\n if (!empty($schema['join'])) {\r\n foreach ($schema['join'] as $join) {\r\n if (!empty($join['load'])) {\r\n foreach ($join['load'] as $join_field) {\r\n $fields[$join_field] = $join['fields'][$join_field];\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Go through our schema and joined tables and build correlations.\r\n foreach ($fields as $field => $info) {\r\n if (!empty($info['no export'])) {\r\n continue;\r\n }\r\n if (!isset($object->$field)) {\r\n if (isset($info['default'])) {\r\n $object->$field = $info['default'];\r\n }\r\n else {\r\n $object->$field = '';\r\n }\r\n }\r\n\r\n // Note: This is the *field* export callback, not the table one!\r\n if (!empty($info['export callback']) && function_exists($info['export callback'])) {\r\n $output .= $indent . '$' . $identifier . '->' . $field . ' = ' . $info['export callback']($object, $field, $object->$field, $indent) . \";\\n\";\r\n }\r\n else {\r\n $value = $object->$field;\r\n if ($info['type'] == 'int') {\r\n if (isset($info['size']) && $info['size'] == 'tiny') {\r\n $info['boolean'] = (!isset($info['boolean'])) ? $schema['export']['boolean'] : $info['boolean'];\r\n $value = ($info['boolean']) ? (bool) $value : (int) $value;\r\n }\r\n else {\r\n $value = (int) $value;\r\n }\r\n }\r\n\r\n $output .= $indent . '$' . $identifier . '->' . $field . ' = ' . ctools_var_export($value, $indent) . \";\\n\";\r\n }\r\n }\r\n\r\n // And bottom additions here\r\n foreach ($additions2 as $field => $value) {\r\n $output .= $indent . '$' . $identifier . '->' . $field . ' = ' . ctools_var_export($value, $indent) . \";\\n\";\r\n }\r\n\r\n return $output;\r\n}", "function _construct(){ }", "public function createValidObject() : object {\n\t\treturn (object) [\"tweetContent\" => bin2hex(random_bytes(12))];\n\t}", "public function _init_obj()\n {\n // dummy\n }", "protected function make_object( \\stdClass $data ) {\n\t\treturn new Purchase( $data );\n\t}", "public function as_object()\n {\n $this->return_as = 'object';\n return $this;\n }", "static public function fromObj($anObj) {\n\t\t$theClassName = get_called_class();\n\t\t$o = new $theClassName();\n\t\treturn $o->setDataFrom($anObj);\n\t}", "function adminer_object() {\n\t\tinclude_once \"plugins/plugin.php\";\n\t\t// autoloader\n\t\tforeach (glob(\"plugins/*.php\") as $filename) {\n\t\t\tinclude_once $filename;\n\t\t}\n\t\t$plugins = array(\n\t\t\t// specify enabled plugins here\n\t\t\tnew AdminerDatabaseHide(array('information_schema', 'mysql', 'performance_schema')),\n\t\t\t//new AdminerDumpJson,\n\t\t\t//new AdminerDumpBz2,\n\t\t\t//new AdminerDumpZip,\n\t\t\t//new AdminerDumpXml,\n\t\t\t//new AdminerDumpAlter,\n\t\t\t//~ new AdminerSqlLog(\"past-\" . rtrim(`git describe --tags --abbrev=0`) . \".sql\"),\n\t\t\t//new AdminerFileUpload(\"\"),\n\t\t\t//new AdminerJsonColumn,\n\t\t\t//new AdminerSlugify,\n\t\t\t//new AdminerTranslation,\n\t\t\t//new AdminerForeignSystem,\n\t\t\t//new AdminerEnumOption,\n\t\t\t//new AdminerTablesFilter,\n\t\t\t//new AdminerEditForeign,\n\t\t);\n\n\t\treturn new AdminerPlugin($plugins);\n\t}", "public function newCObj() {}", "private function PREPARE_OBJECT_VARIABLE_METHOD()\r\r {\r\r if($this->_type === 'POST')\r\r {\r\r foreach($this->_fields as $key=>$field)\r\r {\r\r $this->_object[$key]['VALUE'] = isset($_POST[$key])?$_POST[$key]:false;\r\r } \r\r } \r\r else if($this->_type === 'GET')\r\r {\r\r foreach($this->_fields as $key=>$field)\r\r {\r\r $this->_object[$key]['VALUE'] = isset($_GET[$key])?$_GET[$key]:false;\r\r } \r\r } \r\r }", "public function toStdClass() {\n $stdClass = new stdClass();\n $stdClass->amountInsuranceBase = $this->_amountInsuranceBase;\n $stdClass->fragile = $this->_fragile;\n $stdClass->parcelsCount = $this->_parcelsCount;\n $stdClass->serviceTypeId = $this->_serviceTypeId;\n return $stdClass;\n }", "public function toStdClass() {\n $stdClass = new stdClass();\n $stdClass->billOfLading = $this->_billOfLading;\n $stdClass->secondaryPickingType = $this->_secondaryPickingType;\n return $stdClass;\n }", "abstract public function prepare_new_object(array $args);", "protected function getRealScriptUserObj() {}", "public function export(bool $private = FALSE, bool $meta = FALSE) {\n\t\t$keys = [];\n\t\t$ret = [];\n\n\t\tif ($private) {\n\t\t\t$keys = static::$PRIVATE;\n\t\t} else {\n\t\t\t$keys = static::$PUBLIC;\n\t\t}\n\n\t\tif (!empty(array_intersect(EXP_RESERVED, $keys))) {\n\t\t\tthrow new ExportableException(\n\t\t\t\t\"Reserved key '\".EXP_CLASSNAME.\"' used in object.\"\n\t\t\t);\n\t\t}\n\n\t\tif ($meta) { // Add metadata.\n\t\t\t$ret[EXP_CLASSNAME] = get_class($this);\n\t\t\t$ret[EXP_VISIBILITY] = $private ? 'private' : 'public';\n\t\t}\n\n\t\tforeach ($keys as $k) {\n\t\t\t$current = $this->__exportable_get($k);\n\t\t\tswitch (gettype($current)) {\n\t\t\t\tcase 'object':\n\t\t\t\t\t$ret[$k] = $this->exp_obj(\n\t\t\t\t\t\t$current, $private, $meta\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'array':\n\t\t\t\t\t$ret[$k] = $this->exp_array(\n\t\t\t\t\t\t$current, $private, $meta\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$ret[$k] = $current;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "public static function & GetInstance ();", "public function getInstance(): mixed;", "function FetchObj() {}", "public function convertToUserIntObject() {}" ]
[ "0.69518965", "0.69238687", "0.6576305", "0.6377388", "0.61449313", "0.612386", "0.605619", "0.603932", "0.5922824", "0.5922824", "0.5922824", "0.5922824", "0.5922824", "0.5858493", "0.5837445", "0.5812435", "0.58014935", "0.5717796", "0.5717159", "0.57131624", "0.56894493", "0.5659907", "0.56409484", "0.560289", "0.55259603", "0.5511823", "0.5463007", "0.54079515", "0.54079515", "0.54033786", "0.53755105", "0.537236", "0.5370302", "0.5369978", "0.5369978", "0.53424156", "0.53363764", "0.53168505", "0.53091586", "0.52977777", "0.52637947", "0.526023", "0.5249753", "0.5244506", "0.52263796", "0.5188112", "0.5179555", "0.5151734", "0.51428384", "0.51342356", "0.5133213", "0.5119134", "0.5119134", "0.5117958", "0.51118255", "0.5107466", "0.509854", "0.5095085", "0.5095085", "0.5080754", "0.50398445", "0.5039339", "0.50327605", "0.50084496", "0.5006148", "0.500282", "0.49982625", "0.49869022", "0.49865714", "0.49806365", "0.49757415", "0.49682385", "0.49576867", "0.49568933", "0.49519968", "0.49511203", "0.49428654", "0.4927631", "0.4927631", "0.49186814", "0.49164265", "0.49162412", "0.4909082", "0.49073347", "0.48970512", "0.4894222", "0.48897117", "0.48835006", "0.4882149", "0.48775685", "0.4875726", "0.48655868", "0.4862331", "0.48620975", "0.48482472", "0.4847966", "0.48414114", "0.4838564", "0.4838225", "0.48361126", "0.48360476" ]
0.0
-1
Method returning the class name
public function __toString() { return __CLASS__; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClassName();", "public function getClassName();", "public function getClassName() ;", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName()\n {\n return __CLASS__;;\n }", "private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}", "public function getClassName() {\r\n\t\treturn($this->class_name);\r\n\t}", "public static function get_class_name() {\r\n\t\treturn __CLASS__;\r\n\t}", "public function getClassName() { return __CLASS__; }", "public static function getClassName() {\n\t\treturn get_called_class();\n\t}", "public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }", "public static function getClassName()\n\t{\n\t\treturn get_called_class();\n\t}", "public static function getClassName()\n {\n return get_called_class();\n }", "public function getClassName()\n {\n return $this->class;\n }", "public function getClassName()\n {\n return $this->class;\n }", "public static function className() : string {\n return get_called_class();\n }", "public function getName()\n {\n return __CLASS__;\n }", "public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}", "public function getClassName()\n {\n return $this->class_name;\n }", "public function class_name() {\n\t\treturn strtolower(get_class($this));\n\t}", "public function getName(): string\n {\n return __CLASS__;\n }", "public static function getClassName() {\n return get_called_class();\n }", "public function getClassname(){\n\t\treturn $this->classname;\n\t}", "public function getClassname()\n\t{\n\t\treturn $this->classname;\n\t}", "public function getClassName()\n {\n return $this->_sClass;\n }", "public function get_just_class_name() {\n\n\t\t$full_path = $this->get_called_class();\n\n\t\treturn substr( strrchr( $full_path, '\\\\' ), 1 );\n\n\t}", "protected function getClassName(): string\n {\n return $this->className;\n }", "public static function getClassName() {\n return self::$className;\n }", "public function getClassName(): string;", "public function getClassName() : string;", "public function getName() {\r\n $parsed = Parser::parseClassName(get_class());\r\n return $parsed['className'];\r\n }", "public function getClassName() : string\n {\n return $this->className;\n }", "public function getClassName()\n {\n $fullClass = get_called_class();\n $exploded = explode('\\\\', $fullClass);\n\n return end($exploded);\n }", "public static function getClassName()\n {\n $classNameArray = explode('\\\\', get_called_class());\n\n return array_pop($classNameArray);\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName(): string\n {\n return $this->className;\n }", "public function getClassName() {\t\t\n\t\treturn MemberHelper::getClassName($this->classNumber);\n\t}", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}", "public function getClassName() : string\n {\n\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public function getClassName()\n {\n return $this->className;\n }", "public static function staticGetClassName()\n {\n return __CLASS__;\n }", "public function getClassName() {\n return $this->className;\n }", "public function getClassName() {\n\t\treturn $this->className;\n\t}", "public function getClassName(): string\n {\n return $this->makeClassFromFilename($this->filename);\n }", "public function getClassName() {\n\t\treturn $this->_className;\n\t}", "public function getClassName() {\n return $this->className;\n }", "public function getClassName() {\n return $this->className;\n }", "public function getClassName ()\n {\n $className = explode('\\\\', get_class($this));\n\n return array_pop($className);\n }", "function getClassName()\n {\n // TODO: Implement getClassName() method.\n }", "public static function getClassName(){\n $parts = explode('\\\\', static::class);\n return end($parts);\n }", "function getClassName(){\n echo __CLASS__ . \"<br><br>\"; \n }", "public function name()\n {\n $name = get_class($this);\n\n return substr($name, strrpos($name, '\\\\') + 1);\n }", "public function class()\n {\n // @codingStandardsIgnoreLine\n return $this->class ?? \"\";\n }", "public function getClass()\n {\n return $this->_className;\n }", "private function getClassName() {\n return (new \\ReflectionClass(static::class))->getShortName();\n }", "public function getName() {\n\t\t\n\t\t// cut last part of class name\n\t\treturn substr( get_class( $this ), 0, -11 );\n\t\t\n\t}", "public function getClassNm()\r\n {\r\n\t\t$tabInfo = $this->getPathInfo();\r\n\t\treturn $tabInfo[1];\r\n }", "public function className()\n {\n $full_path = explode('\\\\', get_called_class());\n return end($full_path);\n }", "private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }", "public function getClass(): string\n {\n return $this->class;\n }", "public static function getFullyQualifiedClassName() {\n $reflector = new \\ReflectionClass(get_called_class());\n return $reflector->getName();\n }", "public function getClassName()\n\t{\n\t\tif (null === $this->_className) {\n\t\t\t$this->setClassName(get_class($this));\n\t\t}\n\t\t\n\t\treturn $this->_className;\n\t}", "public function getClassName() : string {\n if ($this->getType() != Router::CLOSURE_ROUTE) {\n $path = $this->getRouteTo();\n $pathExplode = explode(DS, $path);\n\n if (count($pathExplode) >= 1) {\n $fileNameExplode = explode('.', $pathExplode[count($pathExplode) - 1]);\n\n if (count($fileNameExplode) == 2 && $fileNameExplode[1] == 'php') {\n return $fileNameExplode[0];\n }\n }\n }\n\n return '';\n }", "public function getName(){\n\t\treturn get_class($this);\n\t}", "public function getClassName() {\r\n return $this->myCRUD()->getClassName();\r\n }", "public static function className()\n\t{\n\t\treturn static::class;\n\t}", "public function toClassName(): string\n {\n return ClassName::full($this->name);\n }", "public function getName()\n {\n return static::CLASS;\n }", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "public function getClass(): string;", "function getName()\n {\n return get_class($this);\n }", "public function className(): string\n {\n return $this->taskClass->name();\n }", "public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }", "function getName()\r\n\t{\r\n\t\treturn get_class($this);\r\n\t}", "public function getName() {\n return get_class($this);\n }", "public function getName() {\n return get_class($this);\n }", "public function toString()\n {\n return __CLASS__;\n }", "public function getName()\n\t{\n\t\treturn $this->name ?: class_basename($this);\n\t}", "public function getNamespacedName()\n {\n return get_class();\n }", "protected function name() {\n\t\treturn strtolower(str_replace('\\\\', '_', get_class($this)));\n\t}", "protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }", "function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}", "public function getClassName(): ?string {\n\t\treturn Hash::get($this->_config, 'className');\n\t}", "public function __toString() {\n\t\treturn $this->className();\n\t}", "public static function name()\n {\n return lcfirst(self::getClassShortName());\n }" ]
[ "0.87522393", "0.87522393", "0.8751158", "0.87397957", "0.87397957", "0.87397957", "0.87397957", "0.8731564", "0.8696754", "0.8673495", "0.8638432", "0.8615335", "0.8603119", "0.8566906", "0.8562364", "0.8555002", "0.85503733", "0.85503733", "0.85425884", "0.8533183", "0.8529981", "0.85237026", "0.8502733", "0.8493115", "0.8491238", "0.8488943", "0.8484194", "0.847459", "0.8441478", "0.8418852", "0.8399611", "0.83950585", "0.83949184", "0.83853173", "0.8378261", "0.837777", "0.8372544", "0.8355432", "0.8355432", "0.83479965", "0.8325877", "0.8325877", "0.8312873", "0.83027107", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.8272631", "0.82474744", "0.8242934", "0.8202995", "0.8185409", "0.8184752", "0.81829107", "0.81829107", "0.8176191", "0.81761754", "0.8162896", "0.8142928", "0.81323636", "0.8062757", "0.80528253", "0.8045769", "0.8033823", "0.8026215", "0.8001116", "0.79949147", "0.79779136", "0.79672754", "0.7957633", "0.790449", "0.78617185", "0.7860126", "0.7847096", "0.78195953", "0.7817044", "0.780094", "0.780094", "0.780094", "0.780094", "0.780094", "0.780094", "0.77821547", "0.7761565", "0.77588034", "0.7747239", "0.77409905", "0.77409905", "0.7710985", "0.76808393", "0.7670475", "0.76640886", "0.76514393", "0.76499707", "0.76323646", "0.76005036", "0.75937456" ]
0.0
-1
$this>log>Write('ERROR: ' . $error);
protected function sendForbidden($error) { ob_start(); echo 'WMI_RESULT=RETRY&WMI_DESCRIPTION=' . urlencode($error); ob_end_flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logError() {}", "public function printErrorLog() {}", "function logError(){\r\n\r\n\t\t$message = $_SERVER[\"REQUEST_URI\"].\"\\n\";\r\n\t\t$message .= $this->number;\r\n\r\n\t\tif($this->title)\r\n\t\t\t$message.=\": \".$this->title;\r\n\r\n\t\tif($this->details)\r\n\t\t\t$message.=\"\\n\\n\".$this->details;\r\n\r\n\t\t$log = new phpbmsLog($message,\"ERROR\");\r\n\r\n\t}", "function error_log($msg)\n{\n echo \"ERR: $msg\";\n}", "function _error_log($message)\n{\n error_log(\"VM: \" . $message);\n}", "function log_error( $msg ){\n self::system_log( $msg, 'ERROR' );\n }", "public function testWrite()\n\t{\n\t\tCatapult\\Log::write(time(), \"ERROR_CODE\", \"TEST\");\n\t}", "function logError($message) {\n\tlogMessage(\" ERROR\", $message);\n}", "function log(Error $error)\n {\n Logger::log($error);\n }", "function ERROR_LOGGER($f) {error_log($f); }", "function error_log($msg, $code)\n{\n // this will be called from abc\\Logger::error\n // instead of the native error_log() function\n echo \"ERR: $msg\";\n}", "public function error() {\n // The tests cover errors, so there will be plenty to sift through\n // $msg = func_get_arg(0);\n // $err = 'API ERROR: ' . $msg . PHP_EOL;\n\n // $objs = func_get_args();\n // array_splice($objs, 0, 1);\n\n // ob_start();\n // foreach($objs as $obj) {\n // var_dump($obj);\n // }\n // $strings = ob_get_clean();\n\n // file_put_contents('tests.log', [$err, $strings], FILE_APPEND);\n }", "function agate_log($contents)\n{\n error_log($contents);\n}", "function errlog($msg) {\n file_put_contents('php://stderr', $msg );\n }", "function writeErrorLog($message)\n{\n //<editor-fold desc=\"private attributes\"> //add region in phpstorm -> https://blog.jetbrains.com/phpstorm/2012/03/new-in-4-0-custom-code-folding-regions/\n $logName = \"/log/error.log\";//define log file name\n $fileFullPath = setFullPath($logName);//define the full path until the log file\n // $logHeader = \"TimeStamp\\t\\t\\t\\tMessage\";//set the header of the future log file\n //</editor-fold>\n\n //create file and set header\n $fullMsg = prepareMsgToWrite($message);\n writeMsgInFile($fileFullPath, $fullMsg);\n}", "public function error()\n {\n $this->appendLog(\n 'error',\n \\func_get_args(),\n $this->internal->getErrorCaller()\n );\n }", "public function error($error) {\n // que vai fazer alguma coisa (mandar um email,\n // gravar log, etc )\n $this->log($error);\n }", "function _error_log( $data ) {\n\t\tIMFORZA_Utils::error_log( $data );\n\t}", "public function toLog($error){\n \n $myfile = fopen(\"./lib/helper/error.log\", \"w\") or die(\"Unable to open file!\");\n fwrite($myfile, $error);\n fclose($myfile);\n \n }", "function byeLog($error=null, $log=null){\n $logFile = (strlen($log)) ? $log : ERRORLOG;\n $errorLine = '[' . gmdate(\"Y-m-d H:i:s\") . ' UTC] - '. $error . \"\\n\";\n if(strlen($logFile))\n file_put_contents($logFile, $errorLine, FILE_APPEND);\n print $errorLine;\n // Try to remove the lockfile, so we can continue running next time\n removeLockFile();\n exit;\n}", "function error(){}", "public function error($string)\n {\n $this->output->writeln(\"<error>$string</error>\");\n }", "private function _logError()\n {\n if(!$this->_error) return;\n\n $error_file = APPLICATION_DATA . '/logs/log_apps.log';\n // set content of error file\n $content = 'Date: ' . date('Y-m-d H:i:s') . PHP_EOL;\n $content .= 'Message: ' . $this->_error->exception->getMessage() . PHP_EOL;\n $content .= 'File: ' . $this->_error->exception->getFile() . PHP_EOL;\n $content .= 'Line: ' . $this->_error->exception->getLine() . PHP_EOL;\n $content .= 'Request Uri: ' . $this->_error->request->getRequestUri() . PHP_EOL;\n $content .= 'Request Method: ' . $this->_error->request->getMethod() . PHP_EOL;\n $content .= 'Request Params: ' . json_encode($this->_error->request->getParams()) . PHP_EOL;\n $content .= 'Id User: ' . Base_Auth::getUser('id_user') . PHP_EOL;\n $content .= '-----------------------------------' . PHP_EOL;\n\n // write content to file\n if(file_exists($error_file)){\n $content.= file_get_contents($error_file, false, null, null, 1024*1024); // last 1Mb of log;\n }\n\n $handle = fopen( $error_file, 'w' );\n fwrite($handle, $content);\n fclose($handle);\n }", "public function logerrorAction()\r\n {\r\n $this->_helper->viewRenderer->setNoRender();\r\n $this->_helper->layout->disableLayout();\r\n \r\n $tipo = $this->_getParam('tipo');\r\n $origen = $this->_getParam('origen');\r\n $error = $this->_getParam('error');\r\n \r\n \r\n echo $error;\r\n \r\n $log = new Application_Plugin_LogError();\r\n $log->setLog($tipo, 3, array( 'type' => \"Application error\", 'exception' => $error, 'controller'=>null, 'action'=>null, 'parametros'=>$origen, 'referer'=>((isset($_SERVER['HTTP_REFERER']))?$_SERVER['HTTP_REFERER']:NULL),'user_id'=>((isset($this->view->user->ID))?$this->view->user->ID:NULL), 'username'=>((isset($this->view->user->username))?$this->view->user->username:NULL)));\r\n \r\n }", "function error($error, $file, $line) {\n\t$this->ERRORS[] = $error;\n\tif ($this->REPORTS['print_errors'] == URL_DO_PRINT_ERRORS) {\n\t\tprintf(\"<b>%s Error:</b> %s in <b>%s:%d</b><br>\",\n\t\t\tstrToUpper(get_class($this)),\n\t\t\thtmlSpecialChars($error),\n\t\t\t$file,\n\t\t\t$line);\n\t\t}\n\t}", "function phpLog($msg) {\n //error_log($msg, 3, '/var/tmp/php.log');\n echo $msg;\n}", "function error($message) {\n die(\"{\\\"error\\\":\\\"$message\\\"}\");\n }", "function phpLog($msg) {\n //error_log($msg, 3, '/var/tmp/php.log');\n}", "function log_err($msg, $condition=true, $mode='ERROR')\r\n{\r\n log_msg($msg, $condition, $mode);\r\n}", "function writerErrLog($errText){\n// err::writerErrLogToDatabase($errText);\n\n}", "public function log()\r\n {\r\n echo $this->message.PHP_EOL;\r\n }", "public function err($message)\r\n {\r\n $this->log($message, SF_LOG_ERR);\r\n }", "public function printError() {\n\t\t\tfwrite(STDERR, $this->message);\n\t\t}", "function log($msg)\n{\n $stderr = fopen('php://stderr', 'w');\n fwrite($stderr, $msg);\n fclose($stderr);\n}", "public function error($msg) {\n $this->writeLine($msg, 'error');\n }", "public function error_message($error)\n {\n die($error);\n }", "public function error()\n\t{\n\t}", "private function Log($msg) {\n// error_log( '[LOG] '.$msg);\n\t}", "private function log($message) {\n //echo $message . \"\\n\";\n }", "public function error(){\n\t}", "public function err($message)\n {\n $this->log($message, self::ERR);\n }", "function error($error, $file, $line)\n\t{\n\t\tdie(\"{$error} in file: {$file} on line {$line}\");\n\t}", "public function error();", "public function error($msg){\n\t\tif($this->debugLevel >= self::LOG_ERROR){\n\t\t\t$this->_log($msg, self::LOG_ERROR);\n\t\t}\n\t}", "function humcore_write_error_log( $error_type = '', $info = null ) {\n\n\tini_set( 'log_errors_max_len', '0' );\n\tif ( empty( $info ) ) {\n\t\terror_log( '[' . date( 'd-M-Y H:i:s T' ) . ']****************** ' . $error_type . '.' . \"\\n\\r\", 3, CORE_ERROR_LOG );\n\t} else {\n\t\terror_log( '[' . date( 'd-M-Y H:i:s T' ) . ']****************** ' . $error_type . ': ' . var_export( $info, true ) . \"\\n\\r\", 3, CORE_ERROR_LOG );\n\t}\n\n}", "private function error($msg)\n {\n\t\t$this->error = true;\n\t\t$this->error_message .= $msg;\n }", "function error(Throwable $error);", "public function error( $message )\n {\n $file = 'error-'.date('Ymd').'.log';\n $this->write( $file, $message );\n }", "public static function error($value)\n {\n self::$logs .= '[' . date('Y-m-d H:i:s', time()) . '] Error ' . $value . \"\\n\";\n }", "function ferror_log($error){\r\n if (DEBUG == 1) {\r\n error_log($error);\r\n }\r\n}", "function lerror_log($message)\n\t{\n\t\treturn lfile_append(\"data/error_log.txt\", date('j.n.y. - G:i') . \" * \" . $message . \"\\r\\n\");\n\t}", "function error($message);", "function logError($msg, $errorD){\n\t\terror_log(print_r($msg . \"\\n\", TRUE), 3, $errorD);\n\t}", "function logError($msg, $errorD){\n\terror_log(print_r($msg . \"\\n\", TRUE), 3, $errorD);\n}", "function pushError( $error );", "public function setLogError( $message ) {\n WC_Midtrans_Logger::log( $message, 'midtrans-error', $this->id, current_time( 'timestamp' ) );\n }", "function dokan_log( $message ) {\n $message = sprintf( \"[%s] %s\\n\", date( 'd.m.Y h:i:s' ), $message );\n error_log( $message, 3, DOKAN_DIR . '/debug.log' );\n}", "function error($error, $location, $seconds = 5) {\r\n echo $error;\r\n exit;\r\n }", "function WriteLog($s) {\r\n}", "public function log($msg)\n {\n }", "public function setError($error) {\n \t$dbg = debug_backtrace();\n $caller = next($dbg);\n \t$this->error = sprintf('[%s::%s - %s] %s', basename($caller['file']), $caller['function'], $caller['line'], $error);\n }", "private function saveToLog()\n {\n // Get the error string\n $errorString = $this->getErrorString(false);\n $errorString .= '------------------------------------------' . PHP_EOL; // log seperator\n\n // Save the error to the log\n error_log($errorString, 3, $this->errorLogPath);\n }", "function log()\n {\n }", "function ws_error_log ($ex) {\n\tglobal $CFG;\n\tif (is_object($ex)){\n\t\t$info=$ex->getMessage() . '\\n' . $ex->getTraceAsString();\n\t}else $info=$ex;\n\terror_log ($info,3,$CFG->dataroot.'/wspp_db_errors.log' );\n}", "protected function error($msg) {\n error_log($msg);\n }", "function error($output)\n{\n output(\"<error>$output</error>\");\n}", "public function error($message) {\n\t\t\t$this->log('error', $message);\n\t\t}", "function logError($msg){\n $txt = $msg . \" at \" . date('l jS \\of F Y h:i:s A') . \"\\n ------------------------------------- \\n\";\n $myfile = file_put_contents('errorlogs.txt', $txt.PHP_EOL , FILE_APPEND | LOCK_EX);\n }", "function writeLog($string){\n}", "abstract public function log( $message );", "public function error($message)\n {\n if ($this->_logLevel>=1) {\n self::log($message, Zend_Log::ERR);\n }\n }", "public function log($message) {\n }", "public function log($message) {\n }", "public function log($message) {\n }", "function handleError($message) {\r\n var_dump($message);\r\n}", "public function error($message): void\n {\n $this->log(__FUNCTION__, $message);\n }", "public static function error($message)\n\t{\n\t\tstatic::write('Error', $message);\n\t}", "function fDbgContab($pMsj){\n error_log($pMsj . \" \\n\", 3,\"/tmp/dimm_log.err\");\n //echo $pMsj . \" <br>\";\n}", "function bake_error($string) {\n global $error;\n $error = TRUE;\n fwrite(STDERR, \"\\n\\033[31m ERROR: \" . $string . \"\\033[37m\" . \"\\n\");\n}", "private static function log($message)\n\t{\n\t}", "abstract public function error();", "function logError($filename, $mssg){\n\n\t// Path for all the log files\n\t$filepath = '../logs/';\n\n\t$time = new DateTime(null, new DateTimeZone('America/Chicago')); //Central\n\t$time = $time->format('Y-m-d H:i:s'); // MySQL datetime format\n\n\t$input = $time . \" [ERROR] : \" . $mssg . \"\\n\";\n\t$htmlInput = \"<p class=\\\"error\\\"><b>\" . $time . \"<font color=\\\"red\\\"> [ERROR]</font></b><br>\" . $mssg . \"</p>\";\n\n\t$fileArray = explode('.', $filename);\n\tif(strtolower(array_pop($fileArray)) == \"html\"){\n\n\t\t$htmlInput = \"<p class=\\\"error\\\"><b>\" . $time . \"<font color=\\\"red\\\"> [ERROR]</font></b><br>\" . $mssg . \"</p>\";\n\t\t\n\t\t// append in html file\n\t\tfile_put_contents($filepath . $filename, $htmlInput, FILE_APPEND);\n\t}\n\telse{\n\t\t// append in text file\n\t\tfile_put_contents($filepath . $filename, $input, FILE_APPEND);\n\t}\n}", "public function logError($message)\n\t{\n\t\t$this->log($message, self::ERROR);\n\t}", "protected function error($msg) {\n \t parent::error($msg); //log in error msg\n throw new Exception ($msg); // <-- TESTS php4\n }", "protected function log() {\n }", "function mlog($message) {\n\tprint $message;\n}", "function display(Error $error)\n {\n Logger::console($error,0);\n }", "function customError($errno, $errstr)\n {\n echo \"<b>Error:</b> [$errno] $errstr\";\n }", "function customError($errno, $errstr)\n {\n echo \"<b>Error:</b> [$errno] $errstr\";\n }", "public function test_log_error_to_file_prints_error()\n {\n $this->expectOutputRegex('/Xdebug: Foo(.)*/');\n $this->logger->log_error('Foo', '/dev/null');\n }", "protected function error($error)\n {\n //header($_SERVER['SERVER_PROTOCOL'] . ' 501 Internal Server Error');\n\n // Build and return the output\n $this->error = true;\n $this->result->setAttribute('type', 'error');\n $this->result->appendChild($this->dom->createElement('message', $error));\n $this->buildOutput();\n }", "function logErrors() {\n\t\t\n\t\t// ignore call if verbosity maximum.\n\t\tif($this->_verbosity < 2)\n\t\t\treturn;\n\t\t\t\n\t\t// error handling\n\t\terror_reporting(E_ALL);\n\t\tini_set('display_errors',0);\n\t\tini_set('log_errors',1);\n\t\tini_set('log_errors_max_len',0);\n\t\tini_set('html_errors',0);\n\t\t\n\t\t// set log file\n\t\tini_set('error_log',$this->_workDir . '/ERROR_LOG');\n\t}", "function error ($message, $class = NULL, $function = NULL, $file = NULL,\n $line = NULL)\n {\n\n $message =& new Message(array('m' => $message,\n 'c' => $class,\n 'F' => $function,\n 'f' => $file,\n 'l' => $line,\n 'N' => 'ERROR',\n 'p' => LEVEL_ERROR));\n\n $this->log($message);\n\n }", "public function error($string)\r\n {\r\n $this->getLogger()->log($string, self::ERROR);\r\n }", "function add_error(&$log, $message){\n if(!is_array($log)) return;\n\n $log[] = array(\n \"type\" => \"error\",\n \"message\" => $message\n );\n}", "function handle_error($errno, $error){\r\n $res = new Result('array');\r\n $res->error_number = $errno;\r\n $res->error_desc = $error;\r\n $res->print_result();\r\n Logger::close();\r\n die;\r\n}", "function die_log($a) {\n error_log($a);\n echo $a;\n exit;\n}", "function error($msg) { WP_CLI::error(\"$this: $msg\"); }", "function my_error($msg) {\n\theader('HTTP/1.1 500 Internal Server Error');\n\ttrigger_error($msg,E_USER_ERROR);\n}", "public function error($message) {}", "protected function debug() { \n if ($this->SHOW_ERRORS) { \n echo $this->ERROR_MSG; \n } \n if ($this->LOGGING) { \n if ($this->FILE_HANDLER) { \n fwrite($this->FILE_HANDLER,$this->ERROR_MSG); \n } else { \n return false; \n } \n } \n }" ]
[ "0.7566217", "0.7548933", "0.72393644", "0.7191248", "0.71369463", "0.69901067", "0.69210905", "0.68309426", "0.68067515", "0.68055105", "0.67998683", "0.6762971", "0.6715641", "0.66837424", "0.6673338", "0.6667579", "0.66189176", "0.661612", "0.653721", "0.65023154", "0.64326537", "0.641933", "0.6409171", "0.6407352", "0.6402548", "0.64017665", "0.63926077", "0.63909197", "0.6383946", "0.6382196", "0.63782865", "0.6370157", "0.635716", "0.63563555", "0.634569", "0.63275325", "0.63268137", "0.63235116", "0.63203394", "0.63192916", "0.6310647", "0.63075465", "0.630038", "0.6274288", "0.62741524", "0.62583643", "0.6245129", "0.62446606", "0.62313735", "0.6231018", "0.6226853", "0.62257504", "0.6223681", "0.6217981", "0.6214916", "0.6205851", "0.6205673", "0.6205432", "0.619977", "0.61971563", "0.61899847", "0.6181536", "0.6181441", "0.61745185", "0.6169945", "0.61686844", "0.61682945", "0.61623716", "0.61591345", "0.61541265", "0.61519283", "0.6143874", "0.6143874", "0.6143874", "0.614084", "0.6133675", "0.6132489", "0.6117677", "0.61127424", "0.61109203", "0.60962224", "0.6087732", "0.6075414", "0.60727113", "0.607241", "0.60693085", "0.6068622", "0.60675806", "0.60675806", "0.60672545", "0.60635847", "0.6062372", "0.60533005", "0.60513425", "0.6042825", "0.6041187", "0.60378623", "0.6036733", "0.60253876", "0.60235614", "0.6020767" ]
0.0
-1
constructor de la clase
public function Departamento() { $this->cn = new datos(); $this->log = new Log(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "function __construct (){\n\t\t}", "public function __construct (){}", "function __construct(){}", "function __construct(){}", "function __construct(){}", "function __constructor(){}", "private function __construct()\t{}", "private function __construct() {\r\n\t\r\n\t}", "private function __construct()\r\n\t{\r\n\t\r\n\t}", "final private function __construct() {\n\t\t\t}", "public function __construct() { \n\t\t\n\n\t\t}", "final private function __construct(){\r\r\n\t}", "function __construct() ;", "private function __construct() {\n\t\t}", "public function __construct()\r\n\t\t{\r\n\t\t}", "private function __construct(){\n\t\t }", "public function __construct()\n\t\t{\n\t\t\t\n\t\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t// ben duoi nay se la cac logic cua __construct lop con ma chung ta can dinh nghia - xu ly\n\t}", "function __construct(){\n\n\t\t}", "private function __construct(){\n \t\n }", "public function __construct() {\n\n\t\t}", "function _construct() {\n \t\n\t\t\n\t}", "public function __construct()\n\t\t{\n\t\t\t//\n\t\t}", "function __construct() {\n\n\t\t}", "private function __construct()\r\n\t{\r\n\t}", "function __construct()\r\n\t\t{\r\n\t\t\t\r\n\t\t}", "private function __construct() { \n\t\t\n\n\t}", "function __construct(){\n\t\t// nowt much...\n\t}", "function __construct() {\n\t\t\t\n\t\t}", "function _construct(){ }", "private function __construct()\r\r\n\t{\r\r\n\t}", "public function _construct()\n\t{\n\n\t}", "final private function __construct()\n\t{\n\t}", "private function __construct() {\r\n\t\t\r\n\t}", "private function __construct()\n\t{\n\n\t}", "function __construct(){\n\t\t}", "private function __construct () {}", "public function __construct()\n\t{}", "private function __construct()\n\t{\n\t\t\n\t}", "function __construct() { }", "function __construct() { }", "function __construct() { }", "private function __construct( )\n {\n\t}", "function __construct()\r\n\t{\r\n\t}", "private function __construct () \n\t{\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "private function __construct() {\r\n\t}", "private function __construct() {\r\n\t}", "public function __construct()\n\t{\n\t\n\t}", "public function __construct()\n\t{\n\t\n\t}", "private function __construct(){\n\t\n\t}", "function __construct(){\r\n\t\t}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "function __construct() {}", "public function __construct() {\r\n\r\n\t\t}", "final private function __construct()\n {\n }", "private function __construct(){ }", "private function __construct(){ }", "protected abstract function __construct();", "public function __construct() {\r\n\t\t//\r\n\t}", "public function __init(){}", "function __construct()\n\t{\n\n\t}", "public function __construct()\n\t\t{\n\t\t\t# code...\n\t\t}", "public function __construct()\r\n\t{\r\n\t}", "public function __construct()\r\n\t{\r\n\t}", "public function __construct()\r\n\t{\r\n\t}", "public function __construct()\r\n\t{\r\n\t}", "public function __construct()\r\n\t{\r\n\t}", "private function __construct()\r\n {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}" ]
[ "0.8488861", "0.8488861", "0.8488861", "0.8488861", "0.8488861", "0.8488861", "0.8488861", "0.8488861", "0.8488861", "0.8488861", "0.8488861", "0.8488861", "0.8488861", "0.8488861", "0.8488861", "0.8488861", "0.8488861", "0.8399919", "0.8239143", "0.82376015", "0.82376015", "0.82376015", "0.82309365", "0.8222068", "0.8202635", "0.8195607", "0.8184027", "0.8181706", "0.8180682", "0.81733924", "0.8168716", "0.81623566", "0.81615734", "0.8154268", "0.81500703", "0.81490326", "0.81473714", "0.8145313", "0.81435436", "0.81417817", "0.81414914", "0.81381154", "0.8136923", "0.81321514", "0.8126818", "0.812378", "0.8122845", "0.81210715", "0.8115477", "0.81143236", "0.81037116", "0.81014377", "0.8092261", "0.8088381", "0.8088065", "0.80829185", "0.8075221", "0.8075221", "0.8075221", "0.8072187", "0.8070184", "0.80693793", "0.8069142", "0.8069142", "0.8069142", "0.8069142", "0.8069142", "0.80676067", "0.80676067", "0.8066519", "0.8066519", "0.80664665", "0.80664295", "0.8066091", "0.8066091", "0.8066091", "0.8066091", "0.8066091", "0.8066091", "0.80635303", "0.80607957", "0.80486673", "0.80486673", "0.80470145", "0.8046792", "0.8046375", "0.8044724", "0.80432737", "0.8041476", "0.8041476", "0.8041476", "0.8041476", "0.8041476", "0.8032859", "0.8031239", "0.8031239", "0.8031239", "0.8031239", "0.8031239", "0.8031239", "0.8031239" ]
0.0
-1
INICIO / geter y seter de la clase los cuales permiten un acceso seguro y un encapsulamiento rijido a cada uno de los atributos de la clase
public function getIdDepartamento() { return $this->IdDepartamento; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GestorReglasNegocios() {\n $this->gestorAccesoDatos = new GestorAccesoDatos();\n }", "public function seminarioClase( ) {\n\n\n AccesoGui::$guiSistema->esperarInicioSistema();\n\n AccesoControladoresDispositivos::$ctrlLuz->setLucesEscenarios(LuzTecho::$ESCENARIO_SEMINARIO_CLASE);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n AccesoControladoresDispositivos::$ctrlAutomata->encenderLuzSala(Automata::$intensidades[\"maxima\"]);\n usleep(500000);\n ConexionServidorCliente::$ctrlGuiPantallas->subirPantallaElectrica();\n AccesoControladoresDispositivos::$ctrlFoco->apagar();\n ConexionServidorCliente::$ctrlGuiPlasmas->encender();\n\t//Comentado mientras se repara el visor de opacos.\n //ConexionServidorCliente::$ctrlGuiCamaraDocumentos->camaraDocumentosApagar();\n ConexionServidorCliente::$ctrlGuiProyectores->apagarPizarra();\n ConexionServidorCliente::$ctrlGuiProyectores->apagarCentral();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\n\tAccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n ConexionServidorCliente::$ctrlGuiPantallas->pipEnPantallaPresi();\n AccesoGui::$guiEscenarios->escenarioSeminario();\n AccesoGui::$guiMenus->menuPrincipal(true);\n AccesoGui::$guiSistema->mostrarMenu();\n AccesoGui::$guiEscenarios->enviarEstadoVideoconferencia();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n }", "function habilitarContrato(){\n $this->procedimiento = 'adq.f_cotizacion_ime';\n $this->transaccion = 'ADQ_HABCONT_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function FotografiaControl(){\n\t\t$this->acceso=new AccesoDatos();\n\t}", "public function __construct(){\n$this->acId = \"\";\n$this->acNombre = \"\";\n$this->acId_estado = \"\";\n}", "function cl_escolabase() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"escolabase\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"].\"?ed77_i_escola=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_escola\"].\"&ed18_c_nome=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed18_c_nome\"].\"&ed31_c_descr=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed31_c_descr\"].\"&ed77_i_base=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_base\"]);\n }", "function cl_reconhecimentocontabil() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"reconhecimentocontabil\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "private function iniciar_indice_empresas(){\n\t\t//==========necesarios para empresa================\n\t\trequire_once 'inc/clases/public/empresa.class.php';\t\t\t//pagina de empresa (y empresas)\n\t\trequire_once 'inc/clases/config/builder_config.class.php';\t//clase builder(reservas)\n\t\trequire_once 'inc/clases/public/salida_anuncios.class.php';\n\n\t\t$this->Empresa = new Empresa();\n\t\t$this->Modulos = new Salida_anuncios();\n\t\t// if(is_null($this->Empresa->user)){\n\t\t// \t//es null, devolvera inmobiliarias\n\t\t// }else if($this->Empresa->user == false){\n\t\t// \t$this->forzar_404();\n\t\t// }else{\n\t\t// \t//es bien\n\t\t// \t$this->empresa = $this->Empresa->salida;\n\t\t// }\n\t}", "private function appConsolaOpciones() {\r\n\t\t\tdefine('ENV_ENTORNO', $this->entorno);\r\n\t\t\tdefine('ENV_TIPO', 'MVC');\r\n\t\t\tdate_default_timezone_set(ConfigAcceso::leer($this->aplicacion, 'sistema', 'tiempo', 'zona'));\r\n\t\t\t\r\n\t\t\trequire implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Configuracion', 'Parametros.php'));\r\n\t\t\t\r\n\t\t\t$consola = new \\AutoCargador('Consola', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));\r\n\t\t\t$consola->registrar();\r\n\t\t\t\r\n\t\t\t$entidades = new \\AutoCargador('Entidades', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos', 'ORM')));\r\n\t\t \t$entidades->registrar();\r\n\t\t \t\r\n\t\t \t$formulario = new \\AutoCargador('Formularios', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));\r\n\t\t \t$formulario->registrar();\r\n\t\t \t\r\n\t\t \t\r\n\t\t\t$interface = new \\AutoCargador('Interfaces', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));\r\n\t\t \t$interface->registrar();\r\n\t\t \t\r\n\t\t \tAutoloader::register(implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos', 'ORM', 'Proxy')), 'Proxy');\r\n\t\t \t\r\n\t\t\t$utilidades = new \\AutoCargador('Utilidades', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));\r\n\t\t \t$utilidades->registrar();\r\n\t\t \t\r\n\t\t \t$modeloMVC = new \\AutoCargador('Modelo', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Sistema')));\r\n\t\t \t$modeloMVC->registrarModelo();\r\n\t\t \t\r\n\t\t \t$this->consolaObjeto();\r\n\t\t}", "public function testSetInterdireAccesEntete() {\n\n $obj = new Collaborateurs();\n\n $obj->setInterdireAccesEntete(true);\n $this->assertEquals(true, $obj->getInterdireAccesEntete());\n }", "function cl_avaliacaoestruturanota() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"avaliacaoestruturanota\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function usuarios_estados_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"usuarios_estados\";\n\t\t$this->campoClave=\"Id\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"Id\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Estado\",2);\n$this->agregarVariable2($v);\n\n\t}", "public function CantonAccesoDatos() {\n //Se establece la coneccion a la base de datos\n parent::ConexionAccesoDatos();\n }", "function setNuevaCuenta($origen, $subproducto, $socio,\n\t\t\t\t\t\t\t$observaciones = \"\", $credito = 1,\n\t\t\t\t\t\t\t$mancomunado1 = \"\", $mancomunado2 = \"\",\n\t\t\t\t\t\t\t$grupo = false, $fecha_de_alta = false,\n\t\t\t\t\t\t\t$tipo_de_cuenta = CAPTACION_TIPO_VISTA, $tipo_de_titulo = 99, $DiasInvertidos = false,\n\t\t\t\t\t\t\t$tasa = false, $CuentaDeInteres\t= false, $FechaVencimiento = false\n\t\t\t\t\t\t\t){\n\n\n\t\t$xT\t\t\t\t= new cTipos(0);\n\t\t$xF\t\t\t\t= new cFecha();\n\t\t$xLog\t\t\t= new cCoreLog();\n\t\t$socio\t\t\t= setNoMenorQueCero($socio);\n\t\t$ready\t\t\t= true;\n\t\t$tipo_de_cuenta\t= setNoMenorQueCero($tipo_de_cuenta);\n\t\t$tipo_de_titulo\t= setNoMenorQueCero($tipo_de_titulo);\n\t\t$credito\t\t= setNoMenorQueCero($credito);\n\t\t$grupo\t\t\t= setNoMenorQueCero($grupo);\n\t\t$DiasInvertidos\t= setNoMenorQueCero($DiasInvertidos);\n\t\t$tasa\t\t\t= setNoMenorQueCero($tasa, 4);\n\t\t$CuentaDeInteres= setNoMenorQueCero($CuentaDeInteres);\n\t\t$estado\t\t\t= 10;\n\t\t//Corrige el numero de persona\n\t\tif($socio <= DEFAULT_SOCIO AND $this->mSocioTitular > DEFAULT_SOCIO ){\n\t\t\t$xLog->add(\"WARN\\tCAMBIO Persona $socio a \" . $this->mSocioTitular . \"\\r\\n\", $xLog->DEVELOPER);\n\t\t\t$socio\t\t= $this->mSocioTitular;\n\t\t}\n\t\t$xSoc\t\t\t\t= new cSocio($socio);\n\t\tif($xSoc->init() == true){\n\t\t\t//$cuenta\t\t\t= $xSoc->getIDNuevoDocto($tipo_de_cuenta, $subproducto);\n\t\t\t$cuenta\t\t\t= $xSoc->getIDNuevoDocto(iDE_CAPTACION);\n\t\t\t$CuentaDeInteres= $xSoc->getCuentaDeCaptacionPrimaria(CAPTACION_TIPO_VISTA, CAPTACION_PRODUCTO_INTERESES);\n\t\t\tif($grupo == DEFAULT_GRUPO OR $grupo == 0){ $grupo = $xSoc->getClaveDeGrupo(); }\n\t\t} else {\n\t\t\t$xLog->add(\"ERROR\\tAl cargar la Persona $socio\\r\\n\", $xLog->DEVELOPER);\n\t\t\t$ready\t\t\t= false; //el socio existe\n\t\t}\n\t\t$xLog->add($xSoc->getMessages(), $xLog->DEVELOPER);\n\t\t//corrige la Cuenta de Intereses\n\t\t$CuentaDeInteres\t= ($CuentaDeInteres <= 0) ? DEFAULT_CUENTA_CORRIENTE : $CuentaDeInteres;\n\n\t\t$fecha_de_alta\t\t\t= $xF->getFechaISO($fecha_de_alta);\n\t\t$FechaVencimiento\t\t= $xF->getFechaISO($FechaVencimiento);\n\t\tif($tipo_de_cuenta == CAPTACION_TIPO_PLAZO){\n\t\t\t$DiasInvertidos\t\t= ($DiasInvertidos <=0 ) ? $this->mDiasInvertidos : $DiasInvertidos;\n\t\t\t$tasa\t\t\t\t= ($tasa <= 0) ? $this->mTasaInteres : $tasa;\n\t\t\t$FechaVencimiento\t= ($xF->getInt($FechaVencimiento) <= $xF->getInt($fecha_de_alta) ) ? $xF->setSumarDias($DiasInvertidos, $fecha_de_alta) : $FechaVencimiento;\n\t\t\t$estado\t\t\t\t= 20;\n\t\t\t$xLog->add(\"WARN\\tInversion Dias $DiasInvertidos Tasa $tasa Vencimiento $FechaVencimiento\\r\\n\", $xLog->DEVELOPER);\n\t\t\tif($xF->setRestarFechas($FechaVencimiento, $fecha_de_alta) != $DiasInvertidos){\n\t\t\t\t$DiasInvertidos\t= $xF->setRestarFechas($FechaVencimiento, $fecha_de_alta);\n\t\t\t\t$xLog->add(\"WARN\\tCAMBIO Inversion Dias $DiasInvertidos ($FechaVencimiento, $fecha_de_alta)\\r\\n\", $xLog->DEVELOPER);\n\t\t\t}\n\t\t} else {\n\t\t\t$xLog->add(\"WARN\\tVista $socio Producto $tipo_de_cuenta sub-producto $subproducto Origen $origen\\r\\n\", $xLog->DEVELOPER);\n\t\t}\n\t\t\n\t\t$xCta\t\t= new cCaptacion_cuentas();\n\t\t$xCta->cuenta_de_intereses($CuentaDeInteres);\n\t\t$xCta->dias_invertidos($DiasInvertidos);\n\t\t$xCta->eacp(EACP_CLAVE);\n\t\t$xCta->estatus_cuenta($estado);\n\t\t$xCta->fecha_afectacion($fecha_de_alta);\n\t\t$xCta->fecha_apertura($fecha_de_alta);\n\t\t$xCta->fecha_baja($xF->getFechaMaximaOperativa());\n\t\t$xCta->fecha_conciliada($fecha_de_alta);\n\t\t$xCta->idusuario(getUsuarioActual());\n\t\t$xCta->inversion_fecha_vcto($FechaVencimiento);\n\t\t$xCta->inversion_periodo(0);\n\t\t$xCta->minimo_mancomunantes(0);\n\t\t$xCta->nombre_mancomunado1($mancomunado1);\n\t\t$xCta->nombre_mancomunado2($mancomunado2);\n\t\t$xCta->numero_cuenta($cuenta);\n\t\t$xCta->numero_grupo($grupo);\n\t\t$xCta->numero_socio($socio);\n\t\t$xCta->numero_solicitud($credito);\n\t\t$xCta->observacion_cuenta($observaciones);\n\t\t$xCta->oficial_de_captacion(getUsuarioActual());\n\t\t$xCta->origen_cuenta($origen);\n\t\t$xCta->saldo_conciliado(0);\n\t\t$xCta->saldo_cuenta(0);\n\t\t$xCta->sucursal(getSucursal());\n\t\t$xCta->tasa_otorgada($tasa);\n\t\t$xCta->tipo_cuenta($tipo_de_cuenta);\n\t\t$xCta->tipo_titulo($tipo_de_titulo);\n\t\t$xCta->tipo_subproducto($subproducto);\n\t\t$xCta->ultimo_sdpm(0);\n\t\tif($ready == true){ \n\t\t\t$rs \t= $xCta->query()->insert()->save();\n\t\t\t$ready \t= ($rs == false) ? false : true;\n\t\t}\n\t\t//Asignar valores cargados\n\t\tif ( $ready == true) {\n\t\t\t$xLog->add(\"OK\\tSe Agrego Existosamente la Cuenta $cuenta del subproducto $subproducto \\r\\n\");\n\t\t\t$this->mSucess \t\t\t\t= true;\n\t\t\t$this->mSocioTitular\t\t= $socio;\n\t\t\t$this->mGrupoAsociado\t\t= $grupo;\n\t\t\t$this->mCreditoAsoc\t\t\t= $credito;\n\t\t\t$this->mNumeroCuenta\t\t= $cuenta;\n\t\t\t$this->mDiasInvertidos\t\t= $DiasInvertidos;\n\t\t\t$this->mFechaVencimiento\t= $FechaVencimiento;\n\t\t\t$this->mTasaInteres\t\t\t= $tasa;\n\t\t\t$this->mFechaOperacion\t\t= $fecha_de_alta;\n\t\t\t$this->init();\t\n\t\t} else {\n\t\t\t$xLog->add(\"ERROR\\tError al agregar la Cuenta $cuenta del subproducto $subproducto\\r\\n\");\n\t\t\t$this->mSucess \t\t\t\t= false;\n\t\t}\n\t\t//setLog($xLog->getMessages());\n\t\t$this->mMessages\t\t\t\t.= $xLog->getMessages();\n\t\treturn $this->mNumeroCuenta;\n\t}", "public function __construct() \r\n {\r\n \t$this->id = 0;\r\n\t\t$this->nombre = \"\";\r\n\t\t$this->clave = \"\";\r\n\t\t$this->privilegio = \"\";\r\n \t$this->con = new cConexion();\r\n\t\t$this->tabla = \"usuario\";\r\n\t\t//$this->con->Conectar();\r\n }", "function cl_ouvidoriaatendimento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ouvidoriaatendimento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_criterioavaliacaodisciplina() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"criterioavaliacaodisciplina\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_alunoaltcampos() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"alunoaltcampos\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function ini__operacion (){\n \n //obtenemos el arreglo almacenado en la operacion \"aulas disponibles\". Su formato es :\n //Array ('id_aula'=>x 'hora_inicio'=>x 'hora_fin'=>x)\n $datos_ad=toba::memoria()->get_parametros();\n //esta condicion es fundamental para no quedarnos en la misma pantalla\n if(isset($datos_ad['id_aula'])){\n $this->s__accion=\"Vinculo\";\n $this->s__aula_disponible=$datos_ad;\n \n //eliminamos la informacion guardada en el arreglo $_SESSION\n toba::memoria()->limpiar_memoria();\n $this->set_pantalla('pant_persona');\n }\n }", "public function __construct(){\n$this->acCodigo_area = \"\";\n$this->acCodificacion = \"\";\n$this->acUbicacion = \"\";\n}", "function cl_ossoario() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ossoario\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function asignar_valores(){\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->cedula=$_POST['cedula'];\n\t\t$this->correo=$_POST['correo'];\n\t}", "function cl_tfd_situacaopedidotfd() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_situacaopedidotfd\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_conplanoorcamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoorcamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function __construct(){\n $this->codigo = null;\n $this->entidad = array('usuario' => '',\n 'password' => '');\n }", "function __construct(){\n \t$this->comentario = new Comentarios();\n\n }", "function setSorpresa($_caja){\r\n $this->sorpresa=$_caja;\r\n }", "function cl_conplanoconplanoorcamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoconplanoorcamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function TipoResiduoReglasNegocios() {\n $this->tipoResiduoAccesoDatos = new TipoResiduoAccesoDatos();\n }", "function cl_aguacoletorexporta() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacoletorexporta\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function asignar_valores2(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->marca=$_POST['marca'];\n\t\t$this->modelo=$_POST['modelo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t}", "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->etiqueta=$_POST['etiqueta'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->icono=$_POST['icono'];\n\t}", "function cl_sau_receitamedica() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_receitamedica\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_liccomissao() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"liccomissao\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function _ObtenerSecciones()\n\t{\n\t\tinclude_once('../Entidades/Secciones.php');\n\t\t$OBJUsuarios = new Secciones;\n\t\t$secciones=$OBJUsuarios -> ObtenerSeccionesparaCategorias();\n\n\n\t\tif ($secciones>=0) {\n\t\t\t\n\t\t\t$privilegios = $_SESSION['privilegios'];\n\t\t\t\n\t\t\tinclude_once('../ModuloAdministrador/vistas/FormularioCategorias.php');\n\t\t\t$OBJUsuarios = new FormularioCategorias;\n\t\t\t$OBJUsuarios -> MostrarFormularioCategorias($secciones,$privilegios);\n\n\t\t}\n\n\t\telse{\n\n\t\t\t\t $mensaje=\"llame al administrador o contacte a [email protected]\";\n\t\t\t\t include('../includes/FormularioMensaje.php');\n\t\t\t\t $objmen = new FormularioMensaje;\n \t $objmen->MostrarMensajeLogin($mensaje);\n\n\t\t}\n\t}", "public function acessarRelatorios(){\n\n }", "protected function asignarCamposRelacionales() {\n foreach($this->campos as $nombre=>$campo) {\n if($campo->tipo!='relacional'||($campo->relacion!='1:1'&&$campo->relacion!='1:0')) continue;\n $columna=$campo->columna;\n if(is_object($this->consultaValores->$nombre)) {\n //Asignado como entidad u objeto anónimo\n $this->consultaValores->$columna=$this->consultaValores->$nombre->id;\n } elseif(is_array($this->consultaValores->$nombre)) {\n //Asignado como array\n $this->consultaValores->$columna=$this->consultaValores->$nombre['id'];\n }\n }\n }", "function asignar_valores(){\n $this->nombre=$_POST['nombre'];\n $this->prioridad=$_POST['prioridad'];\n $this->etiqueta=$_POST['etiqueta'];\n $this->descripcion=$_POST['descripcion'];\n $this->claves=$_POST['claves'];\n $this->tipo=$_POST['tipo'];\n }", "function cl_db_usuariosrhlota() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_usuariosrhlota\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function __construct() {\r\n $this->ctrlAccueil = new ControleurAccueil();\r\n $this->ctrlBillet = new ControleurBillet();\r\n $this->ctrlConnexion = new ControleurConnexion();\r\n $this->ctrlAdmin = new ControleurAdmin();\r\n }", "function cl_condicionante() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"condicionante\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_empreendimento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empreendimento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_evolucaodividaativa() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"evolucaodividaativa\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_aguacorte() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacorte\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_clientesmodulosproc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"clientesmodulosproc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_rhemitecontracheque() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhemitecontracheque\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function __construct() {\n\n $this->vista = new Vista();\n $this->usuario = new Usuario();\n $this->reserva = new Reserva();\n $this->instalacion = new Instalacion();\n $this->horario = new Horario();\n $this->rol = new Rol();\n $this->seguridad = new Seguridad();\n\n }", "function transaccion(){\n\t\t\t$this->conexion = new conexion();\n\t\t\t$this->conn = $this->conexion->enlace();\n\t\t}", "function evt__form_asignacion__aceptar ($datos){\n print_r($this->s__accion);\n switch($this->s__accion){\n case \"Vinculo\" : $this->procesar_vinculo($datos);break;\n case \"Registrar\" : $this->procesar_carga($datos); break;\n case \"Borrar\" : $this->procesar_delete($datos); break;\n case \"Editar\" : $this->procesar_edicion($datos); break;\n case \"Cambiar\" : $this->procesar_cambio($datos); break;\n case \"Confirmar\" : $this->procesar_confirmacion($datos); break;\n default : toba::notificacion()->agregar(\"La variable accion esta vacia!\", 'error'); break;\n }\n \n }", "function cl_ensino() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ensino\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function __construct($Id_Utilizador,$Nome,$Email,$Password,$Tipo,$Data_Inscricao,$estado){\n parent::__construct($Id_Utilizador,$Nome,$Email,$Password,$Tipo,$Data_Inscricao);\n $this->Estado=$estado;\n }", "private function metodo_privado() {\n }", "function __construct(){\r\n \t//SELF hace referencia a la clase para así mandar llamar funciones estáticas.\r\n self::$idEmpleado++; \r\n //This hace referencia a un objeto ya instanciado para mandar llamar funciones de cualquier otro tipo.\r\n $this->nombre = \"\";\r\n $this->apellido = \"\";\r\n //el sueldo liquido es el total final luego de todos los descuentos\r\n $this->sueldoLiquido = 0.0;\r\n //pago por hora extra es de $10.00 \r\n $this->pagoxhoraextra = 10.0;\r\n }", "public function enviarClases( ) {\n\n AccesoGui::$guiSistema->esperarInicioSistema();\n AccesoControladoresDispositivos::$ctrlLuz->setLucesEscenarios(LuzTecho::$ESCENARIO_ENVIAR_CLASE);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n \n\n AccesoControladoresDispositivos::$ctrlAutomata->escenarioEnviarClase();\n if(!AccesoControladoresDispositivos::$ctrlPantallas->isEncendidaPresidencia()) {\n AccesoControladoresDispositivos::$ctrlPantallas->encenderPresidencia();\n AccesoGui::$guiPantallas->pantallaPresidenciaEncender();\n usleep(3000000);\n AccesoControladoresDispositivos::$ctrlPantallas->verEntradaPresidenciaAV1();\n } else {\n AccesoControladoresDispositivos::$ctrlPantallas->quitarPIPPresidencia();\n\n }\n usleep(1000000);\n AccesoControladoresDispositivos::$ctrlGuiPantalla->presidenciaVideoConferencia();\n AccesoControladoresDispositivos::$ctrlPlasma->encender();\n AccesoGui::$guiPlasma->encenderPlasma();\n AccesoControladoresDispositivos::$ctrlProyectores->encenderCentral();\n AccesoControladoresDispositivos::$ctrlProyectores->encenderPizarra();\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarVideo(7,8);\n //AccesoControladoresDispositivos::$ctrlGuiPantalla->presidenciaVideoconferencia();\n AccesoControladoresDispositivos::$ctrlFoco->encender();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\n\t//AccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n AccesoControladoresDispositivos::$ctrlGuiPlasma->verVideoconferenciaEnPlasma();//begiratzeko\n AccesoControladoresDispositivos::$ctrlProyectores->activarCentral();\n AccesoControladoresDispositivos::$ctrlProyectores->activarPizarra();\n usleep(3000);\n AccesoControladoresDispositivos::$ctrlGuiProyectores->verPCSalaEnCentral();\n AccesoControladoresDispositivos::$ctrlGuiProyectores->verPCSalaEnPizarra();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->activarNuestroSonido();//volumen videoconferencia on\n AccesoControladoresDispositivos::$ctrlVideoconferencia->conectar();\n AccesoGui::$guiSistema->mostrarMenu();\n AccesoGui::$guiMenus->menuPrincipal(true);\n //AccesoGui::$guiEscenarios->enviarEstadoVideoconferencia();\n //AccesoGui::$guiEscenarios->escenarioEnviarClase();\n AccesoGui::$guiVideoconferencia->dibujarPantalla();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n sleep(1);\n }", "public function editar(){\r\n\t\tif(!$this->_validarCampos())\r\n\t\t\t// levantando a excessao CamposObrigatorios //\r\n\t\t\tthrow new CamposObrigatorios();\r\n\t\t\r\n\t\tif($this->_testarServicoExisteEdicao($this->getId(), $this->getNome()))\r\n\t\t\t// levanto a excessao//\r\n\t\t\tthrow new Exception(\"Servico já cadastrado en nossa base de dados\");\r\n\t\t\r\n\t\t// recuperando a instancia da classe de acesso a dados //\r\n\t\t$instancia = ServicoDAO::getInstancia(); \r\n\t\t// retornando o Usuario //\r\n\t\treturn $servico = $instancia->editar($this);\r\n\t}", "function __construct(){\n\t\t$this -> modelo = new usuarioBss();\n\t}", "function cl_editalrua() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"editalrua\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function __construct() {\n Sesion::init();\n\n // Luego preguntar si el usuario esta logueado:\n if (!Sesion::exist()) {\n\n // Sino, sera enviado hacia el login:\n header(\"Location: \" . URL);\n exit();\n\n } else if (Sesion::getValue('TIPO_USUARIO') === 'ADMINISTRADOR' || Sesion::getValue('TIPO_USUARIO') === 'PARAMEDICO' || Sesion::getValue('TIPO_USUARIO') === 'MEDICO' || Sesion::getValue('TIPO_USUARIO') === 'AUXILIAR_DE_ENFERMERIA' || Sesion::getValue('TIPO_USUARIO') === 'CONTROL_MEDICO' || Sesion::getValue('TIPO_USUARIO') === 'ENFERMERA_JEFE' || Sesion::getValue('TIPO_USUARIO') === 'RECEPTOR_INICIAL' || Sesion::getValue('TIPO_USUARIO') === 'USUARIO' || Sesion::getValue('TIPO_USUARIO') === 'MEDICO_EXTERNO') {\n\n $this->objModificarPerfil = $this->loadModel('Home', 'mdlModificarPerfil');\n\n } else {\n\n // En caso de que no cumpla ninguna de estas condiciones entonces sera redireccionado a la pagina de error:\n header(\"Location: \" . URL . 'Error/Error');\n exit();\n\n }\n\n }", "function habilitarCajero(){\n\t\t$this->objFun=new FuncionesCobranza();\t\n\t\t$this->res=$this->objFun->habilitarCajero($this->objParam);\n\t\t$this->res->imprimirRespuesta($this->res->generarJson());\n\n\t}", "function envios_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"envios\";\n\t\t$this->campoClave=\"IdEnvio\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"IdEnvio\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(2,$this->tabla,\"IdMail\",2);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Envio\",3);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Descripcion\",4);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"TablaDatosExtras\",5);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"CondicionDatosExtras\",6);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaCreacion\",7);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaModificacion\",8);\n$this->agregarVariable2($v);\n\n\t}", "function __construct($datos)\n {\n $this->id = $datos['id_usuario'];\n $this->nombre = $datos['nombre'];\n $this->apellidos = $datos['apellidos'];\n $this->direccion = $datos['direccion'];\n $this->telefono1 = $datos['telefono1'];\n $this->telefono2 = $datos['telefono2'];\n $this->email = $datos['email'];\n $this->cargo = $datos['cargo'];\n $this->comentario = $datos['comentario'];\n $this->username = $datos['username'];\n $this->password = $datos['password'];\n $this->activo = $datos['activo'];\n $this->tipo_usuario = $datos['id_tipo_usuario'];\n }", "function cl_cemiteriorural() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"cemiteriorural\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "private function camposObligatorios()\n {\n $this->setRequiredField(\"mascara\");\n $this->setRequiredField(\"etiqueta\");\n/*\n $this->setRequiredField(\"id_padre\");\n*/\n $this->setRequiredField(\"posicion\");\n $this->setRequiredField(\"visible\");\n $this->setRequiredField(\"nivel_acceso\");\n/*\n $this->setRequiredField(\"accion\");\n*/\n\n return;\n }", "function cl_sau_prochabilitacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_prochabilitacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function Acessos() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n\r\n $w_troca = $_REQUEST['w_troca'];\r\n\r\n $w_sq_pessoa = $_REQUEST['w_sq_pessoa'];\r\n $w_sq_modulo = $_REQUEST['w_sq_modulo'];\r\n $w_sq_pessoa_endereco = $_REQUEST['w_sq_pessoa_endereco'];\r\n\r\n $SQL = new db_getPersonData; $RS = $SQL->getInstanceOf($dbms, $w_cliente, $w_sq_pessoa, null, null);\r\n $w_username = f($RS,'username');\r\n $w_nome = f($RS,'nome');\r\n\r\n Cabecalho();\r\n head();\r\n Estrutura_CSS($w_cliente);\r\n ShowHTML('<TITLE>'.$conSgSistema.' - Usuários</TITLE>');\r\n ScriptOpen('JavaScript');\r\n ValidateOpen('Validacao');\r\n\r\n if (!(strpos(\"IAE\",$O)===false)) {\r\n\r\n if ($O=='I') {\r\n Validate('w_sq_modulo', 'Módulo', 'SELECT', 1, 1, 18, '', 1);\r\n Validate('w_sq_pessoa_endereco', 'Endereço', 'SELECT', 1, 1, 18, '', 1);\r\n } \r\n\r\n Validate('w_assinatura', $_SESSION['LABEL_ALERTA'], '1', '1', '3', '30', '1', '1');\r\n ShowHTML(' theForm.Botao[0].disabled=true;');\r\n ShowHTML(' theForm.Botao[1].disabled=true;');\r\n } \r\n\r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('</HEAD>');\r\n if ($O=='I') BodyOpen('onLoad=\"document.Form.w_sq_modulo.focus();\"');\r\n elseif ($O=='E') BodyOpen('onLoad=\"document.Form.w_assinatura.focus();\"');\r\n else BodyOpen('onLoad=\"this.focus();\"');\r\n\r\n Estrutura_Topo_Limpo();\r\n Estrutura_Menu();\r\n Estrutura_Corpo_Abre();\r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table border=\"0\" width=\"100%\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td align=\"center\">');\r\n ShowHTML(' <table width=\"99%\" border=\"0\">');\r\n ShowHTML(' <tr><td>Nome:<br><font size=2><b>'.f($RS,'nome').' </b></td>');\r\n ShowHTML(' <td>Username:<br><font size=2><b>'.f($RS,'username').'</b></td>');\r\n ShowHTML(' </b></td>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"2\" height=\"2\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"2\" height=\"1\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" bgcolor=\"#D0D0D0\"><b>Lotação</td>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"2\" height=\"1\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"2\" height=\"2\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td>Unidade:<br><b>'.f($RS,'unidade').' ('.f($RS,'sigla').')</b></td>');\r\n ShowHTML(' <td>e-Mail da unidade:<br><b>'.nvl(f($RS,'email_unidade'),'---').'</b></td>');\r\n ShowHTML(' <tr><td colspan=\"2\">Localização:<br><b>'.f($RS,'localizacao').' </b></td>');\r\n ShowHTML(' <tr><td>Endereço:<br><b>'.f($RS,'endereco').'</b></td>');\r\n ShowHTML(' <td>Cidade:<br><b>'.f($RS,'cidade').'</b></td>');\r\n ShowHTML(' <tr><td colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <tr><td>Telefone:<br><b>'.f($RS,'telefone').' </b></td>');\r\n ShowHTML(' <td>Ramal:<br><b>'.f($RS,'ramal').'</b></td>');\r\n ShowHTML(' <td>Telefone 2:<br><b>'.f($RS,'telefone2').'</b></td>');\r\n ShowHTML(' <td>Fax:<br><b>'.f($RS,'fax').'</b></td>');\r\n ShowHTML(' </table>');\r\n if ($O=='L') {\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"2\" height=\"2\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"2\" height=\"1\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" bgcolor=\"#D0D0D0\"><b>Módulos que gere</td>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"2\" height=\"1\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"2\" height=\"2\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td colspan=\"2\"><font size=2><b>');\r\n $SQL = new DB_GetUserModule; $RS = $SQL->getInstanceOf($dbms, $w_cliente, $w_sq_pessoa);\r\n ShowHTML('<tr><td>');\r\n ShowHTML(' <a accesskey=\"I\" class=\"ss\" href=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=I&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'&w_sq_pessoa='.$w_sq_pessoa.'\"><u>I</u>ncluir</a>&nbsp;');\r\n ShowHTML(' <a class=\"ss\" HREF=\"javascript:this.status.value;\" onClick=\"opener.focus(); window.close();\">Fechar</a>&nbsp;');\r\n ShowHTML(' <td align=\"right\">'.exportaOffice().'<b>Registros: '.count($RS));\r\n ShowHTML('<tr><td align=\"center\" colspan=2>');\r\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\" valign=\"top\">');\r\n ShowHTML(' <td><b>Módulo</td>');\r\n ShowHTML(' <td><b>Endereço</td>');\r\n ShowHTML(' <td class=\"remover\"><b>Operações</td>');\r\n ShowHTML(' </tr>');\r\n $w_cont = '';\r\n if (count($RS) <= 0) {\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=6 align=\"center\"><font size=\"2\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n foreach($RS as $row) {\r\n // Se for quebra de endereço, exibe uma linha com o endereço\r\n if ($w_cont!=f($row,'Modulo')) {\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" valign=\"top\">');\r\n ShowHTML(' <td>'.f($row,'modulo').'</td>');\r\n $w_cont=f($row,'modulo');\r\n } else {\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" valign=\"top\">');\r\n ShowHTML(' <td align=\"center\"></td>');\r\n } \r\n\r\n ShowHTML(' <td>'.f($row,'endereco').'</td>');\r\n ShowHTML(' <td class=\"remover\">');\r\n ShowHTML(' <A class=\"hl\" HREF=\"'.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=E&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'&w_sq_pessoa='.$w_sq_pessoa.'&w_sq_modulo='.f($row,'sq_modulo').'&w_sq_pessoa_endereco='.f($row,'sq_pessoa_endereco').'\">EX</A>&nbsp');\r\n ShowHTML('&nbsp');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n } \r\n } \r\n\r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </table>');\r\n } else {\r\n if ($O=='E') $w_Disabled='DISABLED';\r\n\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"2\" height=\"2\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"2\" height=\"1\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td colspan=\"2\" align=\"center\" bgcolor=\"#D0D0D0\"><font size=\"2\"><b>Gestão de Módulo</td>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"2\" height=\"1\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td align=\"justify\" colspan=\"2\"><font size=2>Informe o módulo e o endereço que deseja indicar o usuário acima como gestor.</font></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"2\" height=\"2\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td colspan=\"2\"><font size=2><b>');\r\n AbreForm('Form',$w_pagina.'Grava', 'POST', 'return(Validacao(this));', null,$P1,$P2,$P3,$P4,$TP,$SG,$R,$O);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_pessoa\" value=\"'.$w_sq_pessoa.'\">');\r\n if ($O=='E') {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_modulo\" value=\"'.$w_sq_modulo.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_pessoa_endereco\" value=\"'.$w_sq_pessoa_endereco.'\">');\r\n } \r\n\r\n\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td align=\"center\">');\r\n ShowHTML(' <table width=\"90%\" border=\"0\">');\r\n ShowHTML(' <tr>');\r\n selecaoModulo('<u>M</u>ódulo:', 'M', null, $w_sq_modulo, $w_cliente, 'w_sq_modulo', null, null);\r\n selecaoEndereco('<U>E</U>ndereço:', 'E', null, $w_sq_pessoa_endereco, null, 'w_sq_pessoa_endereco', 'FISICO');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' <tr><td><b>'.$_SESSION['LABEL_CAMPO'].':<br><INPUT ACCESSKEY=\"A\" class=\"sti\" type=\"PASSWORD\" name=\"w_assinatura\" size=\"30\" maxlength=\"30\" value=\"\"></td>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n if ($O=='E') {\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Excluir\">');\r\n } else {\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Gravar\">');\r\n } \r\n\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.$w_pagina.$par.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'&w_sq_pessoa='.$w_sq_pessoa.'&O=L\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } \r\n\r\n ShowHTML(' </td>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</table>');\r\n Estrutura_Texto_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Rodape();\r\n}", "public function geraClasseControle(){\n # Abre o template da classe Controle e armazena conteudo do modelo\t\t\n $modelo = Util::getConteudoTemplate('class.Modelo.Controle.tpl');\n\n # Abre o template dos metodos de cadastros e armazena conteudo do modelo\n $modeloCAD = Util::getConteudoTemplate('metodoCadastra.tpl');\n $modeloExclui = Util::getConteudoTemplate('metodoExclui.tpl');\n $modeloSelecionar = Util::getConteudoTemplate('metodoSeleciona.tpl');\n $modeloGetAll = Util::getConteudoTemplate('metodoGetAll.tpl'); \n $modeloConsultar = Util::getConteudoTemplate('metodoConsulta.tpl');\n $modeloAlterar = Util::getConteudoTemplate('metodoAltera.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n $aRequire = $aCadastro = $aExclui = $aSelecionar = $aGetAll = $aAlterar = $aConsultar = array();\n $copiaModelo = $modelo;\n //print_r($aBanco);exit;\n foreach($aBanco as $aTabela){\n $aPKDoc = $aPK = array(); \n foreach($aTabela as $oCampo){\n if((string)$oCampo->CHAVE == '1'){\n $aPKDoc[] = \"\\t * @param integer \\$\".(string)$oCampo->NOME;\n $aPK[] = \"\\$\".(string)$oCampo->NOME;\n }\n }\n\n # Montar a Lista de DOC do metodo selecionar\n $listaPKDoc = join(\"\\n\", $aPKDoc);\n $listaPK = join(\",\", $aPK);\n\n # Recupera o nome da tabela e gera os valores a serem gerados\n $nomeClasse = ucfirst($this->getCamelMode($aTabela['NOME']));\n $copiaModeloCAD = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloCAD);\n $copiaModeloExclui = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloExclui);\n $copiaModeloSelecionar = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloSelecionar);\n $copiaModeloGetAll = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloGetAll);\n $copiaModeloAlterar = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloAlterar);\n $copiaModeloConsultar = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloConsultar);\n\n $montaObjeto = $this->retornaObjetosMontados($aTabela['NOME']);\n $montaObjetoBD = $this->retornaObjetosBDMontados($aTabela['NOME']);\n\n $copiaModeloCAD = str_replace('%%MONTA_OBJETO%%', $montaObjeto, $copiaModeloCAD);\n $copiaModeloCAD = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloCAD);\n $copiaModeloExclui = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloExclui);\n $copiaModeloSelecionar = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloSelecionar);\n $copiaModeloSelecionar = str_replace('%%DOC_LISTA_PK%%', $listaPKDoc, $copiaModeloSelecionar);\n $copiaModeloSelecionar = str_replace('%%LISTA_PK%%', \t$listaPK, $copiaModeloSelecionar);\n $copiaModeloGetAll = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloGetAll);\n $copiaModeloAlterar = str_replace('%%MONTA_OBJETO%%', $montaObjeto, $copiaModeloAlterar);\n $copiaModeloAlterar = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloAlterar);\n $copiaModeloConsultar = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloConsultar);\n\n $aRequire[] = \"require_once(dirname(__FILE__).'/bd/class.$nomeClasse\".\"BD.php');\";\n $aCadastro[] = $copiaModeloCAD;\n $aExclui[] = $copiaModeloExclui;\n $aSelecionar[] = $copiaModeloSelecionar;\n $aGetAll[] = $copiaModeloGetAll;\n $aAlterar[] = $copiaModeloAlterar;\n $aConsultar[] = $copiaModeloConsultar;\n }\n\n # Monta demais valores a serem substituidos\n $listaRequire = join(\"\\n\", $aRequire);\n $listaCadastro = join(\"\\n\\n\", $aCadastro);\n $listaExclui = join(\"\\n\\n\", $aExclui);\n $listaSelecionar = join(\"\\n\\n\", $aSelecionar);\n $listaGetAll = join(\"\\n\\n\", $aGetAll);\n $listaAlterar = join(\"\\n\\n\", $aAlterar);\n //print \"<pre>\"; print_r($aAlterar); print \"</pre>\"; \n //print \"<pre>\"; print_r($aConsultar); print \"</pre>\"; \n $listaConsultar = join(\"\\n\\n\", $aConsultar);\n\n # Substitui todas os parametros pelas variaveis ja processadas\n $copiaModelo = str_replace('%%LISTA_REQUIRE%%',\t\t $listaRequire, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_CADASTRA%%',\t $listaCadastro, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_EXCLUI%%',\t $listaExclui, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_SELECIONAR%%',\t $listaSelecionar, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_CARREGAR_COLECAO%%', $listaGetAll, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_ALTERA%%',\t $listaAlterar, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_CONSULTA%%',\t $listaConsultar, $copiaModelo);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes\";\n if(!file_exists($dir)) mkdir($dir);\n\n $fp = fopen(\"$dir/class.Controle.php\",\"w\");\n fputs($fp,$copiaModelo);\n\n # ============ Adicionando Classes de core/Config =========\n $modeloConfig = Util::getConteudoTemplate(\"Modelo.Config.\".$aBanco['SGBD'].\".tpl\");\n $modeloConfig = str_replace('%%DATABASE%%', $this->projeto, $modeloConfig);\n \n $fpConfig = fopen(\"$dir/core/config.ini\",\"w\"); \t\n fputs($fpConfig, $modeloConfig); \n fclose($fpConfig);\n\n copy(dirname(__FILE__).\"/core/class.Seguranca.php\", \"$dir/class.Seguranca.php\");\n copy(dirname(__FILE__).\"/class.Util.php\",\t \"$dir/core/class.Util.php\");\n copy(dirname(__FILE__).\"/class.Conexao.php\", \"$dir/core/class.Conexao.php\");\n \n return true;\n }", "function cl_iptuconstr() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"iptuconstr\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function examen(){\r\n\t\tparent::conectaBDMy();\t \r\n\t\t$this->idExamen=\"\";\t\t\r\n\t\t$this->tipoExamen=\"\";\t\r\n\t\t$this->descripcion=\"\";\r\n\t}", "function cl_alunos() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"alunos\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "abstract function ActualizarDatos();", "function setAgregarUnPais(){\n\t\t$this->comienza_con++;\n\t}", "public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }", "function asignar_valores(){\n\t\t$this->codigo=$_POST['codigo'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->marca=$_POST['marca'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->categoria=$_POST['categoria'];\n\t\t$this->hotel=$_POST['hoteles'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->lugar=$_POST['lugar'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->detal=$_POST['detal'];\n\t\t$this->mayor=$_POST['mayor'];\n\t\t$this->limite=$_POST['limite'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->segmento=$_POST['segmento'];\n\t\t$this->principal=$_POST['principal'];\n\t\t\n\t\t\n\t}", "function SolicitarContrato(){\n $this->procedimiento = 'adq.f_cotizacion_ime';\n $this->transaccion = 'ADQ_SOLCON_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "private function cargar_acceso_nodos($parametros){\r\n // echo $_SESSION[CookIdUsuario];\r\n //print_r($parametros);\r\n if (strlen($parametros[cod_link])>0){\r\n if(!class_exists('mos_acceso')){\r\n import(\"clases.mos_acceso.mos_acceso\");\r\n }\r\n $acceso = new mos_acceso(); \r\n if ($_SESSION[SuperUser]=='S')\r\n unset($parametros[terceros]); \r\n $data_ids_acceso = $acceso->obtenerNodosArbol($_SESSION[CookIdUsuario],$parametros[cod_link],$parametros[modo],$parametros[terceros]);\r\n //print_r($data_ids_acceso);\r\n foreach ($data_ids_acceso as $value) {\r\n $this->id_org_acceso[$value[id]] = $value;\r\n } \r\n }\r\n }", "function asignar_valores2(){\n\t\t/* Metodo para recibir valores del exterior. */\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t\n\t\t$this->id=$_POST['id'];\n\t\t$this->desde=$_POST['desde'];\n\t\t$this->hasta=$_POST['hasta'];\n\t\t$this->titulo=$_POST['titulo'];\n\t\t$this->alternativo=$_POST['alternativo'];\n\t\t$this->paxadicional=$_POST['paxadicional'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->mostrar=$_POST['publica'];\n\t\t\n\t\t$this->desde_a=$_POST['desde_a'];\n\t\t$this->hasta_a=$_POST['hasta_a'];\n\t\t$this->precio_a=$_POST['precio_a'];\n\t\t$this->desde_b=$_POST['desde_b'];\n\t\t$this->hasta_b=$_POST['hasta_b'];\n\t\t$this->precio_b=$_POST['precio_b'];\n\t\t\n\t}", "private function mauteur() {\n\t\t$id = intval(Utils::getGet('id'));\n\t\tif($id > 0) {\n\t\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t\t$this->_ctrlAuteur->auteurModifie($id);\n\t\t} else {\n\t\t\tthrow new Exception('Id incorrect !!!');\n\t\t\t}\n\t}", "function siguienteEstadoSolObligacion()\r\n {\r\n $this->procedimiento = 'tes.ft_solicitud_obligacion_pago_ime';\r\n $this->transaccion = 'TES_SOSIGESTOB_IME';\r\n $this->tipo_procedimiento = 'IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\r\n $this->setParametro('id_proceso_wf_act', 'id_proceso_wf_act', 'int4');\r\n $this->setParametro('id_estado_wf_act', 'id_estado_wf_act', 'int4');\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\r\n $this->setParametro('id_funcionario_wf', 'id_funcionario_wf', 'int4');\r\n $this->setParametro('id_depto_wf', 'id_depto_wf', 'int4');\r\n $this->setParametro('id_depto_lb', 'id_depto_lb', 'int4');\r\n $this->setParametro('obs', 'obs', 'text');\r\n $this->setParametro('json_procesos', 'json_procesos', 'text');\r\n $this->setParametro('instruc_rpc', 'instruc_rpc', 'varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "function conectar(){\n global $Usuario;\n global $Clave;\n global $_SESSION;\n $this->dataOrdenTrabajo->SetUserName($Usuario);\n $this->dataOrdenTrabajo->SetUserPassword($Clave);\n $this->dataOrdenTrabajo->SetDatabaseName($_SESSION['database']);\n $this->dataOrdenTrabajo->setConnected(true);\n }", "function asignar_valores(){\n\t\t$this->tabla=$_POST['tabla'];\n\t\t$this->pertenece=$_POST['pertenece'];\n\t\t$this->asunto=$_POST['asunto'];\n\t\t$this->descripcion=$_POST['contenido'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->hora=$_POST['hora'];\n\t\t$this->fechamod=$_POST['fechamod'];\n\t}", "public function actualizar_estado() {\n }", "function ResumenEstadoCC(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_RESESTCC_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setCount(false);\n\n\n $this->setParametro('id_agencia','id_agencia','int4');\n\n\n\n //Definicion de la lista del resultado del query\n $this->captura('id_agencia','int4');\n $this->captura('tipo','varchar');\n $this->captura('moneda','varchar');\n $this->captura('monto','numeric');\n $this->captura('monto_mb','numeric');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\n\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function cl_moblevantamentoedi() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamentoedi\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function mostrarA(){\n \n echo \"Classe a) Publico = {$this->publico}<br>\";\n echo \"Classe a) Privado = {$this->privado}<br>\"; \n echo \"Classe a) Protegido = {$this->protegido}<br>\";\n }", "public function setForAuteur()\n {\n //met à jour les proposition qui n'ont pas de base contrat et qui ne sont pas null\n /*PLUS BESOIN DE BASE CONTRAT\n \t\t$dbP = new Model_DbTable_Iste_proposition();\n \t\t$dbP->update(array(\"base_contrat\"=>null), \"base_contrat=''\");\n */\n\t \t//récupère les vente qui n'ont pas de royalty\n\t \t$sql = \"SELECT \n ac.id_auteurxcontrat, ac.id_livre\n , ac.id_isbn, ac.pc_papier, ac.pc_ebook\n , a.prenom, a.nom, c.type, IFNULL(a.taxe_uk,'oui') taxe_uk\n ,i.num\n , v.id_vente, v.date_vente, v.montant_livre, v.id_boutique, v.type typeVente\n , i.id_editeur, i.type typeISBN\n , impF.conversion_livre_euro\n FROM iste_vente v\n INNER JOIN iste_isbn i ON v.id_isbn = i.id_isbn \n INNER JOIN iste_importdata impD ON impD.id_importdata = v.id_importdata\n INNER JOIN iste_importfic impF ON impF.id_importfic = impD.id_importfic\n INNER JOIN iste_auteurxcontrat ac ON ac.id_isbn = v.id_isbn\n INNER JOIN iste_contrat c ON c.id_contrat = ac.id_contrat\n INNER JOIN iste_auteur a ON a.id_auteur = ac.id_auteur\n INNER JOIN iste_livre l ON l.id_livre = i.id_livre \n LEFT JOIN iste_royalty r ON r.id_vente = v.id_vente AND r.id_auteurxcontrat = ac.id_auteurxcontrat\n WHERE pc_papier is not null AND pc_ebook is not null AND pc_papier != 0 AND pc_ebook != 0\n AND r.id_royalty is null \";\n\n $stmt = $this->_db->query($sql);\n \n \t\t$rs = $stmt->fetchAll(); \n \t\t$arrResult = array();\n \t\tforeach ($rs as $r) {\n\t\t\t//calcule les royalties\n \t\t\t//$mtE = floatval($r[\"montant_euro\"]) / intval($r[\"nbA\"]);\n \t\t\t//$mtE *= floatval($r[\"pc_papier\"])/100;\n \t\t\tif($r[\"typeVente\"]==\"ebook\")$pc = $r[\"pc_ebook\"];\n \t\t\telse $pc = $r[\"pc_papier\"];\n $mtL = floatval($r[\"montant_livre\"])*floatval($pc)/100;\n //ATTENTION le taux de conversion est passé en paramètre à l'import et le montant des ventes est calculé à ce moment\n \t\t\t//$mtD = $mtL*floatval($r[\"taux_livre_dollar\"]);\n \t\t\t$mtE = $mtL*floatval($r['conversion_livre_euro']);\n //ajoute les royalties pour l'auteur et la vente\n //ATTENTION les taxes de déduction sont calculer lors de l'édition avec le taux de l'année en cours\n $dt = array(\"pourcentage\"=>$pc,\"id_vente\"=>$r[\"id_vente\"]\n ,\"id_auteurxcontrat\"=>$r[\"id_auteurxcontrat\"],\"montant_euro\"=>$mtE,\"montant_livre\"=>$mtL\n ,\"conversion_livre_euro\"=>$r['conversion_livre_euro']);\n\t \t\t$arrResult[]= $this->ajouter($dt\n ,true,true);\n //print_r($dt);\n \t\t}\n \t\t\n \t\treturn $arrResult;\n }", "function tienda(){\r\n $this->conexion = new Conexion();\r\n $this->conexion->Conexion();\r\n }", "function cl_contacorrenteregravinculo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"contacorrenteregravinculo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_aguacalc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacalc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function recivirClases( ) {\n AccesoGui::$guiSistema->esperarInicioSistema();\n\n AccesoControladoresDispositivos::$ctrlLuz->setLucesEscenarios(LuzTecho::$ESCENARIO_RECIBIR_CLASE);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n ConexionServidorCliente::$ctrlGuiPantallas->bajarPantallaElectrica();\n AccesoControladoresDispositivos::$ctrlAutomata->encenderLuzSala(Automata::$intensidades[\"media\"]);//intensidad media\n AccesoControladoresDispositivos::$ctrlLuz->encenderLucesSuelo();\n if(!AccesoControladoresDispositivos::$ctrlPantallas->isEncendidaPresidencia()) {\n ConexionServidorCliente::$ctrlGuiPantallas->presidenciaEncender();\n usleep(5000000);\n AccesoControladoresDispositivos::$ctrlPantallas->verEntradaPresidenciaAV1();\n }else {\n AccesoControladoresDispositivos::$ctrlPantallas->quitarPIPPresidencia();\n }\n usleep(1000000);\n ConexionServidorCliente::$ctrlGuiPantallas->presidenciaVideoConferencia();\n ConexionServidorCliente::$ctrlGuiPlasmas->encender();\n ConexionServidorCliente::$ctrlGuiProyectores->encenderCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->encenderPizarra();\n AccesoControladoresDispositivos::$ctrlFoco->encender();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\nAccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n ConexionServidorCliente::$ctrlGuiPlasmas->verVideoSalaEnPlasma();\n ConexionServidorCliente::$ctrlGuiProyectores->activarCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->activarPizarra();\n ConexionServidorCliente::$ctrlGuiProyectores->verPCSalaEnCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->verVideoconferenciaEnPizarra();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->activarNuestroSonido();\n AccesoControladoresDispositivos::$ctrlVideoconferencia->conectar();\n AccesoGui::$guiEscenarios->escenarioRecivirClase();\n AccesoGui::$guiMenus->menuPrincipal(true);\n AccesoGui::$guiSistema->mostrarMenu();\n AccesoGui::$guiEscenarios->enviarEstadoVideoconferencia();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n\n\n }", "function cl_conplanosis() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanosis\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function __construct() {\n parent::__construct();\n Session::accesoEstricto(array(ADMINISTRATIVOS));\n }", "function ambas()\n {\n print \"Ejecución de la función ambas<br>\";\n # mediante $this-> requerimos la ejecución de metodo prueba\n # de la clase actual\n $this->prueba();\n # al señalar parent:: requerimos la ejecución de metodo prueba\n # de la clase padre\n parent::prueba();\n }", "function cl_escrito() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"escrito\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function __construct ($concesionario){\r\n $this->ciudad=$ciudad;\r\n $this->vehiculos=$vehiculos;\r\n }", "function opcion__personalizable()\n\t{\n\t\t$proyecto = $this->get_proyecto();\n\n\t\tif (!$proyecto->tiene_clases_extendidas('toba')) {\n\t\t\t$mensaje = \"Debe extender las clases de toba primero con el comando \";\n\t\t\t$mensaje .= \"toba proyecto extender_clases_toba\";\n\t\t\t$this->consola->mensaje($mensaje);\n\t\t\treturn;\n\t\t}\n\t\t$this->hacer_personalizable();\n\t\t$proyecto->generar_autoload($this->consola);\n\n\t\t$mensaje = \"El proyecto ya es personalizable. Ahora debe revincular las clases con el comando toba proyecto revincular\";\n\t\t$this->consola->mensaje($mensaje);\n\t}", "function cl_rhconsignadomovimentoservidorrubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhconsignadomovimentoservidorrubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function getContadorAccesos() {\n return $this->contadorAccesos;\n }", "public function init()\n {\n\n // pega o idAgente do usu�rio logado\n $auth = Zend_Auth::getInstance(); // pega a autentica��o\n \n /* ========== IN�CIO PERFIL ==========*/\n // define os grupos que tem acesso\n $PermissoesGrupo = array();\n $PermissoesGrupo[] = 121; // T�cnico de Acompanhamento\n $PermissoesGrupo[] = 122; // Coordenador de Acompanhamento\n $PermissoesGrupo[] = 123; // Coordenador - Geral de Acompanhamento\n $PermissoesGrupo[] = 129; // T�cnico de Acompanhamento\n //$PermissoesGrupo[] = ; // Coordenador de Avalia��o\n //$PermissoesGrupo[] = 134; // Coordenador de Fiscaliza��o\n //$PermissoesGrupo[] = 124; // T�cnico de Presta��o de Contas\n //$PermissoesGrupo[] = 125; // Coordenador de Presta��o de Contas\n //$PermissoesGrupo[] = 126; // Coordenador - Geral de Presta��o de Contas\n parent::perfil(1, $PermissoesGrupo); // perfil novo salic\n\n if (isset($auth->getIdentity()->usu_codigo)) { // autenticacao novo salic\n $this->getIdUsuario = UsuarioDAO::getIdUsuario($auth->getIdentity()->usu_codigo);\n $this->getIdUsuario = ($this->getIdUsuario) ? $this->getIdUsuario['idAgente'] : 0;\n } else { // autenticacao espaco proponente\n $this->getIdUsuario = 0;\n }\n /* ========== FIM PERFIL ==========*/\n\n\n /* ========== IN�CIO �RG�O ========== */\n $GrupoAtivo = new Zend_Session_Namespace('GrupoAtivo'); // cria a sess�o com o grupo ativo\n $this->getIdGrupo = $GrupoAtivo->codGrupo; // id do grupo ativo\n $this->getIdOrgao = $GrupoAtivo->codOrgao; // id do �rg�o ativo\n\n parent::init();\n }", "public function __construct() {\n self::$presidencia=new Camara(\"CamaraPresidencia\");\n self::$alumnos1=new Camara(\"CamaraAlumnos1\");\n self::$alumnos2=new Camara(\"CamaraAlumnos2\");\n }", "public function editar_usuario($id_usuario, $nombre, $apellido, $cedula, $telefono, $email, $direccion, $cargo, $usuario, $password1, $password2, $estado, $permisos)\n {\n\n $conectar = parent::conexion();\n parent::set_names();\n require_once(\"Usuarios.php\");\n $usuarios = new Usuarios();\n //verifica si el id_usuario tiene registro asociado a compras\n $usuario_compras = $usuarios->get_usuario_por_id_compras($_POST[\"id_usuario\"]);\n //verifica si el id_usuario tiene registro asociado a ventas\n $usuario_ventas = $usuarios->get_usuario_por_id_ventas($_POST[\"id_usuario\"]);\n //si el id_usuario NO tiene registros asociados en las tablas compras y ventas entonces se puede editar todos los campos de la tabla usuarios\n if (is_array($usuario_compras) == true and count($usuario_compras) == 0 and is_array($usuario_ventas) == true and count($usuario_ventas) == 0) {\n $sql = \"update usuarios set \n nombres=?,\n apellidos=?,\n cedula=?,\n telefono=?,\n correo=?,\n direccion=?,\n cargo=?,\n usuario=?,\n password=?,\n password2=?,\n estado=?\n where \n id_usuario=?\n \";\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1, $_POST[\"nombre\"]);\n $sql->bindValue(2, $_POST[\"apellido\"]);\n $sql->bindValue(3, $_POST[\"cedula\"]);\n $sql->bindValue(4, $_POST[\"telefono\"]);\n $sql->bindValue(5, $_POST[\"email\"]);\n $sql->bindValue(6, $_POST[\"direccion\"]);\n $sql->bindValue(7, $_POST[\"cargo\"]);\n $sql->bindValue(8, $_POST[\"usuario\"]);\n $sql->bindValue(9, $_POST[\"password1\"]);\n $sql->bindValue(10, $_POST[\"password2\"]);\n $sql->bindValue(11, $_POST[\"estado\"]);\n $sql->bindValue(12, $_POST[\"id_usuario\"]);\n $sql->execute();\n //SE ELIMINAN LOS PERMISOS SOLO CUANDO SE ENVIE EL FORMULARIO CON SUBMIT\n //Eliminamos todos los permisos asignados para volverlos a registrar\n $sql_delete = \"delete from usuario_permiso where id_usuario=?\";\n $sql_delete = $conectar->prepare($sql_delete);\n $sql_delete->bindValue(1, $_POST[\"id_usuario\"]);\n $sql_delete->execute();\n //$resultado=$sql_delete->fetchAll();\n //insertamos los permisos\n //almacena todos los checkbox que han sido marcados\n //este es un array tiene un name=permiso[]\n $permisos = $_POST[\"permiso\"];\n // print_r($_POST);\n $num_elementos = 0;\n while ($num_elementos < count($permisos)) {\n $sql_detalle = \"insert into usuario_permiso\n values(null,?,?)\";\n $sql_detalle = $conectar->prepare($sql_detalle);\n $sql_detalle->bindValue(1, $_POST[\"id_usuario\"]);\n $sql_detalle->bindValue(2, $permisos[$num_elementos]);\n $sql_detalle->execute();\n //recorremos los permisos con este contador\n $num_elementos = $num_elementos + 1;\n }\n } else {\n //si el usuario tiene registros asociados en compras y ventas entonces no se edita el nombre, apellido y cedula\n $sql = \"update usuarios set \n telefono=?,\n correo=?,\n direccion=?,\n cargo=?,\n usuario=?,\n password=?,\n password2=?,\n estado=?\n where \n id_usuario=?\n \";\n //echo $sql; exit();\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1, $_POST[\"telefono\"]);\n $sql->bindValue(2, $_POST[\"email\"]);\n $sql->bindValue(3, $_POST[\"direccion\"]);\n $sql->bindValue(4, $_POST[\"cargo\"]);\n $sql->bindValue(5, $_POST[\"usuario\"]);\n $sql->bindValue(6, $_POST[\"password1\"]);\n $sql->bindValue(7, $_POST[\"password2\"]);\n $sql->bindValue(8, $_POST[\"estado\"]);\n $sql->bindValue(9, $_POST[\"id_usuario\"]);\n $sql->execute();\n //SE ELIMINAN LOS PERMISOS SOLO CUANDO SE ENVIE EL FORMULARIO CON SUBMIT\n //Eliminamos todos los permisos asignados para volverlos a registrar\n $sql_delete = \"delete from usuario_permiso where id_usuario=?\";\n $sql_delete = $conectar->prepare($sql_delete);\n $sql_delete->bindValue(1, $_POST[\"id_usuario\"]);\n $sql_delete->execute();\n //$resultado=$sql_delete->fetchAll();\n //insertamos los permisos\n //almacena todos los checkbox que han sido marcados\n //este es un array tiene un name=permiso[]\n if (isset($_POST[\"permiso\"])) {\n $permisos = $_POST[\"permiso\"];\n }\n //print_r($_POST);\n $num_elementos = 0;\n\n while ($num_elementos < count($permisos)) {\n\n $sql_detalle = \"insert into usuario_permiso\n values(null,?,?)\";\n\n $sql_detalle = $conectar->prepare($sql_detalle);\n $sql_detalle->bindValue(1, $_POST[\"id_usuario\"]);\n $sql_detalle->bindValue(2, $permisos[$num_elementos]);\n $sql_detalle->execute();\n\n\n //recorremos los permisos con este contador\n $num_elementos = $num_elementos + 1;\n } //fin while\n\n\n } // fin else\n\n\n }", "public function testSetAutreContrat() {\n\n $obj = new AttestationCacm();\n\n $obj->setAutreContrat(\"autreContrat\");\n $this->assertEquals(\"autreContrat\", $obj->getAutreContrat());\n }" ]
[ "0.6384553", "0.63297623", "0.6277283", "0.6248355", "0.6211292", "0.61777556", "0.6170975", "0.6170362", "0.6152834", "0.6114578", "0.60486066", "0.603934", "0.5980538", "0.59803396", "0.5965893", "0.5955337", "0.5952884", "0.59429777", "0.5927751", "0.59245795", "0.5914047", "0.59088844", "0.58963126", "0.58951086", "0.5887174", "0.5879008", "0.58728594", "0.58581567", "0.5855583", "0.5850509", "0.584908", "0.5838452", "0.58269274", "0.5826722", "0.581846", "0.5807594", "0.57984865", "0.57971245", "0.57938844", "0.57825255", "0.5781545", "0.57808816", "0.5778442", "0.57766545", "0.57746303", "0.57702875", "0.5766878", "0.5765038", "0.5762104", "0.5757742", "0.57561654", "0.5753072", "0.57464963", "0.573471", "0.57340324", "0.5727802", "0.57273334", "0.572059", "0.5709047", "0.569642", "0.5695527", "0.56897277", "0.567751", "0.5677202", "0.56766754", "0.56738245", "0.5671571", "0.5670517", "0.5670097", "0.5664118", "0.56635505", "0.56626433", "0.566154", "0.5658198", "0.56555337", "0.56533724", "0.563825", "0.5633954", "0.56194323", "0.56109524", "0.5610924", "0.5607646", "0.5606014", "0.56015146", "0.559999", "0.55992305", "0.5598464", "0.559687", "0.5592248", "0.55910075", "0.5587773", "0.5577087", "0.55726963", "0.5572693", "0.55725485", "0.55693007", "0.5557993", "0.5553891", "0.5553539", "0.55454415", "0.5545334" ]
0.0
-1
fin metodo encargado de retornar todos los login existentes en la base de datos que coinsidan con un parametro de busqueda
public function Buscar() { try { //por medio del objeto de la clase datos llamamos el metodo encargado de hacer consultas en la base de datos return $this->cn->consultar("call SPDepartamentoGet()"); } catch(PDOException $e) { $this->log->write('Error en la clase Departamento metodo buscar '.$e->getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function consult_login($dato){\n\t\t// se crean las variables que tentran la data correspondiente en la posicion que esta cada uno de estos datos\n\t\t$cedula=strip_tags($dato[0]);\n\t\t$contrasena=strip_tags($dato[1]);\n\t\t//se crea una variable que instancia la clase que coneccion a la base de datos\n\t\t$mysqli = new conect_database();\n\t\t// se rea una variable que sea igual a la variable que instancio la clase anterior y se realiza una respectiva consulta y se le mandan los respectivos datos\n\t\t$query = $mysqli->prepare(\"select id_usuarios,nombre_usuario,tipo_usuario from t_usuarios where usuario='\".$cedula.\"' and contrasena='\".$contrasena.\"'\");\n\t\t// se ejecuta lo que esta dentro de la variable anterior \n\t\t$query->execute();\t\n // se llama la una de las variables privadas que se crearon al principio y esta va a ser igual a la variable que contiene los datos de la consulta uy se obtienen los datos con get_result();\n\t\t$this->consult=$query->get_result();\n // se creaun bucle que es igual a data que sea igual al metodo inbocado en este caso la variable que contiela los datos de la consulta y se obtiene una colunma o un array (los datos)\n\t\twhile ($data=$this->consult->fetch_row()) {\n // llamamos a la otra variable privada que sera un array y contendra los datos\n\t\t\t$this->dataAll[]=$data;\n\n\t\t}\n // retornamos los datos \n\t\treturn $this->dataAll;\n\t}", "public function dadosLogin(){\n\t\t$sql=\"select id_empresa from empresa where email=:email and senha=:senha\";\n\t\t//prepara o comando a ser executado no banco de dados\n\t\t$query=$this->con->prepare($sql);\n\t\t//set as variáveis no comando sql e executa no banco de dados\n\t\t$query->execute(array(\"email\"=>$this->email,\"senha\"=>$this->senha));\n\t\t//retorna resultado com um array assoc\n\t\t$resultado = $query->fetch(PDO::FETCH_ASSOC);\n\t\t//retorna os dados do usuário se estiver tudo ok, senão retorna falso\n\t\tif($resultado){\n\t\t\treturn $resultado;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function get_login($data=array()){\n if(array_key_exists('username', $data)){\n $this->query = \" SELECT t1.cod_usuario,CONCAT(t1.nom_usuario,' ',t1.ape_usuario) as nom_usuario,t1.email_usuario,t1.tel_usuario,t1.tw_usuario,\n t1.fb_usuario,t1.intro_usuario,t1.linkid_usuario,t1.usuario_usuario,\n t1.cod_estado,concat('modules/sistema/adjuntos/',t1.img_usuario) as img_usuario,t2.cod_perfil,t2.des_perfil,t1.cod_proveedores\n FROM sys_usuario as t1, sys_perfil as t2\n WHERE t1.cod_perfil=t2.cod_perfil\n AND usuario_usuario = '\" .$data['username']. \"'\n AND password_usuario = '\" .md5($data['password']). \"'\";\n $this->get_results_from_query();\n }\n if(count($this->rows) == 1){\n foreach ($this->rows[0] as $propiedad=>$valor) {\n Session::set(str_replace('_usuario','',$propiedad), $valor);\n }\n if(Session::get('cod_estado') != 'AAA'){\n $this->msj = 'La sesi&oacute;n esta desactivada, consulte al administrador. ';\n $this->err = '1';\n return false;exit();\n }\n\n if( Session::get('cod_perfil')=='2'\n && Session::get('cod_perfil')=='6'\n && Session::get('cod_perfil')=='7'\n && Session::get('cod_perfil')=='8'\n && Session::get('cod_perfil')=='9'){\n $this->msj = 'El usuario no tiene permisos para accder, consulte al administrador. ';\n $this->err = '1';\n if(!Session::get('usuario'))\n redireccionar(array('modulo'=>'sistema','met'=>'cerrar'));\n\n return false;\n }\n return true;\n }else{\n $this->msj = 'Informaci&oacute;n incorrecta, revise los datos. ';\n $this->err = '0';\n return false;exit();\n }\n }", "public function getUsuariosLogin($datos)\n {\n $stmt = Conexion::conectar()->prepare('SELECT *from usuarios WHERE correo=:correo && password=:contrasena');\n $stmt->bindParam(\":correo\", $datos[\"correo\"] , PDO::PARAM_STR);\n $stmt->bindParam(\":contrasena\", $datos[\"contrasena\"] , PDO::PARAM_STR);\n if($stmt->execute())\n {\n \n //Variables para iniciar una sesion \n \n $respuesta = $stmt->rowCount();\n $resultado =$stmt->fetch();\n session_start();\n $_SESSION[\"idUsuario\"]=$resultado[\"idUsuario\"];\n $_SESSION[\"nombre\"]=$resultado[\"nombre\"];\n $_SESSION[\"apellido\"]=$resultado[\"apellido\"];\n $_SESSION[\"nombre_usuario\"]=$resultado[\"nombre_usuario\"];\n $_SESSION[\"contrasena\"]=$resultado[\"password\"];\n $_SESSION[\"apellido\"]=$resultado[\"apellido\"];\n $_SESSION[\"correo\"]=$resultado[\"correo\"];\n $_SESSION[\"fecha_registro\"]=$resultado[\"fecha_registro\"];\n $_SESSION[\"ruta_img\"]=$resultado[\"ruta_img\"];\n $_SESSION[\"tipoUsuario\"]=$resultado[\"tipoUsuario\"];\n\n return $respuesta;\n }else\n {\n return \"error\";\n }\n }", "public function loginUsers($data) {\n try {\n $sql = \"SELECT usua_cedula, usua_contrasena FROM usuario WHERE usua_cedula = ?\";\n $query = $this->pdo->prepare($sql);\n $valid = $query->execute(array($data[0]));\n $valid= $query->fetch();\n\n if (password_verify($data[1], $valid[1])) { // Condicional para validar contrasena si es igual\n $sql1 = \"SELECT u.usua_id, CONCAT(UPPER(LEFT(u.usua_nombre1, 1)), LOWER(SUBSTRING(u.usua_nombre1,2))) AS usua_nombre1, u.usua_nombre2, CONCAT(UPPER(LEFT(u.usua_apellido1, 1)), LOWER(SUBSTRING(u.usua_apellido1,2))) AS usua_apellido1, u.usua_apellido2, u.usua_cedula, u.carg_id,\n u.usua_contrasena, u.clien_id, u.usua_estado, u.usua_modifica, u.usua_ingreso, u.sed_id, u.area_id\n FROM usuario AS u\n WHERE usua_cedula = ? \";\n $query = $this->pdo->prepare($sql1);\n $const= $query->execute(array($data[0]));\n $const= $query->fetch();\n\n if ($const[9] === \"1\" && $const[11] === \"1\") {\n session_start(); // Variables para iniciar session\n $_SESSION[\"validar\"] = true;\n $_SESSION[\"nombre\"] = $const[1];\n $_SESSION[\"apellido\"] = $const[3];\n $_SESSION[\"idusuario\"] = $const[0];\n $_SESSION[\"cargo\"] = $const[6];\n $_SESSION[\"idcliente\"] = $const[8];\n $_SESSION[\"sede\"] = $const[12];\n return true;\n }else if ($const[11] === \"0\" && $const[9] === \"1\"){\n session_start(); // Variables para iniciar session\n $_SESSION[\"cedula\"] = $const[5];\n return \"successpassword\";\n }\n }else {\n return \"authentication\";\n }\n\n } catch (Exception $e) {\n die($e->getMessage());\n }\n\n }", "function compruebaLoginUsuario($bd){\n //Hago un filtrado previo por si hay valores indeseables en el array\n $arrayFiltrado=array();\n foreach ($_POST as $k => $v)\n $arrayFiltrado[$k] = filtrado($v);\n\n //Utilizo los objetos DAO para añadir el usuario a la BD\n $daoUsuario = new Usuarios($bd);\n $usuario = new Usuario();\n $usuario->setPassword($arrayFiltrado[\"password\"]);\n $usuario->setUsuario($arrayFiltrado[\"usuario\"]);\n $resultado = $daoUsuario->compruebaCredenciales($usuario);\n //Compruebo si tengo usuario\n if($resultado!=false) {\n $usuario->setPassword(null);\n $usuario->setId($resultado[\"id\"]);\n $usuario->setImagen($resultado[\"imagen\"]);\n return $usuario;\n }\n else\n return false;\n}", "public function getLogin(){\n $statement = \"SELECT * FROM conf_usuario WHERE username=:Username and pass=:Pass and estado=1\";\n $sql = MainModel::getConection()->prepare($statement);\n $sql->bindParam(\":Username\",$this->getUsername());\n $sql->bindParam(\":Pass\",$this->getPass());\n $sql->execute();\n return $sql;\n }", "function RellenaDatos()\n{\n $sql = \"SELECT *\n\t\t\tFROM USUARIOS\n\t\t\tWHERE (\n\t\t\t\t(login = '$this->login') \n\t\t\t)\";\n\n\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t}else\n\t{\n\t\t$tupla = $resultado->fetch_array();\n\t}\n\treturn $tupla;\n}", "function bd_usuarios_datos($login) {\n $sql=\"\n SELECT id, nombre, nivel, email\n FROM usuarios\n WHERE id LIKE '{$login}'or email LIKE '{$login}'\";\n $salida = sql2row($sql);\n return $salida;\n}", "function consultaLogin($conexion, $usuario){\n $resultado = $conexion->query(\"select * from usuario where usuario='$usuario'\");\n return $resultado;\n}", "private function login(){\n\t\tif ($_SERVER['REQUEST_METHOD'] != \"POST\") {\n\t\t\t# no se envian los usuarios, se envia un error\n\t\t\t$this->mostrarRespuesta($this->convertirJson($this->devolverError(1)), 405);\n\t\t} //es una peticion POST\n\t\tif(isset($this->datosPeticion['email'], $this->datosPeticion['pwd'])){\n\t\t\t#el constructor padre se encarga de procesar los datos de entrada\n\t\t\t$email = $this->datosPeticion['email']; \n \t\t$pwd = $this->datosPeticion['pwd'];\n \t\t//si los datos de la solicitud no es tan vacios se procesa\n \t\tif (!empty($email) and !empty($pwd)){\n \t\t\t//se valida el email\n \t\t\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) { \n \t\t\t//consulta preparada mysqli_real_escape()\n \t\t\t\t$query = $this->_conn->prepare(\n \t\t\t\t\t\"SELECT id, nombre, email, fRegistro \n \t\t\t\t\t FROM usuario \n \t\t\t\t\t WHERE email=:email AND password=:pwd \");\n \t\t\t\t//se le prestan los valores a la query\n \t\t\t\t$query->bindValue(\":email\", $email); \n \t\t\t$query->bindValue(\":pwd\", sha1($pwd)); \n \t\t\t$query->execute(); //se ejecuta la consulta\n \t\t\t//Se devuelve un respuesta a partir del resultado\n \t\t\tif ($fila = $query->fetch(PDO::FETCH_ASSOC)){ \n\t\t\t $respuesta['estado'] = 'correcto'; \n\t\t\t $respuesta['msg'] = 'Los datos pertenecen a un usuario registrado';\n\t\t\t //Datos del usuario \n\t\t\t $respuesta['usuario']['id'] = $fila['id']; \n\t\t\t $respuesta['usuario']['nombre'] = $fila['nombre']; \n\t\t\t $respuesta['usuario']['email'] = $fila['email']; \n\t\t\t $this->mostrarRespuesta($this->convertirJson($respuesta), 200); \n\t\t\t } \n \t\t\t}\n \t\t} \n\t\t} // se envia un mensaje de error\n\t\t$this->mostrarRespuesta($this->convertirJson($this->devolverError(3)), 400);\n\t}", "public function getAllFromLogin()\n {\n $sql = \"SELECT * FROM login;\";\n $res = $this->db->executeFetchAll($sql);\n\n return $res;\n }", "private function getLoginInfos()\r\n\t\t{\t\r\n\t\t\t$request = \"SELECT * FROM `bpcms_users` WHERE Username='\".$this->logInfos['username'].\"'\";\r\n\t\t\t$request = mysql_query($request);\r\n\t\t\t$result = mysql_fetch_assoc($request);\r\n\t\t\t\r\n\t\t\treturn $result;\r\n\t\t}", "function buscarLogin($usuario){\r\n\t $sql=\"SELECT * from usuarios WHERE usuario='\".$usuario.\"'\";\r\n\t //Realizamos la consulta\r\n\t $resultado=$this->realizarConsulta($sql);\r\n\t if($resultado!=false){\r\n\t return $resultado->fetch_assoc();\r\n\t }else{\r\n\t return null;\r\n\t }\r\n \t}", "public static function getLogin()\n {\n // Подключаемся к БД.\n $db = Db::getConnection();\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n try{\n $newList = array();\n $i = 0; $c = 0; $f = 0;\n\n $result = $db->prepare('SELECT id, name FROM user_type');\n $result->execute();\n\n $result1 = $db->prepare('SELECT id, country_name FROM countries');\n $result1->execute();\n\n $result2 = $db->prepare('SELECT id, or_name FROM orientation');\n $result2->execute();\n\n if($result2->rowCount() > 0) {\n while ($row = $result2->fetch(PDO::FETCH_OBJ)) {\n /*its getting data in line.And its an object*/\n $newList[2][$f]['or_id'] = $row->id;\n $newList[2][$f]['or_name'] = $row->or_name;\n $f++;\n }\n }\n\n if($result1->rowCount() > 0) {\n while ($row = $result1->fetch(PDO::FETCH_OBJ)) {\n /*its getting data in line.And its an object*/\n $newList[1][$c]['c_id'] = $row->id;\n $newList[1][$c]['c_name'] = $row->country_name;\n $c++;\n }\n }\n\n if($result->rowCount() > 0) {\n while ($row = $result->fetch(PDO::FETCH_OBJ)) {\n /*its getting data in line.And its an object*/\n $newList[0][$i]['id'] = $row->id;\n $newList[0][$i]['name'] = $row->name;\n $i++;\n }\n }\n\n return $newList;\n }\n catch (PDOexception $e) {\n\n echo \"Error is \".$e->getmessage();\n\n }\n }", "public function LoginUser($Ppassword, $Pusuario){\n\n //se limpian las variables\n $Ppassword = $this->limpiarVariable($Ppassword);\n $Pusuario = $this->limpiarVariable($Pusuario);\n //se instancia la clase conexion y se le otorga el string de conexion a una nueva variable\n $con = new Conexion();\n $conexion = $con->get_Conexion();\n\n //se crea la sentencia SQL\n $sql = \"SELECT COD_CLIENTE, CONTRASENIA FROM GEN_CLIENTE WHERE COD_CLIENTE = ? AND CONTRASENIA = ?\";\n\n //encriptacion de la contraseña\n $hash_pass = crypt($Ppassword);\n echo($hash_pass);\n\n echo \"<script>console.log('Debug Objects: \" . $hash_pass . \"' );</script>\";\n\n //se prepara el statement con la sentencia previamente creada\n $stmt = $conexion->prepare($sql);\n\n if ($stmt) {\n //se realiza un execute y un fetch donde se obtienen los datos de la primera fila\n //que coincida con el usuario y la clave ademas del cia.\n //en el execute se agregan las variables por medio de un array.\n $stmt->execute(array($Pusuario, $Ppassword));\n $result = $stmt->fetch();\n\n //se cierra la conexion\n $conexion = null;\n\n //se retorna el $result;\n return $result;\n }else{\n //si el statement da error, se retorna falso.\n return false;\n }\n\n}", "public function Login($dados){\n // //$conexao = $c->conexao();\n\n $email = $dados[0];\n $senha = md5($dados[1]);\n\n $sql = \"SELECT a.*, c.permissao FROM tbusuarios a, tbpermissao c WHERE email = '$email' and senha = '$senha' and a.idpermissao = c.idpermissao limit 1 \";\n $row = $this->ExecutaConsulta($this->conexao, $sql);\n\n // print_r($sql);\n\n // $sql=ExecutaConsulta($this->conecta,$sql);\n // $sql = $this->conexao->query($sql);\n // $sql = $this->conexao->query($sql);\n // $row = $sql->fetch_assoc();\n // print_r($row); \n\n if ($row) {\n $_SESSION['chave_acesso'] = md5('@wew67434$%#@@947@@#$@@!#54798#11a23@@dsa@!');\n $_SESSION['email'] = $email;\n $_SESSION['nome'] = $row['nome'];\n $_SESSION['permissao'] = $row['permissao'];\n $_SESSION['idpermissao'] = $row['idpermissao'];\n $_SESSION['last_time'] = time();\n $_SESSION['usuid'] = $row['idusuario'];\n $_SESSION['ip'] = $_SERVER[\"REMOTE_ADDR\"];\n $mensagem = \"O Usuário $email efetuou login no sistema!\";\n $this->salvaLog($mensagem);\n return 1;\n }else{\n return 0;\n }\n\n }", "function newInfosUser($login)\n{\n require(\"./modele/connexionBD.php\");\n $sql_ajt = \"SELECT * from `utilisateur` where login=:login\";\n try {\n $statement = $pdo->prepare($sql_ajt);\n $statement->bindParam(':login', $login);\n $statement->execute();\n $rowAll = $statement->fetchAll(PDO::FETCH_BOTH);\n if (count($rowAll) > 0) {\n $contenu = $rowAll[0];\n return $contenu;\n }\n $contenu = array();\n return $contenu;\n } catch (PDOException $e) {\n echo utf8_encode(\"Echec de select : \" . $e->getMessage() . \"\\n\");\n die();\n }\n}", "function loginUser($da){\r\n\t\t\tglobal $PDO;\r\n\t\t\t$req = $PDO->prepare(\"SELECT users.id, users.login, users.roleid, users.firstlogin, employes.lastname, employes.firstname, employes.photo, employes.sex , employes.phone, employes.email, employes.position, employes.adresse, employes.extension FROM users LEFT JOIN employes ON users.id = employes.iduser\r\n\t\t\t\tWHERE users.login=:connectname AND users.password=:connectpass AND users.status=1 LIMIT 1\");\r\n\r\n\t\t\t\ttry{\r\n\t\t\t\t\t$req->execute($da);\r\n\t\t\t\t\t$data = $req->fetchAll();\r\n\t\t\t\t\tif(count($data)>0){\r\n\r\n\t\t\t\t\t\t$req = $PDO->prepare(\"SELECT roles.id, roles.name, roles.level FROM roles WHERE id = \".$data[0]->roleid);\r\n\t\t\t\t\t\t$req->execute();\r\n\t\t\t\t\t\t$temp = $req->fetchAll();\r\n\r\n\t\t\t\t\t\t$_SESSION['Auth'] = $data[0];\r\n\t\t\t\t\t\t$_SESSION['Auth']->name=$temp[0]->name;\r\n\t\t\t\t\t\t$_SESSION['Auth']->level=$temp[0]->level;\r\n\t\t\t\t\t\t$_SESSION['Auth']->timeout = date(\"H:i:s\");\r\n\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcatch (PDOException $e){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t}", "function login($user, $pass) {\n global $db;\n $pass = sha1($pass);\n $stmt = $db->prepare(\"SELECT idUser, username, `group` FROM login_inventory WHERE username = :user && password = :pass\"); \n \n $binds = array(\n \":user\" => $user,\n \":pass\" => $pass\n );\n \n $results = array();\n if ($stmt->execute($binds) && $stmt->rowCount() > 0) {\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return ($results);\n }\n else{\n return false;\n }\n }", "function obtenerUsuarios(){\n //Variable que almacena la consulta sql\n $sql = \"select login,Alias\n \t\t\tfrom ENTREGA\";\n\t\t//se ejecuta la query\n $resultado = $this->mysqli->query( $sql );\n if ( $resultado->num_rows == 0 ) { return null; }//miramos si el número de filas es 0.\n //Caragamos las tuplas resultado de la consulta en un array\n while($datos = mysqli_fetch_row ($resultado)){\n //Variable que almacena el array de las tuplas resultado de la query\n $miarray[] = $datos;\n }\n return $miarray;\n }", "public function loginUsuario($login = '', $clave = '') {\n $password = md5($clave);\n $this->consulta = \"SELECT * \n FROM usuario \n WHERE login = '$login' \n AND password = '$password' \n AND estado = 'Activo' \n LIMIT 1\";\n\n if ($this->consultarBD() > 0) {\n $_SESSION['LOGIN_USUARIO'] = $this->registros[0]['login'];\n $_SESSION['ID_USUARIO'] = $this->registros[0]['idUsuario'];\n $_SESSION['PRIVILEGIO_USUARIO'] = $this->registros[0]['privilegio'];\n $_SESSION['ACTIVACION_D'] = 0;\n// $_SESSION['ACCESOMODULOS'] = $this->registros[0]['accesoModulos'];\n\n $tipoUsuario = $this->registros[0]['tipoUsuario'];\n\n switch ($tipoUsuario) {\n case 'Empleado':\n $idEmpleado = $this->registros[0]['idEmpleado'];\n $this->consulta = \"SELECT primerNombre, segundoNombre, primerApellido, segundoApellido, cargo, cedula, tipoContrato \n FROM empleado \n WHERE idEmpleado = $idEmpleado \n LIMIT 1\";\n $this->consultarBD();\n// $apellidos = explode(' ', $this->registros[0]['apellidos']);\n $_SESSION['ID_EMPLEADO'] = $idEmpleado;\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = $this->registros[0]['primerNombre'] . ' ' . $this->registros[0]['primerApellido'];\n $_SESSION['CARGO_USUARIO'] = $this->registros[0]['cargo'];\n $_SESSION['TIPO_CONTRATO'] = $this->registros[0]['tipoContrato'];\n\n $_SESSION['NOMBRES_USUARIO'] = $this->registros[0]['primerNombre'] . ' ' . $this->registros[0]['segundoNombre'];\n $_SESSION['APELLIDOS_USUARIO'] = $this->registros[0]['primerApellido'] . ' ' . $this->registros[0]['segundoApellido'];\n $_SESSION['CEDULA_USUARIO'] = $this->registros[0]['cedula'];\n break;\n case 'Cliente Residencial':\n $idResidencial = $this->registros[0]['idResidencial'];\n $this->consulta = \"SELECT nombres, apellidos, cedula \n FROM residencial \n WHERE idResidencial = $idResidencial \n LIMIT 1\";\n $this->consultarBD();\n $apellidos = explode(' ', $this->registros[0]['apellidos']);\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = $this->registros[0]['nombres'] . ' ' . $apellidos[0];\n $_SESSION['CARGO_USUARIO'] = 'Cliente Residencial';\n\n $_SESSION['NOMBRES_USUARIO'] = $this->registros[0]['nombres'];\n $_SESSION['APELLIDOS_USUARIO'] = $this->registros[0]['apellidos'];\n $_SESSION['CEDULA_USUARIO'] = $this->registros[0]['cedula'];\n break;\n case 'Cliente Corporativo':\n $idCorporativo = $this->registros[0]['idCorporativo'];\n $this->consulta = \"SELECT razonSocial, nit \n FROM corporativo \n WHERE idCorporativo = $idCorporativo \n LIMIT 1\";\n\n $this->consultarBD();\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = $this->registros[0]['razonSocial'];\n $_SESSION['CARGO_USUARIO'] = 'Cliente Corporativo';\n\n $_SESSION['NOMBRES_USUARIO'] = $this->registros[0]['razonSocial'];\n $_SESSION['APELLIDOS_USUARIO'] = $this->registros[0]['razonSocial'];\n $_SESSION['CEDULA_USUARIO'] = $this->registros[0]['nit'];\n break;\n case 'Administrador':\n $_SESSION['NOMBRES_APELLIDO_USUARIO'] = 'Administrador';\n $_SESSION['CARGO_USUARIO'] = 'Administrador';\n $_SESSION['TIPO_CONTRATO'] = 'Laboral Administrativo';\n\n $_SESSION['NOMBRES_USUARIO'] = 'Administrador';\n $_SESSION['APELLIDOS_USUARIO'] = 'Administrador';\n $_SESSION['CEDULA_USUARIO'] = '10297849';\n $_SESSION['ID_EMPLEADO'] = '12';\n $_SESSION['ID_CAJA_MAYOR_FNZAS'] = 2;\n $idEmpleado = 12;\n break;\n default:\n break;\n }\n\n //******************************************************************\n // VARIABLES DE SESSION PARA EL ACCESO AL MODULO RECAUDOS Y FACTURACION DE swDobleclick\n\n $_SESSION['user_name'] = $_SESSION['NOMBRES_APELLIDO_USUARIO'];\n $_SESSION['user_charge'] = $_SESSION['CARGO_USUARIO'];\n\n $_SESSION['user_id'] = 0; //$this->getIdUsuarioOLD($idEmpleado);\n $_SESSION['user_privilege'] = 0; //$this->getPrivilegioUsuarioOLD($idEmpleado);\n\n //******************************************************************\n\n $fechaHora = date('Y-m-d H:i:s');\n $idUsuario = $_SESSION['ID_USUARIO'];\n $consultas = array();\n $consultas[] = \"UPDATE usuario \n SET fechaHoraUltIN = '$fechaHora' \n WHERE idUsuario = $idUsuario\";\n $this->ejecutarTransaccion($consultas);\n return true;\n } else {\n return false;\n }\n }", "function validatedLogin($email,$contra){\n $query = \"SELECT\n id_usuario,\n nombre,\n apellidoP,\n apellidoM,\n email,\n fechaNac,\n nombreRol,\n valuePermission\n FROM\n usuario\n LEFT JOIN(rol) ON usuario.rol_id = rol.id_rol\n WHERE\n usuario.email = \".$this->db->escape($email).\" AND\n pass = \".$this->db->escape($contra).\"\n \";\n return $this->db->query($query);\n }", "function login( $parameters ) {\n\tunset($_SESSION);\n\t\n\t$arr = array();\n\t$arr['page'] = \"\";\n\t$arr['login'] = false;\n\t\n\t$pag = mb_strtoupper($parameters[\"page\"]);\n\t$usr = mb_strtoupper($parameters[\"username\"]);\n\t$psw = strtolower($parameters[\"password\"]);\n\n\t//Verificacao de Usuario/Senha\n\tif ( isset($usr) && !empty($usr) ):\n\t\t$barDecode\t= PATTERNS::getBars()->decode($usr);\n\t\t$usrClube\t= ($barDecode[\"lg\"] == PATTERNS::getBars()->getLength() && \n\t\t\t\t\t $barDecode[\"cp\"] == PATTERNS::getBars()->getClubePrefix() && \n\t\t\t\t\t PATTERNS::getBars()->has(\"id\",$barDecode[\"split\"][\"id\"])\n\t\t\t\t\t);\n\n\t\t\n\t\t$result = checkUser($usr, $pag);\n\n\t\t//SE NAO ENCONTROU E O CODIGO TEM OS CARACTERES MINIMOS PARA USUARIO DO CLUBE\n\t\tif ($result->EOF && $usrClube):\n\t\t\t$usrClube = (sha1(strtolower($usr)) == $psw);\n\t\t\n\t\t\t$usr = PATTERNS::getBars()->encode(array(\n\t\t\t\t\"ni\" => $barDecode[\"ni\"]\n\t\t\t));\n\t\t\tif ($usrClube):\n\t\t\t\t$psw = sha1(strtolower($usr));\n\t\t\tendif;\n\t\t\t$result = checkUser($usr, $pag);\n\n\t\t//SE NAO ENCONTROU\n\t\telseif ($result->EOF):\n\n\t\t\t//VERIFICA SE CPF É DE UM MEMBRO ATIVO\n\t\t\t$result = checkMemberByCPF($usr);\n\t\t\tif (!$result->EOF):\n\t\t\t\t$usuarioID = $result->fields[\"ID\"];\n\t\t\t\t$usr = $result->fields[\"CD_USUARIO\"];\n\t\t\t\t$psw = $result->fields[\"DS_SENHA\"];\n\n\t\t\t\tif (is_null($usuarioID) && \n\t\t\t\t (!is_null($result->fields[\"CD_CARGO\"]) || !is_null($result->fields[\"CD_CARGO2\"])) ):\n\n\t\t\t\t\t$usr = PATTERNS::getBars()->encode(array(\n\t\t\t\t\t\t\"ni\" => $result->fields[\"ID_MEMBRO\"]\n\t\t\t\t\t));\n\t\t\t\t\t$psw = sha1(strtolower($usr));\n\n\t\t\t\t\tfInsertUser( $usr, $result->fields['NM'], $psw, $result->fields['ID_CAD_PESSOA'] );\n\n\t\t\t\t\tPROFILE::apply(\n\t\t\t\t\t\t$result->fields['ID_CAD_PESSOA'],\n\t\t\t\t\t\tarray( \"cargo\" => $result->fields[\"CD_CARGO\"], \"cargo2\" => $result->fields[\"CD_CARGO2\"] ) \n\t\t\t\t\t);\n\t\t\t\tendif;\n\n\t\t\t\treturn login( array(\n\t\t\t\t\t\"page\"\t\t=> $pag,\n\t\t\t\t\t\"username\"\t=> $usr,\n\t\t\t\t\t\"password\"\t=> $psw ) );\n\n\t\t\t//VERIFICA SE RESPONSAVEL TEM ALGUM DEPENDENTE ATIVO e SE CPF CONSTA COMO RESPONSAVEL\n\t\t\telse:\n\t\t\n\t\t\t\t$resp = verificaRespByCPF($usr);\n\t\t\t\tif ( !is_null($resp) && existeMenorByRespID($resp[\"ID_CAD_PESSOA\"]) ):\n\t\t\t\t\t$psw = sha1(str_replace(\"-\",\"\",str_replace(\".\",\"\",$usr)));\n\t\t\t\t\t\n\t\t\t\t\tfInsertUser( $usr, $resp[\"NM\"], $psw, $resp[\"ID_CAD_PESSOA\"] );\n\n\t\t\t\t\tPROFILE::apply(\n\t\t\t\t\t\t$resp[\"ID_CAD_PESSOA\"],\n\t\t\t\t\t\tarray( \"respLeg\" => true ) \n\t\t\t\t\t);\n\n\t\t\t\t\treturn login( array(\n\t\t\t\t\t\t\"page\"\t\t=> $pag,\n\t\t\t\t\t\t\"username\"\t=> $usr,\n\t\t\t\t\t\t\"password\"\t=> $psw ) );\n\n\t\t\t\tendif;\n\t\t\tendif;\n\n\t\tendif;\n\t\n\t\t//SE NAO ENCONTROU USUARIO E SENHA E EH MEMBRO DO CLUBE COM APRENDIZADO OU HISTORICO.\n\t\tif ($usrClube && $result->EOF):\n\n\t\t\t//VERIFICA SE ESTÁ ATIVO\n\t\t\t$rsHA = CONN::get()->execute(\"SELECT ID_CAD_PESSOA, NM FROM CON_ATIVOS WHERE ID_CLUBE = ? AND ID_MEMBRO = ?\", array( $barDecode[\"ci\"], $barDecode[\"ni\"] ) );\n\t\t\tif (!$rsHA->EOF):\n\t\t\t\tfInsertUser( $usr, $rsHA->fields['NM'], $psw, $rsHA->fields['ID_CAD_PESSOA'] );\n\n\t\t\t\tPROFILE::apply(\n\t\t\t\t\t$rsHA->fields['ID_CAD_PESSOA'],\n\t\t\t\t\tarray() \n\t\t\t\t);\n\t\t\t\n\t\t\t\treturn login( array( \n\t\t\t\t\t\"page\" =>\t\t$pag, \n\t\t\t\t\t\"username\" =>\t$usr, \n\t\t\t\t\t\"password\" =>\t$psw ) );\n\t\t\tendif;\n\n\t\t//SE EXISTE O USUARIO DIGITADO.\n\t\telseif (!$result->EOF):\n\t\t\tif ($usrClube):\n\t\t\t\t//VERIFICA SE ESTÁ ATIVO\n\t\t\t\t$rsHA = CONN::get()->execute(\"SELECT CD_CARGO, CD_CARGO2 FROM CON_ATIVOS WHERE ID_CLUBE = ? AND ID_MEMBRO = ?\", array( $barDecode[\"ci\"], $barDecode[\"ni\"] ) );\n\t\t\t\tif ($rsHA->EOF):\n\t\t\t\t\t$psw = null;\n\t\t\t\tendif;\n\n\t\t\t\tPROFILE::apply(\n\t\t\t\t\t$result->fields['ID_CAD_PESSOA'],\n\t\t\t\t\tarray( \"cargo\" => $rsHA->fields[\"CD_CARGO\"], \"cargo2\" => $rsHA->fields[\"CD_CARGO2\"] ) \n\t\t\t\t);\n\n\t\t\telse:\n\t\t\t\t$resp = verificaRespByCPF($usr);\n\t\t\t\tif (!is_null($resp)):\n\t\t\t\t\tif (!existeMenorByRespID($resp[\"ID_CAD_PESSOA\"])):\n\t\t\t\t\t\tfDeleteUserAndProfile( $result->fields[\"ID\"], 11 );\n\t\t\t\t\t\treturn $arr;\n\t\t\t\t\telse:\n\t\t\t\t\t\tPROFILE::apply(\n\t\t\t\t\t\t\t$resp[\"ID_CAD_PESSOA\"],\n\t\t\t\t\t\t\tarray( \"respLeg\" => true ) \n\t\t\t\t\t\t);\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\t\t\tendif;\n\n\t\t\t$password = $result->fields['DS_SENHA'];\n\n\t\t\tif ($password == $psw):\n\t\t\t\tPROFILE::fSetSessionLogin($result);\n\n\t\t\t\tCONN::get()->execute(\"\n\t\t\t\t\tUPDATE CAD_USUARIO SET \n\t\t\t\t\t\tDH_ATUALIZACAO = NOW()\n\t\t\t\t\tWHERE ID = ?\n\t\t\t\t\", array( $result->fields['ID'] ) );\n\n\t\t\t\tif ( $pag == \"READDATA\" ):\n\t\t\t\t\t$arr['page'] = PATTERNS::getVD().\"readdata.php\";\n\t\t\t\telse:\n\t\t\t\t\t$arr['page'] = PATTERNS::getVD().\"dashboard/index.php\";\n\t\t\t\tendif;\n\t\t\t\t$arr['login'] = true;\n\t\t\tendif;\n\t\tendif;\n\n\tendif;\n\n\treturn $arr;\n}", "function login_user($user,$pass,$activo=false,$h=false){\n $c = ($h)?$pass:md5($pass);\n $sql = sprintf(\"SELECT * FROM `login` WHERE `email` = %s AND `contrasena` = %s AND `cloud` = %s LIMIT 1\",\n varSQL($user),\n varSQL($c),\n varSQL(__sistema));\n $datos = consulta($sql,true);\n if($datos != false){\n $_SESSION['usuario'] = $datos['resultado'][0]['id'];\n $_SESSION['session_key']= md5($pass);\n //obtener los datos adicionales del usuario en cuestion de acuerdo al perfil de usuario que pertenesca\n $sql = sprintf(\"SELECT * FROM `%s` WHERE `id_login` = %s\",(obtener_campo(sprintf(\"SELECT `tabla` FROM `usuarios_perfiles_link` WHERE `id_perfil` = %s\",varSQL($datos['resultado'][0]['perfil'])))),varSQL($datos['resultado'][0]['id']));\n $datos1 = consulta($sql,true);\n if($datos1!=false){\n unset($datos1['resultado'][0]['id']);\n $d = array_merge($datos['resultado'][0],$datos1['resultado'][0]);\n $_SESSION['data_login'] = $d;\n }else{\n $_SESSION['data_login'] = $datos['resultado'][0];\n }\n //obteniendo los detalles de los modulos disponibles para cada usuario\n $con = sprintf(\"SELECT * FROM `componentes_instalados` WHERE `id` IN(SELECT `id_componente` FROM `usuarios_perfiles_permisos` WHERE `id_perfil` = %s)\",varSQL($datos['resultado'][0]['perfil']));\n $r = consulta($con,true);\n //detalles del perfil\n $p = consulta(sprintf(\"SELECT `nombre`,`p` FROM `usuarios_perfiles` WHERE `id` = %s\",varSQL($datos['resultado'][0]['perfil'])),true);\n $_SESSION['usuario_perfil'] = $p['resultado'][0];\n $_SESSION['usuario_componentes'] = $r['resultado'];\n $detalles = array(\"estado\"=>\"ok\",\"detalles\"=>\"\");\n }else{\n $_SESSION['usuario']='';\n $_SESSION['session_key']='';\n $detalles = array(\"estado\"=>\"error\",\"detalles\"=>\"no_log_data\",\"mensaje\"=>\"Nombre de usuario o contrase&ntilde;a incorrecta\");\n }\n return $detalles;\n}", "function GetTousLesUtilisateurs()\n{\n\tglobal $bdd;\n\t$i = 0;\n\t$rep = $bdd -> query(\"SELECT login FROM UTILISATEUR\");\n\twhile ($don = $rep->fetch())\n\t{\n\t\t$login[$i] = $don['login'];\n\t\t$i++;\n\t}\n\t$rep->closeCursor();\n\treturn $login;\n}", "public function get_usuario($id_login){\n return $this->db->query(\"select * from usuarios where ID_USUARIO=$id_login\"); \n \n }", "public function login(){\n $query = \"SELECT * FROM users where username = '$this->username' && password = '$this->password' \";\n $pdo = new Connection();\n $pdo = $pdo->open();\n $results = $pdo->query($query);\n $rows = [];\n foreach($results->fetchAll() as $row){\n $rows[] = new User($row['username'], null, $row['id']);\n }\n return $rows;\n }", "public function login() {\n parent::conectarBD();\n\n $queri = parent::query(sprintf(\"select usu_id as codigo, usu_password as senha, \"\n . \"usu_token_sessao as token_sessao, usu_login as login from \"\n . table_prefix . \"usuario where usu_login = '%s' and \"\n . \"usu_password = '%s'\", $this->usu_login, $this->usu_password));\n\n if ($queri) {\n $dados = $queri->fetch_assoc();\n if ($dados) {\n $new_session_id = hash('sha256', $dados['senha'] . time());\n $queri2 = parent::query(\"update \" . table_prefix . \"usuario set usu_token_sessao = '$new_session_id' where usu_id = \" . $dados['codigo']);\n\n if ($queri2) {\n $dados['token_sessao'] = $new_session_id;\n parent::commit();\n parent::desconectarBD();\n return $dados;\n } else {\n parent::rollback();\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n }", "function check_login() {\n //j'appelle la fonction pour se connecter à la database\n include(\"M/db_connect.php\");\n \n //je récupere ce qui est du formulaire et normalisation du form\n $email = htmlspecialchars($_GET['email']);\n $password = htmlspecialchars($_GET['password']);\n \n // la requete pour la database \n $req = $db->prepare(\"SELECT * FROM account WHERE email LIKE :email AND psw LIKE :psw\");\n $req->execute(array(\"email\"=>$email, \"psw\"=>$password));\n\n return $req;\n }", "public function findbypseudo($login)\r\n {\r\n $query = $this->conn->prepare('SELECT `user_id`, `user_mot_de_passe` FROM `user` WHERE user_pseudo_unique = :log'); // Création de la requête + utilisation order by pour ne pas utiliser sort\r\n $query->execute([':log' => $login ]); // Exécution de la requête\r\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\r\n }", "function recuperarDatosEstablecimiento($login) {\n\t\t\t$usuario = new Usuarios();\n\t\t\t$establecimento = new Establecimiento();\n\t\t\t$res1 = $usuario->recuperar($login);\n\t\t\tif($res1===0) return false;\n\t\t\t$res2 = $establecimento->recuperar($login);\n\t\t\tif($res2===0) return false;\n\t\t\t$aux1 = mysqli_fetch_assoc($res1);\n\t\t\t$aux2 = mysqli_fetch_assoc($res2);\n\t\t\t$result = array(\n\t\t\t\t\t\t\t\"login\" => $login,\n\t\t\t\t\t\t\t\"password\" => $aux1[\"password\"],\n\t\t\t\t\t\t\t\"email\" => $aux1[\"email\"],\n\t\t\t\t\t\t\t\"nombre\" => $aux2[\"nombre\"],\n\t\t\t\t\t\t\t\"direccion\" => $aux2[\"direccion\"],\n\t\t\t\t\t\t\t\"telefono\" => $aux2[\"telefono\"],\n\t\t\t\t\t\t\t\"web\" => $aux2[\"web\"],\n\t\t\t\t\t\t\t\"horario\" => $aux2[\"horario\"],\n\t\t\t\t\t\t\t\"descripcion\" => $aux2[\"descripcionestablecimiento\"]\n\t\t\t\t\t);\n\t\t\treturn $result;\n\t}", "public function retrieve_all_users()\n {\n $table_pengajar = $this->db->dbprefix('pengajar');\n $table_siswa = $this->db->dbprefix('siswa');\n $table_login = $this->db->dbprefix('login');\n\n $sql = \"SELECT {$table_login}.username, {$table_pengajar}.nama FROM {$table_pengajar} INNER JOIN {$table_login} ON {$table_pengajar}.id = {$table_login}.pengajar_id\n UNION\n SELECT {$table_login}.username, {$table_siswa}.nama FROM {$table_siswa} INNER JOIN {$table_login} ON {$table_siswa}.id = {$table_login}.siswa_id\";\n\n $result = $this->db->query($sql);\n\n $data = array();\n foreach ($result->result_array() as $r) {\n # selain yang login\n if (is_login() && $r['username'] == get_sess_data('login', 'username')) {\n continue;\n }\n $data[] = addslashes($r['nama']) . ' [' . $r['username'] . ']';\n }\n\n return $data;\n }", "function obtenerDatosUsuario($parametros) {\n $sql = \"SELECT nombre, apellidos, email, telefono, dni, administrador, pass FROM usuarios WHERE dni = :dni\";\n\n //Preparamos la consulta\n $consulta_usuario = $this->conexionBBDD->prepare($sql,array());\n\n //Ejecutamos la consulta\n $consulta_usuario->execute($parametros);\n\n //Devolvemos los resultados\n return $consulta_usuario->fetch(PDO::FETCH_NUM);\n }", "public function checkLogin(){\n $dbQuery = new DBQuery(\"\", \"\", \"\");\n $this->email = $dbQuery->clearSQLInjection($this->email);\n $this->senha = $dbQuery->clearSQLInjection($this->senha);\n \n // Verificar quantas linhas um Select por Email e Senha realiza \n $resultSet = $this->usuarioDAO->select(\" email='\".$this->email.\"' and senha='\".$this->senha.\"' \");\n $qtdLines = mysqli_num_rows($resultSet);\n \n // Pegar o idUsuario da 1ª linha retornada do banco\n $lines = mysqli_fetch_assoc($resultSet);\n $idUsuario = $lines[\"idUsuario\"];\n \n\n \n // retorna aonde a função foi chamada TRUE ou FALSE para se tem mais de 0 linhas\n if ( $qtdLines > 0 ){\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n $_SESSION[\"idUsuario\"] = $idUsuario;\n $_SESSION[\"email\"] = $this->email;\n return(true);\n }else{\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n unset($_SESSION[\"idUsuario\"]);\n unset($_SESSION[\"email\"]);\n return(false);\n }\n }", "function leerUsuarioLogin($entrada) {\n $user = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n $con = crearConexion();\n $query = \"SELECT `username`, `nombre`, `apellidos`, `password`, `email`, `sexo`, `f_nacimiento`, `foto`, `ciudad`, `tipo`, `ultimo_acceso` FROM `usuario` WHERE `username` = '$user'\";\n $result = mysqli_query($con, $query);\n\n $row = mysqli_fetch_array($result);\n\n cerrarConexion($con);\n return $row;\n}", "public static function getlist(){\n $sql = new Sql();\n \n return $sql->select(\"SELECT * FROM tb_usuarios ORDER BY deslogin\");\n }", "function login($connexio)\n{\n\n try {\n\n //$hashPassword = password_hash($_POST['pswd'], PASSWORD_DEFAULT);\n\n $password = $_POST['pswd'];\n\n /*$hash = $connexio->prepare('SELECT u.Password FROM Usuario u WHere Email = :email');\n $mail2 = $_POST['mail'];\n $hash->bindValue('email' , $mail2);\n $hash->execute();\n //$hash->fetchColumn(PDO::FETCH_ASSOC);\n $resultadoConsulta = $hash->fetchColumn(PDO::FETCH_ASSOC);*/\n\n $hash = 'SELECT Usuario.Password FROM Usuario WHERE Email = :email';\n $stmt = $connexio->prepare($hash);\n\n $stmt -> execute ( ['email' => $_POST['mail'] ]);\n\n $usuario = $stmt->fetchAll();\n\n //echo $usuario[0]['Password'];\n\n\n\n if (!password_verify($password, $usuario[0]['Password'])) {\n echo \"Credenciales incorrectas\";\n exit;\n }\n\n //$sql = 'SELECT * FROM Usuario WHERE Email = $email';\n $sql = $connexio->prepare('SELECT u.ID FROM Usuario u WHERE Email = :email');\n $mail = filter_var($_POST['mail'], FILTER_SANITIZE_EMAIL);\n $sql->bindValue('email' , $mail);\n //$stmt = $connexio->prepare($sql);\n\n $sql->execute(\n /*[\n 'email' => $_POST['mail']\n ]*/\n );\n echo \"Credenciales correctas\";\n //echo '<pre>'; print_r($sql->fetch(PDO::FETCH_ASSOC)); die;\n return $sql->fetchAll(PDO::FETCH_ASSOC);\n\n\n } catch (PDOException $exception) {\n print $exception->getMessage();\n }\n}", "public function login($data = array())\n {\n \n $valid = false;\n $mensaje = '';\n $redirect = '';\n $result = array();\n $user = $this->get_usuarios($data);\n $sep_val = explode('|', $user);\n $sep_val = array(1,1);\n\n if($sep_val[0] == 0 && $sep_val[1] == 0) {\n \n $valid = false;\n $mensaje = 'Usuario no exite o no tiene permisos.';\n $result['valid'] = $valid;\n $result['mensaje'] = $mensaje;\n return $result;\n \n }elseif($sep_val[0] == 1 && $sep_val[1] == 0){\n \n $valid = false;\n $mensaje = 'Usuario no esta activo.';\n $result['valid'] = $valid;\n $result['mensaje'] = $mensaje;\n return $result;\n \n }elseif($sep_val[0] == 1 && $sep_val[1] == 1){\n \n /*obtener informacion del usuario*/ \n $datos_usuarios = $this->check_user($data['usuario']);\n //$promotor_sin_user = $this->check_promotor($datos_usuarios->apellido_paterno.' '.$datos_usuarios->apellido_materno.' '.$datos_usuarios->nombre);\n \n if(empty($datos_usuarios)):\n \n $valid = false;\n $mensaje = 'Usuario no valido.';\n $result['valid'] = $valid;\n $result['mensaje'] = $mensaje;\n return $result;\n \n endif;\n \n $user_p = $this->check_promotor($datos_usuarios->id_user,$datos_usuarios->nombre,$datos_usuarios->apellido_paterno,$datos_usuarios->apellido_materno);\n $auditor = $this->get_usuario_auditor($datos_usuarios->login); \n $presol = $this->get_usuario_presolicitud($datos_usuarios->login); //usuarios REDES SOCIALES \n $dre = $this->get_usuario_dre($datos_usuarios->id_user);//USUARIO DRE \n $gdi = $this->get_usuario_gdi($datos_usuarios->id_user);//USUARIO GDI \n \n \n //$pass = $this->encryption->decrypt($user->Password);\n $pass = 'admin';\n //if($pass === $data['password'] && $data['usuario'] == '[email protected]'){\n if($pass === $data['password'] && '[email protected]' == '[email protected]'){\n \n $_SESSION['login']['user_id'] = ($datos_usuarios->id_user)?$datos_usuarios->id_user:0;\n $_SESSION['login']['user_promotor'] = (!empty($user_p->id_promotor))?$user_p->id_promotor:0;\n $_SESSION['login']['nombre'] = $datos_usuarios->nombre.' '.$datos_usuarios->apellido_paterno;\n $_SESSION['login']['usuario'] = $datos_usuarios->login;\n $_SESSION['login']['rol'] = $datos_usuarios->id_perfil;\n $_SESSION['login']['sucursal'] = $datos_usuarios->id_sucursal;\n $_SESSION['login']['auditor'] = $auditor; \n $_SESSION['login']['presolicitud'] = $presol;\n $_SESSION['login']['DRE'] = $dre;\n $_SESSION['login']['GDI'] = $gdi;\n\n\n \n if($_SESSION['login']['user_promotor'] == 0 && $_SESSION['login']['auditor'] == 'Nohay' && $_SESSION['login']['presolicitud']== 'Nohay' && $_SESSION['login']['DRE'] == 'Nohay' && $_SESSION['login']['GDI'] == 'Nohay'){\n $valid = false;\n $mensaje = 'Usuario no contiene información de crédito';\n }else{\n $valid = true;\n $mensaje = '';\n if($auditor == 'Nohay' && $presol == 'Nohay' && $dre == 'Nohay' && $gdi == \"Nohay\"): \n $redirect = base_url('inicio');\n elseif($auditor != 'Nohay' && $presol == 'Nohay' && $dre == 'Nohay' && $gdi == \"Nohay\"): \n $redirect = base_url('auditoria');\n elseif($auditor == 'Nohay' && $presol != 'Nohay' && $dre == 'Nohay' && $gdi == \"Nohay\"):\n $redirect = base_url('presolicitud');\n elseif($auditor == 'Nohay' && $presol == 'Nohay' && $dre != 'Nohay' && $gdi == \"Nohay\"):\n $redirect = base_url('filtro_presolicitud');\n elseif($auditor == 'Nohay' && $presol == 'Nohay' && $dre == 'Nohay' && $gdi != \"Nohay\"):\n $redirect = base_url('filtro_presolicitud');\n endif; \n $result['redirect'] = $redirect;\n \n }\n \n // set timeout period in seconds\n //$this->dbp = $this->load->database($_SESSION['login']['db'],TRUE);\n /* Actualizar ultimo acceso*/\n // $response = $this->update('tbl_usuarios',array('UltimoAcceso'=>date('Y-m-d H:i:s')),'IdUsuario',$user->IdUsuario);\n \n } else {\n $valid = false;\n $mensaje = 'Usuario o contraseña incorrectas';\n }\n //$this->output->enable_profiler(TRUE);\n $result['valid'] = $valid;\n $result['mensaje'] = $mensaje;\n return $result;\n \n }\n \n// $result['valid'] = $valid;\n// $result['mensaje'] = $mensaje;\n// return $result;\n \n }", "function login() {\n if (isset($_POST[\"email\"]) && isset($_POST[\"password\"])) {\n\n // Put parameters into local variables\n $email = $_POST[\"email\"];\n $password = $_POST[\"password\"];\n\n if ($_POST[\"user\"] == 'landlord') {\n $stmt = $this->db->prepare('SELECT id FROM user_landlord WHERE email=? AND password=?');\n } \n else if ($_POST[\"user\"] == 'tenant') {\n $stmt = $this->db->prepare('SELECT id FROM user_tenant WHERE email=? AND password=?');\n }\n \n $stmt->bind_param(\"ss\", $email, $password);\n $stmt->execute();\n\t $stmt->bind_result($id);\n\t \t \n\t $i = 0;\n\t $id_array = array();\n\t while ($stmt->fetch()) {\n\t array_push($id_array, $id);\n \t}\n \t $stmt->close();\n \t \n \t if (count($id_array) == 1) {\n \t echo '{\"success\":1}';\n \t } else {\n \t echo '{\"success\":0, error_message\":\"Email and/or password is invalid.\"}';\n \t }\n }\n }", "public function login($user, $clave)\n {\n parent::conectar();\n\n \n\n // El metodo salvar sirve para escapar cualquier comillas doble o simple y otros caracteres que pueden vulnerar nuestra consulta SQL\n $user = parent::salvar($user);\n $clave = parent::salvar($clave);\n\n // Si necesitas filtrar las mayusculas y los acentos habilita las lineas 36 y 37 recuerda que en la base de datos debe estar filtrado tambien para una \n \n\t$consulta = 'select id, nombre, cargo from usuarios where email=\"'.$user.'\" and clave= MD5(\"'.$clave.'\")\n\t UNION SELECT codpaci, nombrep, cargo from customers where email =\"'.$user.'\" and clave= MD5(\"'.$clave.'\")';\n\t \n\t \n /*\n Verificamos si el usuario existe, la funcion verificarRegistros\n retorna el número de filas afectadas, en otras palabras si el\n usuario existe retornara 1 de lo contrario retornara 0\n */\n\n $verificar_usuario = parent::verificarRegistros($consulta);\n\n // si la consulta es mayor a 0 el usuario existe\n if($verificar_usuario > 0){\n\n \n\n /*\n Realizamos la misma consulta de la linea 55 pero esta ves transformaremos el resultado en un arreglo,\n ten mucho cuidado con usar el metodo consultaArreglo ya que devuelve un arreglo de la primera fila encontrada\n es decir, como nosotros solo validamos a un usuario no hay problema pero esta funcion no funciona si\n vas a listar a los usuarios, espero que me entiendan xd\n */\n\n $user = parent::consultaArreglo($consulta);\n\n /*\n Bien espero ser un poco claro en esta parte, la variable user\n en la linea 69 pasa a ser un arreglo con los campos consultados en la linea\n 48, entonces para acceder a los datos utilizamos $user[nombre_del_campo] Ok?\n bueno hagamos el ejercicio.\n */\n\n /*\n Inicializamos la sessión | Recuerda con las variables de sesión\n podemos acceder a la informacion desde cualquiera pagina siempre y cuando\n exista una sesión y ademas utilicemos el codigo de la linea 84\n */\n\n session_start();\n\n /*\n Las variables de sesion son muy faciles de usar, es como\n declarar una variable, lo unico diferente es que obligatoria mente\n debes usar $_SESSION[] y .... el nombre de la variable ya no sera asi\n $miVariable sino entre comillas dentro del arreglo de sesion, haber me\n dejo explicar, $_SESSION['miVariable'], recuerda que como declares la variable\n en este archivo asi mismo lo llamaras en los demas.\n */\n\n $_SESSION['id'] = $user['id'];\n $_SESSION['nombre'] = $user['nombre'];\n $_SESSION['cargo'] = $user['cargo'];\n\n /*\n Que porqué almacenamos cargo? es encillo en nuestros proyectos\n pueden existir archivos que solo puede ver un usuario con el cargo de\n administrador y no un usuario estandar, asi que la variable global de\n sesion nos ayudara a verificar el cargo del usuario que ha iniciado sesion\n Ok?\n */\n\n /*\n Recuerda:\n cargo con valor: 1 es: Administrador\n cargo con valor: 2 es: usuario estandar\n puedes agregar cuantos cargos desees, en este ejemplo solo uso 2\n */\n\n // Verificamos que cargo tiene l usuario y asi mismo dar la respuesta a ajax para que redireccione\n if($_SESSION['cargo'] == 1){\n echo 'view/admin/admin.php';\n }else if($_SESSION['cargo'] == 2){\n echo 'view/user/user.php';\n }\n\n\n // u.u finalizamos aqui :v\n\n }else{\n // El usuario y la clave son incorrectos\n echo 'error_3';\n }\n\n\n # Cerramos la conexion\n parent::cerrar();\n }", "function login(){\n\t\t$apikey = $this->get_api_key();\n\t\t$apisecret = $this->get_api_secret();\n\t\t$authorization = $this->get_authorization();\n\t\t$user = new \\gcalc\\db\\api_user( $apikey, $apisecret, $authorization );\n\t\tif ( $user->login() ) {\n\t\t\t$credetials = $user->get_credentials();\t\t\t\t\n\t\t} else {\n\t\t\t$credetials = array(\n\t\t\t\t'login' => 'anonymous',\n\t\t\t\t'access_level' => 0\n\t\t\t);\n\t\t}\n\t\treturn $credetials;\n\t}", "public function getLogin();", "public function getLogin();", "public function getLogin();", "public function consultarUsuario($parametros)\n {\n //echo \"<h1>$correo -- $contrasena</h1>\";\n // header('Location: ../vistas/index.php');\n\n #LLAMO LA CONEXION PARA PODER CONSULTAR A LA BASE DE DATOS\n $modelo = new Conexion_PDO();\n $conexion = $modelo->get_Conexion_Mysql();\n #PREPARO LA SQL PARA VERIFICAR SI EL USUARIO EXISTE Y ESTA ACTIVO\n $sql = \"SELECT priape,segape,nom from datosiniciales\";\n $statement = $conexion->prepare($sql);\n $statement->execute();\n $resultados = $statement->fetch();\n // VERIFICA SI EL RESULTADO ES DIFERENTE DE VACIO QUIERE DECIR QUE EL CORREO SI EXISTE Y ESTA ACTIVO\n if ($resultados != '') {\n\n echo \"<br>- \"$resultados['priape'];\n echo \"<br>- \"$resultados['segape'];\n echo \"<br>- \"$resultados['nom'];\n return 1;\n\n // $_SESSION['identificacion'] = $dato['numeroid'];\n // $_SESSION['nombre'] = $dato['nombre1'];\n // $_SESSION['apellido'] = $dato['apellido1'];\n // header('location:acceso.php');\n\n } else {\n return 2;\n // echo \"Error, verifica tu usuario y contraseña\";\n // header('location:../index.php');\n }\n\n }", "function login(){\n $query = \"SELECT\n `id_user`, `nama`, `username`, `password`\n FROM\n \" . $this->db_table . \" \n WHERE\n username='\".$this->username.\"' AND password='\".$this->password.\"'\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n // execute query\n $stmt->execute();\n return $stmt;\n }", "public function loginUser($user,$pwd){\n \n $pwdCr = mkpwd($pwd);\n \n \n \n $sql = new Sql();\n $userData = $sql->select('SELECT * FROM usuarios \n WHERE email_usuario = :email_usuario\n AND pwd_usuario = :pwd_usuario',array(':email_usuario'=>$user,':pwd_usuario'=>$pwdCr));\n \n if(!isSet($userData) || count($userData)==0){//CASO NADA RETORNADO\n return false;\n }elseif(count($userData)>0){//CASO DADOS RETORNADOS CONFERE O STATUS\n \n if($userData[0]['status_usuario']==0){\n \n return 0;//caso INATIVO entao retorna ZERO indicando cadastro NAO ATIVO\n \n }elseif($userData[0]['status_usuario']==1){//CASO USUARIO ATIVO GERA SESSION DO LOGIN\n \n \n //permissao do cliente\n $_SESSION['_uL'] = encode($userData[0]['permissao_usuario']);\n $_SESSION['logado'] = 'sim';\n \n //dados do usuario\n $_SESSION['_iU'] = encode($userData[0]['id_usuario']);\n $_SESSION['_iE'] = encode($userData[0]['id_empresa']);\n $_SESSION['_nU'] = encode($userData[0]['nome_usuario'] . ' ' . $userData[0]['sobrenome_usuario']);\n $_SESSION['_eU'] = encode($userData[0]['email_usuario']);\n \n return 1;\n }\n \n }\n \n \n }", "public function checkLogin($login){\n try {\n \n $db = $this->connect(); \n $stmt = $db->prepare(\"SELECT * FROM users where username = :login\");\n $stmt->bindParam(':login', $login);\n $stmt->execute();\n $result = $stmt->fetchAll();\n if(count($result)==0){ \n return $_SESSION['checkLogin'] = true;\n }\n else{\n echo 'login juz jest';\n return $_SESSION['checkLogin'] = false;\n }\n \n } \n catch (Exception $ex) {\n echo 'Error'.$ex;\n } \n }", "function find_user() //функция авторизации пользователя\n\t{\n\t\t//echo \"Hello <br/>\";\n\t\t$sth = $this->db->prepare(\"SELECT id, username FROM accounts WHERE username = :username AND password = :password\");\n \t\t$sth->execute(array(\n\t\t\t\t\t\t\t':username'=>$_POST['username'], \n\t\t\t\t\t\t\t':password' =>Hash::create('sha256', $_POST['password'], 'cats do not fliing')\n \t\t\t\t\t));\n\n \t/*$result = $sth->fetchAll();\n\t\tprint_r($result);*/\n\t\t$data = $sth->fetch();\n\t\t//print_r($data);\n\n\t\t$count = $sth->rowCount();\n\t\tif($count > 0)\n\t\t{\n\t\t\t//logged in\n\t\t\tSession::init();\n\t\t\tSession::set('username', $data['username'] );\n\t\t\tSession::set('loggedIn', true);\n\t\t\theader('location: ../dashboard');\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader('location: ../login');\n\t\t}\n\t\t\n\t}", "public function autualizar_dados_login()\n {\n \ttry {\n \t\t \n \t\t$con = FabricaDeConexao::conexao();\n \t\t \n \t\t$sqlquery = 'update usuario set usuario = :usuario,senha=md5(:senha),email = :email where id = :id; ';\n \t\t$stmt->$con-> prepare($sqlquery);\n \t\t$stmt->bindValue(':usuario',$dados->usuario);\n \t\t$stmt->bindValue(':senha',$dados->senha);\n \t\t$stmt->bindValue(':email',$dados->email);\n \t\t$stmt->bindValue(':id',$dados->id);\n \t\t\n \t\t$stmt->execute();\n \t\t$rowaf = $stmt->rowCount();\n \t\treturn $rowaf;\n \t}\n \tcatch (PDOException $ex)\n \t{\n \t\techo \"Erro: \".$ex->getMessage();\n \t}\n }", "function cek_login($tabel,$where) {\n\t\t$login = $this->db->get_where('user',$where);\n\t\treturn $login;\n\t}", "private function checkLogIn(){\n $query = \"SELECT etpay_01_all_users.user_id, etpay_01_all_users.FirstName, etpay_02_registered.User_name, etpay_01_all_users.ATM_number,\n etpay_02_registered.password_hashed FROM etpay_02_registered JOIN etpay_01_all_users \n ON etpay_01_all_users.user_id = etpay_02_registered.User_id\n WHERE etpay_02_registered.User_name =:userName && etpay_01_all_users.ATM_number=:ATM\";\n $this->status =$this->conn->prepare($query);\n $this->status->bindParam(':userName', $this->username, PDO::PARAM_STR, 15);\n $this->status->bindParam(':ATM', $this->atm_num, PDO::PARAM_STR, 17);\n try{\n $execute_success = $this->status->execute();\n }catch(PDOException $e){\n echo \"something went wrong\".$e->getMessage();\n }\n if(!$execute_success){\n $this->count = -1;\n $this->loginStatus = false;\n $error_type = 5;\n include_once('../includes/error/00sign_up_err.php');\n die();\n }else{\n $this->count = $this->status->rowCount();\n if ($this->status->rowCount()>0){\n $this->dataBaseContent = $this->status->fetchAll();\n $this->checkPasswordandATM();\n }else if ($this->status->rowCount()==0){\n $this->loginStatus = false;\n }\n \n }\n }", "function login($user, $pass) {\n require(\"..\\datos_conexion.php\");\n\n $conexion=mysqli_connect($db_host, $db_user, $db_pass);\n // Si habido un error en la conexion\n if (mysqli_connect_errno()) {\n echo \"Fallo al conectar con la base de datos\";\n exit();\n }\n\n mysqli_select_db($conexion, $db_name) or die (\"No se encuentra la base de datos\");\n mysqli_set_charset($conexion, \"utf8\");\n\n // Para evitar que usen la inyección SQL\n $user=mysqli_real_escape_string($conexion, $user);\n $pass=mysqli_real_escape_string($conexion, $pass);\n\n $consulta=\"SELECT * FROM usuarios WHERE user='$user' AND pass='$pass'\";\n $resultados=mysqli_query($conexion, $consulta);\n\n echo \"<p>$consulta</p>\";\n ?>\n <table>\n <thead>\n <tr>\n <th>Usuario</th>\n <th>Password</th>\n <th>Teléfono</th>\n <th>Direccion</th>\n </tr>\n </thead>\n <tbody>\n \n <?php\n while ($fila=mysqli_fetch_array($resultados, MYSQLI_ASSOC)) {\n echo \"<tr>\";\n echo \"<td>\".$fila[\"user\"].\"</td>\";\n echo \"<td>\".$fila[\"pass\"].\"</td>\";\n echo \"<td>\".$fila[\"tfno\"].\"</td>\";\n echo \"<td>\".$fila[\"direccion\"].\"</td>\";\n echo \"</tr>\";\n }\n\n mysqli_close($conexion);\n\n ?>\n </tbody>\n </table>\n<?php\n }", "public function loginValidated()\n\t\t{\n\t\t\t$campos = array('*');\n\t\t\t\n\t\t\t$pw = $this->_objCrypt->encrypt($this->_password);\n\n\t\t\t# Campos que se incluyen en la validacion WHERE DE LA SQL\n\t\t\t$field['userName'] = $this->_userName;\n\t\t\t$register = Usuario::findCustom($campos, $field);\n\n\t\t\t# Validación nombre usuario en BD\n\t\t\tif (empty($register)) {\n\t\t\t\t$json_error = array('success' => 'error', 'error' => 'error1');\n\t\t\t\t$success = json_encode($json_error);\n\t\t\t\tsetcookie(\"success\", $success, time() + 60, \"/\"); \n\t\t\t\theader('location:../views/users/login.php');\n\t\t\t}else{\n\t\t\t\t# pw que se obtiene de BD\n\t\t\t\t$pw_DB = $register[0]->getPassword();\n\n\t\t\t\t# Validacion coincidencia de contraseñas\n\t\t\t\tif ($pw !== $pw_DB) {\n\t\t\t\t\t$json_error = array('success' => 'error', 'error' => 'error2');\n\t\t\t\t\t$success = json_encode($json_error);\n\t\t\t\t\tsetcookie(\"success\", $success, time() + 60, \"/\"); \n\t\t\t\t\theader('location:../views/users/login.php');\n\t\t\t\t}else{\n\t\t\t\t\t$data_session['id_user'] \t= $register[0]->getId();\t\t\t\t\t\n\t\t\t\t\t$data_session['nombre'] \t= $register[0]->getNombre();\t\t\t\n\t\t\t\t\t$data_session['apellido'] \t\t= $register[0]->getApellido();\t\t\t\n\t\t\t\t\t$data_session['tipoUsuario']\t= $register[0]->getTipoUsuario();\t\t\t\n\t\t\t\t\t$data_session['userName'] \t\t= $register[0]->getUserName();\t\t\t\n\t\t\t\t\t$data_session['email'] \t\t = $register[0]->getEmail();\t\t\t\n\t\t\t\t\t$data_session['telFijo'] \t\t= $register[0]->getTelFijo();\t\t\t\n\t\t\t\t\t$data_session['telMovil'] \t\t= $register[0]->getTelMovil();\t\t\t\n\t\t\t\t\t$data_session['estado'] \t\t= $register[0]->getEstado();\n\t\t\t\t\t$data_session['lan']\t\t\t= $_COOKIE['lan'];\n\t\t\t\t\t\n\t\t\t\t\t$obj_Session = new Simple_sessions();\n\t\t\t\t\t$obj_Session->add_sess($data_session);\n\n\t\t\t\t\theader('location:../views/users/crearUsuario.php');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function getUserByLogin($login){\n\t$O = [];//initialiser a un Objet vide\n\t\n\t$db = connect();\n\t$stmt = mysqli_prepare($db, \"SELECT * FROM user WHERE login=?\");\n\tmysqli_stmt_bind_param($stmt, \"s\", $login);\n\tmysqli_stmt_bind_result($stmt, $id, $nom, $login, $mdp, $type);\n\tmysqli_stmt_execute($stmt);\n\t\n\twhile(mysqli_stmt_fetch($stmt)){\n\t\t$O = new User($id, $nom, $login, $mdp, $type);\n\t}\n\t\n\treturn $O;\n}", "function GetPasswordUtilisateur($login)\n{\n\tglobal $bdd;\n\t$req = $bdd->prepare(\"SELECT * FROM UTILISATEUR WHERE login= ?\");\n\t$req->execute(array($login)); //Erreur de merde car on peut pas faire login=\".$login\n\t$don = $req->fetchObject();\n\t$req2 = $don->password;\n\t$req->closeCursor();\n\treturn $req2;\n}", "function AccesoLogin($user, $pass){\n\t\t$u = $user;\n\t\t\t$this->query = \"SELECT ID, USER_LOGIN, USER_PASS, USER_ROL, LETRA, LETRA2, LETRA3, LETRA4, LETRA5, LETRA6, NUMERO_LETRAS, NOMBRE, CC, CR, aux_comp, COORDINADOR_COMP\n\t\t\t\t\t\tFROM PG_USERS \n\t\t\t\t\t\tWHERE USER_LOGIN = '$u' and USER_PASS = '$pass'\"; /*Contraseña va encriptada con MD5*/\n\t\t \t$log = $this->QueryObtieneDatos();\n\t\t \n\t\t\t$this->query = \"SELECT ID, USER_LOGIN, USER_PASS, USER_ROL, LETRA, LETRA2, LETRA3, LETRA4, LETRA5, LETRA6, NUMERO_LETRAS, NOMBRE, CC, CR, aux_comp, COORDINADOR_COMP\n\t\t\t\t\t\tFROM PG_USERS \n\t\t\t\t\t\tWHERE USER_LOGIN = '$u' and USER_PASS = '$pass'\"; /*Contraseña va encriptada con MD5*/\n\t\t \t$log2 = $this->EjecutaQuerySimple();\n\t\t \n\t\t \twhile ($tsArray = ibase_fetch_object($log2)){\n\t\t \t\t$data[]=$tsArray;\n\t\t \t}\n\n\t\t\tif(isset($log) > 0){\n\t\t\t\t/*Creamos variable de sesion*/\n\t\t\t\t\t$_SESSION['user'] = $log;\n\t\t\t\t\t//var_dump($_SESSION['user']);\n\t\t\t\t\treturn $_SESSION['user'];\t\t\t\t\n\t\t\t}else{\n\t\t\t\treturn 0;\n\t\t\t}\n\t}", "static public function ctrLoginUser(){ \n\t\t\tif(isset($_POST[\"ingUser\"])){\n\t\t\t\t//Intento de Logeo\n\t\t\t\tif((preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingUser\"]))\n\t\t\t\t && (preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"]))){\n\t\t\t\t\t\t$tabla = \"usuarios\";\t//Nombre de la Tabla\n\n\t\t\t\t\t\t$item = \"usuario\";\t\t//Columna a Verficar\n\t\t\t\t\t\t$valor = $_POST[\"ingUser\"];\n\n\t\t\t\t\t\t//Encriptar contraseña\n\t\t\t\t\t\t$crPassword = crypt($_POST[\"ingPassword\"], '$2a$08$abb55asfrga85df8g42g8fDDAS58olf973adfacmY28n05$');\n\n\t\t\t\t\t\t$respuesta = ModelUsers::mdlMostrarUsuarios($tabla, $item, $valor);\n\n\t\t\t\t\t\tif($respuesta[\"usuario\"] == $_POST[\"ingUser\"]\n\t\t\t\t\t\t\t&& $respuesta[\"password\"] == $crPassword){\n\t\t\t\t\t\t\t\tif($respuesta[\"estado\"] == '1'){\n\t\t\t\t\t\t\t\t\t//Coincide \n\t\t\t\t\t\t\t\t\t$_SESSION[\"login\"] = true;\n\t\t\t\t\t\t\t\t\t//Creamos variables de Sesion\n\t\t\t\t\t\t\t\t\t$_SESSION[\"user\"] = $respuesta;\n\t\t\t\t\t\t\t\t\t//Capturar Fecha y Hora de Login\n\t\t\t\t\t\t\t\t\tdate_default_timezone_set('America/Mexico_City');\n\t\t\t\t\t\t\t\t\t$fechaActual = date('Y-m-d H:i:s');\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t$item1 = \"ultimo_login\";\n\t\t\t\t\t\t\t\t\t$valor1 = $fechaActual;\n\t\t\t\t\t\t\t\t\t$item2 = \"id_usuario\";\n\t\t\t\t\t\t\t\t\t$valor2 = $respuesta[\"id_usuario\"];\n\n\t\t\t\t\t\t\t\t\t$ultimoLogin = ModelUsers::mdlActualizarUsuario($tabla, $item1, $valor1, $item2, $valor2);\n\n\t\t\t\t\t\t\t\t\tif($ultimoLogin)\t//Redireccionando\n\t\t\t\t\t\t\t\t\t\techo '<script>location.reload(true);</script>';\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\techo '<br><div class=\"alert alert-danger\">El usuario no esta activado</div>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\techo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelve a intentarlo</div>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t}", "function get_login($user,$pass)\n {\n\t\t\t$query = $this->db->query('SELECT * FROM tb_akun AS A\n\t\t\tLEFT JOIN tb_karyawan AS B ON A.id_karyawan = B.id_karyawan\n\t\t\tLEFT JOIN tb_jabatan AS C ON B.id_jabatan = C.id_jabatan \n\t\t\tWHERE A.user = \"'.$user.'\" AND A.pass = \"'.$pass.'\"');\n \n\t\t\tif($query->num_rows() > 0)\n {\n return $query->row();\n }\n else\n {\n return false;\n }\n }", "function login($user,$pass){\n \n try{\n include(\"../conexion/mysql.php\");\n\n $consulta=\"SELECT * FROM tbl_usuario WHERE usuario='$user' AND clave='$pass'\";\n \n $resultado= mysqli_query($link ,$consulta)or die('Error al consultar usuario');\n \n $perfil=null;\n $contador=0;\n while ($registro = mysqli_fetch_array($resultado)){\n $perfil=$registro[\"perfil\"];\n $contador++;\n }\n\n \n \n if($contador){\n \n $_SESSION[\"perfil\"]=$perfil;\n\t\t\t\t\t $_SESSION[\"usuario\"]=$user;//se almacena la sesion del usuario \n return true;\n }else{\n return false;\n }\n }catch(Exception $e){\n echo \"ERROR\" . $e->getMessage();\n }\n \n }", "static public function loginUsuario($tabla, $datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM $tabla WHERE username = :username AND password=:password\");\n\n\t\t$stmt->bindParam(\":username\", $datos[\"username\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":password\", $datos[\"password\"], PDO::PARAM_STR);\n\n\t\t$stmt -> execute();\n\t\t//retornamos un fecht por ser solo un registro\n\t\treturn $stmt->fetch();\n\n\t\t$stmt-> close();\n\n\t\t$stmt = null;\n\n\t}", "public function login($datos)\n {\n $stmt = Conexion::conectar()->prepare('SELECT *from usuarios WHERE nombre_usuario=:correo && password=:contrasena');\n $stmt->bindParam(\":correo\", $datos[\"correo\"] , PDO::PARAM_STR);\n $stmt->bindParam(\":contrasena\", $datos[\"contrasena\"] , PDO::PARAM_STR);\n if($stmt->execute())\n {\n $respuesta = $stmt->rowCount();\n $resultado =$stmt->fetch();\n //Si el resultado returna mayor que uno es que si existe el usuario asi que inicia la sesion\n if($resultado[\"count(*)\"]>0)\n {\n return \"Datos no validos\";\n }else\n {\n session_start();\n $_SESSION[\"correo\"]=$resultado[\"correo\"];\n $_SESSION[\"nombre\"]=$resultado[\"nombre\"];\n return \"Correcto\";\n }\n\n \n }else\n {\n return \"error\";\n }\n }", "function logInBD($email, $passXifrada ){\n $conn=connexioBD();\n $usuariExisteix=false;\n $sql=\"SELECT * FROM usuaris WHERE email='$email' and password='$passXifrada'\";\n if (!$resultado = $conn->query($sql)) {\n die(\"Error en la consulta\".$conn->error);\n }\n if($resultado->num_rows>=0){\n while($usuari=$resultado->fetch_assoc()){\n $usuariExisteix=true; \n }\n }\n $resultado->free();\n $conn->close();\n return $usuariExisteix;\n}", "public function getAllUsers(){\n\t\n\t\t$db = new Database();\n\t\t$conn= $db->getConn();\n\t\t$rs = $conn->query(\"select * from login\");\n\t\t$num_of_row = $rs->num_rows;\n\t\tif($num_of_row >0){\n\t\t\twhile($row = $rs->fetch_assoc()){\n\t\t\t\t$users[]=array('username'=>$row['username'],'password'=>sha1($row['password']),'email'=>$row['email'],'user_type'=>$row['user_type']);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $users;\n\t}", "function AccesoLogin($user, $pass){\n\t\t$u = $user;\n\t\t\t$this->query = \"SELECT ID, USER_LOGIN, USER_PASS, USER_ROL, LETRA, LETRA2, LETRA3, LETRA4, LETRA5, LETRA6, NUMERO_LETRAS, NOMBRE, CC, CR, aux_comp, COORDINADOR_COMP, USER_EMAIL\n\t\t\t\t\t\tFROM PG_USERS \n\t\t\t\t\t\tWHERE USER_LOGIN = '$u' and USER_PASS = '$pass'\"; /*Contraseña va encriptada con MD5*/\n\t\t \t$log = $this->QueryObtieneDatos();\n\t\t \n\t\t\t$this->query = \"SELECT ID, USER_LOGIN, USER_PASS, USER_ROL, LETRA, LETRA2, LETRA3, LETRA4, LETRA5, LETRA6, NUMERO_LETRAS, NOMBRE, CC, CR, aux_comp, COORDINADOR_COMP, USER_EMAIL\n\t\t\t\t\t\tFROM PG_USERS\n\t\t\t\t\t\tWHERE USER_LOGIN = '$u' and USER_PASS = '$pass'\"; /*Contraseña va encriptada con MD5*/\n\t\t \t$log2 = $this->EjecutaQuerySimple();\n\t\t \n\t\t \twhile ($tsArray = ibase_fetch_object($log2)){\n\t\t \t\t$data[]=$tsArray;\n\t\t \t}\n\n\t\t\tif(isset($log) > 0){\n\t\t\t\t/*Creamos variable de sesion*/\n\t\t\t\t\t$_SESSION['user'] = $log;\n $logFtc=$this->registroLogin();\n\t\t\t\t\t//var_dump($_SESSION['user']);\n\t\t\t\t\treturn $_SESSION['user'];\t\t\t\t\n\t\t\t}else{\n\t\t\t\treturn 0;\n\t\t\t}\n\t}", "function signIn(string $login, string $password): array {\n\n \n $db = Database::connect();\n $sql = \"SELECT * FROM admins WHERE login = :login ;\";\n $req = $db -> prepare ($sql);\n $req-> bindParam(':login', $login, PDO::PARAM_STR);\n $req-> execute ();\n\n $results = $req -> fetchAll();\n\n foreach($results as $item ) {\n\n if(password_verify($password, $item[\"password\"] )) {\n return $item;\n } else {\n return array();\n }\n\n }\n return array();\n}", "function login_connexion($login, $password){\n\t\t\n\t\tglobal $dbh;\n\n\t\t//recherche l'utilisateur en bdd par son username (ou email)\n\t\t$sql = \"SELECT * FROM users\n\t\t\t\tWHERE pseudo = :login OR email = :login\n\t\t\t\tLIMIT 1\";\n\n\t\t$stmt = $dbh->prepare($sql);\n\t\t$stmt->bindValue(\":login\", $login);\n\t\t$stmt->execute();\n\n\t\t$user = $stmt->fetch();\n\n\t\t$hashedPassword = hashPassword($password, $user['salt']);\n\t\tif ($hashedPassword === $user['pwd']){\n\n\t\t\tsessionStart($user);\n\t\t}\n\n\t}", "public function cekLogin($data) {\r\n\t\t\t$query=\t$this->db->query(\"select * from ms_user where user_name='\".$data['username'].\"' and password='\".$data['password'].\"'\");\r\n return $query;\r\n }", "public function login($login, $passowrd) {\n $sql = new Sql();\n \n $results = $sql->select(\"SELECT * FROM tb_usuarios WHERE deslogin = :LOGIN AND desenha = :PASSWORD\",array(\n \":LOGIN\"=>$login , \":PASSWARD\"=>$passowrd\n ));\n if (isset($results[0]) > 0) {//isset — Informa se a variável foi iniciada\n\n $row = $results[0];\n $this->setidCadastro(new DateTime($row[\"idcadastro\"]));// data e horario que foi cadastrado\n $this->setLogin($row[\"deslogin\"]);\n $this->setSenhaSenha($row[\"desenha\"]);\n $this->setUsuario($row[\"idUsuario\"]);\n \n } else {\n throw new Exception(\"Login e/ou senha invalidos\");\n }\n \n \n }", "public function login($datos)\n {\n \n $ok = true;\n $sql = \"SELECT id, nombre , mail \n FROM \" . $this->tabla . \"\n WHERE mail='\" . $datos['mail'] . \"' AND clave='\" . md5($datos['clave']) . \"';\";\n\n $bd = new Bd($this->tabla);\n\n $res = $bd->consultaSimple($sql);\n \n if (!$res) {\n $ok = false;\n } else {\n\n session_start();\n $_SESSION['id'] = $res['id'];\n $_SESSION['nombre'] = $res['nombre'];\n $ok = true;\n }\n return $ok;\n }", "function verificaLogin($errores,$db) {\r\n $email=$_POST['email'];\r\n $password=$_POST['password'];\r\n $encontreUsuario=false;\r\n $encontrePassword=false;\r\n $stmt=$db->prepare(\"SELECT * FROM jugadores where email=:email\");\r\n $stmt->bindValue(':email',$email);\r\n $stmt->execute();\r\n $consulta=$stmt->fetch(PDO::FETCH_ASSOC);\r\n if($consulta>0){\r\n $encontreUsuario=true;\r\n $contraseniaValida=password_verify($password,$consulta['password']);\r\n if($contraseniaValida){\r\n $_SESSION['usuario']=$consulta['usuario'];\r\n $_SESSION['nombre']=$consulta['name'];\r\n $_SESSION['previoLogueo']=false;\r\n $encontrePassword=true;\r\n header('Location: bienvenida.php');\r\n if(empty($errores)){\r\n if (!empty($_POST[\"guardar_clave\"])){\r\n setcookie(\"email\", $_POST['email'], time() + 365 * 24 * 60 * 60);\r\n echo $_COOKIE['email'];\r\n setcookie(\"password\", $_POST['password'], time() + 365 * 24 * 60 * 60);\r\n }\r\n else {\r\n if(isset($_COOKIE['email'])){\r\n setcookie('email',\"\");\r\n }\r\n if(isset($_COOKIE['password'])){\r\n setcookie('password',\"\");\r\n }\r\n }\r\n }\r\n }\r\n else{\r\n $errores[]=\"Verifique los datos\";\r\n return $errores;\r\n }\r\n }\r\n else {\r\n $errores[]=\"No existe el usuario\";\r\n return $errores;\r\n }\r\n /*foreach ($usuarioJSON as $usuario)\r\n {\r\n if ($usuario[\"email\"] == $_POST['email']){\r\n $encontreUsuario=true;\r\n //\r\n if(password_verify($_POST[\"password\"], $usuario[\"password\"])){\r\n $_SESSION['usuario']=$usuario['usuario'];\r\n $_SESSION['nombre']=$usuario['name'];\r\n $_SESSION['previoLogueo']=false;\r\n $encontrePassword=true;\r\n header('Location: bienvenida.php');\r\n if(empty($errores)){\r\n if (!empty($_POST[\"guardar_clave\"])){\r\n setcookie(\"email\", $_POST['email'], time() + 365 * 24 * 60 * 60);\r\n echo $_COOKIE['email'];\r\n setcookie(\"password\", $_POST['password'], time() + 365 * 24 * 60 * 60);\r\n }\r\n else {\r\n if(isset($_COOKIE['email'])){\r\n setcookie('email',\"\");\r\n }\r\n if(isset($_COOKIE['password'])){\r\n setcookie('password',\"\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if($encontreUsuario!=true){\r\n array_push($errores,'Por Favor verifique el nombre de usuario');\r\n }\r\n if ($encontrePassword!=true) {\r\n array_push($errores,'Contraseña incorrecta');\r\n }\r\n return $errores;*/\r\n}", "public function loginprofesor_post() //INICIAR SESION = http://localhost/foxweb/Api/login\n {\n $matricula = $this->post('matricula');\n $password = $this->post('password');\n $type = $this->post('type');\n\n $datauser = $this->ApiModel->flogin($matricula, $password, $type);\n\n if ($datauser != false) {\n foreach ($datauser as $data) {\n $matricula = $data['matricula'];\n $nombre = $data['nombre'];\n $apellidos = $data['apellidos'];\n }\n\n $response = ['error' => false, 'status' => parent::HTTP_OK, \"matricula\" => $matricula, \"nombre\" => $nombre, \"apellidos\" => $apellidos];\n\n $this->response($response, parent::HTTP_OK);\n\n } else {\n\n $response = ['error' => true,'status' => parent::HTTP_NOT_FOUND, 'msg' => 'Usuario o Contraseña Invalidos!'];\n\n $this->response($response, parent::HTTP_NOT_FOUND);\n\n }\n }", "public function logado($id){\n global $pdo;\n $array= array();\n $sql =\" SELECT name, email FROM usuarios WHERE id_user=:id\";\n $sql=$pdo->prepare($sql);\n $sql->bindValue(\"id\",$id);\n $sql->execute();\n\n if($sql->rowCount()>0){\n\n $array=$sql->fetch();\n\n }\n return $array; \n\n }", "public static function login($login, $senha) {\n require_once 'connection.php';\n $req = Db::getInstance()->prepare('SELECT * FROM usuario WHERE login = :login and senha = :senha');\n // the query was prepared, now we replace :id with our actual $id value\n $req->bindValue(\":login\", $login);\n $req->bindValue(\":senha\", $senha);\n $req->execute();\n\n return UsuarioDAO::popular($req->fetch());\n }", "function listarUsuarios(){\n \n $conex=Conexion::getInstance();\n $stmt = $conex->dbh->prepare(\"SELECT * FROM usuarios\"); \n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $stmt->execute();\n $listaUsuarios=[];\n while ($row = $stmt->fetch()){\n $listaUsuarios[]=array('id'=>$row['id'],'usuario'=>$row['usuario'],'nombre'=>$row['nombre'],'admin'=>$row['admin'],'password'=>$row['password']) ; \n }\n return $listaUsuarios;\n}", "public function loginTraitement(){\n\n $identifiant = $this->verifierSaisie(\"identifiant\");\n $password = $this->verifierSaisie(\"password\");\n\n //securite\n if (($identifiant != \"\") && ($password != \"\")){\n\n //on crée un objet de la classe \\W\\Security\\AuthentificationModel\n //ce qui nous permet d'utiliser la methode isValidLoginInfo\n $objetAuthentificationModel = new \\W\\Security\\AuthentificationModel;\n\n $idUser = $objetAuthentificationModel->isValidLoginInfo($identifiant, $password);\n\n if($idUser > 0){\n\n // recuperer les infos de l'utilisateur\n //requete base de donnée pour les recuperer\n //je crée un objet de la classe \\W\\Model\\UsersModel\n $objetUsersModel = new \\W\\Model\\UsersModel;\n // je retrouve les infos de la ligne grace à la colonne ID\n // La classe UsersModel herite de la classe Model je peu donc faire un find pour recupeerr les infos\n $tabUser = $objetUsersModel->find($idUser);\n\n // Je vais ajouter des infos dans la session\n $objetAuthentificationModel->logUserIn($tabUser);\n\n // recuperer l'username\n $username = $tabUser[\"username\"];\n\n\n $GLOBALS[\"loginRetour\"] = \"Bienvenue $username\";\n\n $this->redirectToRoute(\"admin_accueil\");\n }\n else{\n $GLOBALS[\"loginRetour\"] = \"Identifiant incorrects \";\n }\n }else{\n\n $GLOBALS[\"loginRetour\"] = \"Identifiant incorrects \";\n }\n }", "function login2($_login, $_password){\n $this->login($_login,$_password);\n $resultado_login = mysql_query(\"SELECT * FROM registro\n\t\tWHERE login_reg = '$_login' AND clave_reg = '$_password'\");\n $num_rows = mysql_num_rows($resultado_login);\n if (isset($num_rows)&& $num_rows == 0){\n $this->mensaje = \"Login or Password incorrect!\";\n $_SESSION['estado_temp'] = -1;\n }\n else{\n $fila_login = mysql_fetch_assoc($resultado_login);\n $this->nombre = $fila_login[\"nombre_reg\"];\n $this->apellido = $fila_login[\"apellido_reg\"];\n $this->mensaje = \"Bienvenido $this->nombre $this->apellido.\";\n $_SESSION['estado_temporal'] = 1;\n $_SESSION['login_temporal'] = $fila_login[\"login_reg\"];\n $___login = $fila_login[\"login_reg\"];\n $_SESSION['nombre_temporal'] = $fila_login[\"nombre_reg\"];\n $_SESSION['apellido_temporal'] = $fila_login[\"apellido_reg\"];\n $_SESSION['id_temporal'] = $fila_login[\"id_reg\"];\n //mysql_query (\"UPDATE usuarios SET last_login = curdate()\n //WHERE login = $___login\");\n //if($_SESSION['_url'])\n header(\"location: panel_usuario.php#next\");\n }\n }", "public function user_login($username,$password){\n $sqlQuery= \"select * from Sidhus_Login_credentials where (mobileno='\".$username.\"' or emailId ='\".$username.\"') and (password='\".$password.\"')\";\n $result=$this->con->query($sqlQuery);\n $this->con->close();\n return $result;\n }", "public function hacerLogin() {\n $user = json_decode(file_get_contents(\"php://input\"));\n\n if(!isset($user->email) || !isset($user->password)) {\n http_response_code(400);\n exit(json_encode([\"error\" => \"No se han enviado todos los parametros\"]));\n }\n \n //Primero busca si existe el usuario, si existe que obtener el id y la password.\n $peticion = $this->db->prepare(\"SELECT id,idRol,password FROM users WHERE email = ?\");\n $peticion->execute([$user->email]);\n $resultado = $peticion->fetchObject();\n \n if($resultado) {\n \n //Si existe un usuario con ese email comprobamos que la contraseña sea correcta.\n if(password_verify($user->password, $resultado->password)) {\n \n //Preparamos el token.\n $iat = time();\n $exp = $iat + 3600*24*2;\n $token = array(\n \"id\" => $resultado->id,\n \"iat\" => $iat,\n \"exp\" => $exp\n );\n \n //Calculamos el token JWT y lo devolvemos.\n $jwt = JWT::encode($token, CJWT);\n http_response_code(200);\n exit(json_encode($jwt . \"?\" . $resultado->idRol));\n \n } else {\n http_response_code(401);\n exit(json_encode([\"error\" => \"Password incorrecta\"]));\n }\n \n } else {\n http_response_code(404);\n exit(json_encode([\"error\" => \"No existe el usuario\"])); \n }\n }", "function query_login($user, $pass){\n\t$conn = connect();\n\t$sql = \"select * from users u join persons p on u.person_id=p.person_id where user_name='\".$user.\"' and password='\".$pass.\"'\";\n\tif(($statement = oci_parse($conn, $sql)) == false){\n\t\t$err = oci_error($statement);\n\t\techo htmlentities($err['message']);\n\t\treturn FALSE;\n\t}\n\n\t$exec = oci_execute($statement);\n\n\tif(!$exec){\n\t\t$err = oci_error($statement);\n\t\techo htmlentities($err['message']);\n\t\treturn FALSE;\n\t} else{\n\n\t\t//Fetches all \n\t\t$row = oci_fetch_assoc($statement);\n\t\tif (!$row){ //No results, user/pass pair invalid\n\t\t\t$ret['valid'] = FALSE;\n\t\t\t$ret['info'] = NULL;\n\t\t} else{\n\t\t\t$ret['valid'] = TRUE;\n\t\t\t$ret['info'] = $row;\n\t\t}\n\t} \n\n\toci_free_statement($statement);\n\toci_close($conn);\n\n\treturn $ret;\n}", "private function usuarios(){\n\t\tif ($_SERVER['REQUEST_METHOD'] != \"GET\") {\n\t\t\t# no se envian los usuarios, se envia un error\n\t\t\t$this->mostrarRespuesta($this->convertirJson($this->devolverError(1)), 405);\n\t\t}//es una petición GET\n\t\t//se realiza la consulta a la bd\n\t\t$query = $this->_conn->query(\n\t\t\t\"SELECT id, nombre, email \n\t\t\t FROM usuario\");\n\t\t//cantidad de usuarios\n\t\t$filas = $query->fetchAll(PDO::FETCH_ASSOC); \n \t$num = count($filas);\n \t//si devolvio un resultado, se envia al cliente\n \tif ($num > 0) { \n\t $respuesta['estado'] = 'correcto'; \n\t $respuesta['usuarios'] = $filas; \n\t $this->mostrarRespuesta($this->convertirJson($respuesta), 200); \n\t } //se envia un error \n\t $this->mostrarRespuesta($this->devolverError(2), 204);\n\t}", "public function user_login() {\n global $db;\n\n //Use path to det user\n if (isset($_POST['login'])) {\n $username = \"\";\n $log_col = $_POST['liwth'];\n $user = $_POST['uname'];\n $pwd = sha1($_POST['pwd']);\n $login = $_POST['lias'];\n\n//Chosing the col of table where to login fron\n switch ($log_col) {\n case \"user\":\n $username = \"uname\";\n break;\n case \"cuser\":\n $username = \"cuname\";\n break;\n case \"employee\":\n $username = \"employee_no\";\n break;\n case\"job_seeker\":\n $username = \"natid\";\n break;\n default :\n echo 'ERROR DETERMINING USER CATEGORY!!!';\n }\n\n// echo '.' . $user . '.' . $pwd . '.' . $login . '.';\n// $query = \"SELECT fname $username, pwd FROM $login WHERE $username='$user' AND pwd='$pwd' \";\n $query = \"SELECT $username, fname, pwd FROM $login WHERE $username = ? AND pwd = ?\";\n $type_array = array('s', 's');\n $data_array = array($user, $pwd);\n\n $res = $db->select($query, $type_array, $data_array);\n if (!empty($res)) {\n foreach ($res as $row) {\n $_SESSION[$username] = $row[$username];\n $empno = $_SESSION[$username];\n $_SESSION['fname'] = $row['fname'];\n echo 'Login success';\n echo 'SESSION NAME' . $_SESSION['fname'];\n Redirect::to(\"index.php?rdr=1\");\n }\n } else {\n $query = \"SELECT fname $username, pwd FROM $login WHERE $username = ?\";\n $type_array = array('s');\n $data_array = array($user);\n\n $res = $db->select($query, $type_array, $data_array);\n if (!empty($res)) {\n echo 'Wrong password for ' . $user;\n// echo '.' . $user . '.' . $pwd . '.' . $login . '.';\n } else {\n echo 'The username does not exist';\n }\n }\n }\n }", "function connexion($log,$pwd){\n global $bdd;\n $user = $bdd->query('SELECT * FROM user');\n while ($users = $user->fetch()){\n if(($users['login'] === $log) && ($users['password'] === $pwd)){\n $_SESSION['statut'] = 'logout';\n $_SESSION['nom'] = $users['nom'];\n $_SESSION['prenom'] = $users['prenom'];\n $_SESSION['login'] = $users['login'];\n if(isset($users['avatar'])){\n $_SESSION['avatar'] = $users['avatar'];\n }\n if($users['profil'] === 'admin'){\n return 'admin';\n }\n elseif ($users['profil'] === 'joueur'){\n return 'joueur';\n }\n }\n else{\n if($users['login'] !== $log && $users['password'] === $pwd ){\n return 'error_loging';\n }\n elseif ($users['login'] === $log && $users['password'] !== $pwd ){\n return 'error_pwd';\n }\n }\n }\n}", "public function verificarLoginPassword($obj, $conex){\r\n $usuario= trim($obj->getUsuario());\r\n $password= sha1(trim($obj->getPassword())); \r\n $sql = \"SELECT * FROM USUARIO WHERE USUARIO=:usuario AND PASSWORD=:password AND ROL='CLIENTE' AND BAJA='0' AND ESTADO='ACTIVADO'\";\r\n $consulta = $conex->prepare($sql);\r\n $consulta->execute(array(\":usuario\" => $usuario, \":password\" => $password));\r\n $result = $consulta->fetchAll();\r\n return $result;\r\n}", "public function userLogin($email,$pass){\n $password = md5($pass);\n $stmt = $this->con->prepare(\"SELECT * FROM users WHERE email=? and password=?\");\n $stmt->bind_param(\"ss\",$email,$password);\n $stmt->execute();\n $users = $stmt->get_result();\n $stmt->close();\n return $users;\n }", "static public function getLogin() {\n //resultat : chaîne de caractère qui correspond au login \n return self::$databases['login'];\n }", "public function login($login,$password){\n\t\t$sql = new Sql();\n\n\t\t$results = $sql->select(\"SELECT * FROM TB_USUARIOS WHERE deslogin=:LOGIN AND dessenha=:PASS\",array(\n\t\t\t':LOGIN'=>$login,\n\t\t\t':PASS'=>$password\n\t\t));\n\t\tif (isset($results[0])) {\n\n\t\t\t$this->setData($results[0]);\n\n\t\t}else{\n\t\t\tthrow new Exception(\"Login ou Senha invalidos\");\t\t\t\n\t\t}\n\t}", "public static function getUsersLoginMysqli($conn, $email,$pass){\n //MySQLi with Prepared Statements\n $sql = $conn->prepare(\"SELECT * FROM usuarios WHERE email=?\");\n $sql->bind_param(\"s\", $email);\n $sql->execute();\n $resultado = $sql->get_result();\n $count = mysqli_num_rows($resultado);\n if ($resultado->num_rows > 0) {\n $row = $resultado->fetch_assoc();\n \n }\n mysqli_close($conn); \n return $resultado;\n\n //\n }", "public function log_in_check($conn,$select_columns,$table,$user_column,$password_column,$username,$password){\r\n\r\n $query=\"SELECT \" .$select_columns.\" FROM \" .$table.\" WHERE \".$user_column.\" =:e AND \" .$password_column.\" =:p \";\r\n $get=$conn->prepare($query);\r\n $get->bindParam(\":e\",$username);\r\n $get->bindParam(\":p\",$password);\r\n $get->execute();\r\n $data = $get->fetchAll(PDO::FETCH_ASSOC); \r\n return $data; \r\n }", "public function logUser(){\r\n\t\t$email = $_POST['login_email'];\r\n\t\t$password = $_POST['login_password'];\r\n\r\n\t\t$sql = \"SELECT * FROM users where email = ? and password = ? \";\r\n\t\t$query = $this->db->prepare($sql);\r\n\t\t$query->execute([$email,$password]);\r\n\t\t//rezultat smestamo u promenljivu loggedUser i stavljamo samo fetch zzbog toga sto vraca jedan rezultat\r\n\r\n\t\t$loggedUser = $query->fetch(PDO::FETCH_OBJ);\r\n\r\n\t\tif ($loggedUser != NULL) {\r\n\t\t\t//dodeljujemo sesiji celog usera (OBJEKAT)\r\n\t\t\t$_SESSION['loggedUser'] = $loggedUser;\r\n\t\t\t//ovde dodeljujemo usera iz baze varijabli login_result!!!\r\n\t\t\t$this->login_result = $loggedUser;\r\n\t\t}\r\n\t}", "public static function get($login) {\n\t\t\n\t\t// verification a faire\n\t\t$conn = Connection::get ();\n\t\t$result = array ();\n\t\t\n\t\t// requete sql preparé\n\t\t$request = $conn->prepare ( \"SELECT id_admin, identifiant_admin, mdp_admin, nom_admin, prenom_admin FROM admin WHERE identifiant_admin=:login\" );\n\t\t$request->execute ( array (\n\t\t\t\t'login' => $login \n\t\t) );\n\t\t\n\t\twhile ( $row = $request->fetch () ) {\n\t\t\t$result [] = $row;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function login($account, $pwd) {\n global $db;\n\n $query = \"SELECT * FROM employees WHERE user_account = '\". $account.\"'\";\n $statement = $db->prepare($query);\n try {\n $statement->execute();\n } catch (Exception $ex) {\n //********************************************\n }\n $user = $statement->fetchAll();\n $statement->closeCursor();\n if ($user == null) {\n return \"0\";\n } else {\n foreach ($user as $key) {\n if ($pwd ==$key['password']) {\n return $key['permissions'].$key['first_name'].\" \".$key['last_name'];\n }\n }\n }\n return \"-1\";\n}", "function cek_login($table,$where){\n\t\treturn $this->db->get_where($table,$where); //cek database\n\t}", "public function getdatosUsuarios(){\n\t\t$bd = new bd();\n\t\t$result = $bd->doSingleSelect($this->u_table,\"id = {$this->id}\");\n\t\tif($result){\n\t\t\t$this->datosUsuario($result[\"direccion\"], $result[\"telefono\"], $result[\"descripcion\"], $result[\"estados_id\"], $result[\"facebook\"], $result[\"twitter\"],$result[\"website\"],$result[\"certificado\"],$result[\"id_sede\"]);\n\t\t\t$this->id = $result[\"id\"];\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "private function getLoggedIn($username,$password){\r\n\t\t\t$result = $this->myDatabase->prepare(\"SELECT username,password FROM users WHERE username LIKE $username\");\r\n\t\t\t$result->bind_Param('s', $testResult);\r\n\t\t\t$result->execute();\r\n\t\t\t$result = $result->get_result();\r\n\t\t\tif($result){\r\n\t\t\t\tif($result->num_rows > 0){\r\n\t\t\t\t\t$logIn = array();\r\n\t\t\t\t\tfor ($i=0; $i < $result->num_rows; $i++) { \r\n\t\t\t\t\t\t$row = $result->fetch_assoc();\r\n\t\t\t\t\t\tarray_push($LogIn, $row);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$dbLoginUsername = $logIn[0];\r\n\t\t\t\t\t$dbLoginPassword = $logIn[1];\r\n\t\t\t\t\tif ($dbLoginUsername == $username & $dbLoginPassword == $password){\r\n\t\t\t\t\t\techo \"you loggin in\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t//username, password not right\r\n \t\t\techo \"you didn't login, username or password incorrect\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t//If the SQL failed\r\n \t$this->statuscode = 400;\r\n \techo 'If the SQL failed';\r\n\t\t\t}\t\r\n\t\t}", "public function get_usuario_auditor($login=''){\n\n $this->db->select('*');\n $this->db->from('siava.tbl_params');\n $this->db->where('sec',1);\n $res1 = $this->db->get();\n $auditor ='';\n \n if ($res1->num_rows() > 0){\n \n $res2 = $res1->result_array();\n $result = $res2[0]['valor'];\n \n $sep_user = explode(\",\",$result);\n $count_us = count($sep_user);\n \n for($i=0;$i<$count_us;$i++){\n \n if($login == $sep_user[$i]){\n $auditor = $sep_user[$i];\n break;\n }else{\n $auditor = 'Nohay';\n }\n \n \n \n }\n // var_dump($auditor);\n \n }\n \n \n return $auditor;\n\n\n }", "function find_login_password(string $login, string $password){\n $json = file_get_contents(ROUTE_DIR.'data/user.data.json');\n\n // 2 convertir le json en tableau\n $arrayuser = json_decode($json ,true);\n foreach ($arrayuser as $user) {\n if($user['login']==$login && $user['password']==$password){\n\n return $user;\n }\n }\n return[];\n}", "public function Logueo()\n{\nself::SetNames();\nif(empty($_POST[\"usuario\"]) or empty($_POST[\"password\"]))\n{\n\techo \"<div class='alert alert-danger'>\";\n\techo \"<span class='fa fa-info-circle'></span> LOS CAMPOS NO PUEDEN IR VACIOS\";\n\techo \"</div>\";\t\t\n\texit;\n}\n$pass = sha1(md5($_POST[\"password\"]));\n$sql = \" SELECT * FROM usuarios WHERE usuario = ? and password = ? and status = 'ACTIVO'\";\n$stmt = $this->dbh->prepare($sql);\n$stmt->execute( array( $_POST[\"usuario\"], $pass));\n$num = $stmt->rowCount();\nif($num == 0)\n{\n\techo \"<div class='alert alert-danger'>\";\n\techo \"<span class='fa fa-info-circle'></span> LOS DATOS INGRESADOS NO EXISTEN\";\n\techo \"</div>\";\t\t\n\texit;\n}\nelse\n{\n\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[]=$row;\n\t\t}\n\t\t\n\t\t$_SESSION[\"codigo\"] = $p[0][\"codigo\"];\n\t\t$_SESSION[\"cedula\"] = $p[0][\"cedula\"];\n\t\t$_SESSION[\"nombres\"] = $p[0][\"nombres\"];\n\t\t$_SESSION[\"nrotelefono\"] = $p[0][\"nrotelefono\"];\n\t\t$_SESSION[\"cargo\"] = $p[0][\"cargo\"];\n\t\t$_SESSION[\"email\"] = $p[0][\"email\"];\n\t\t$_SESSION[\"usuario\"] = $p[0][\"usuario\"];\n\t\t$_SESSION[\"nivel\"] = $p[0][\"nivel\"];\n\t\t$_SESSION[\"status\"] = $p[0][\"status\"];\n\t\t\n\t\t$query = \" insert into log values (null, ?, ?, ?, ?, ?); \";\n\t\t$stmt = $this->dbh->prepare($query);\n\t\t$stmt->bindParam(1,$a);\n\t\t$stmt->bindParam(2,$b);\n\t\t$stmt->bindParam(3,$c);\n\t\t$stmt->bindParam(4,$d);\n\t\t$stmt->bindParam(5,$e);\n\t\t\n\t\t$a = strip_tags($_SERVER['REMOTE_ADDR']);\n\t\t$b = strip_tags(date(\"Y-m-d h:i:s\"));\n\t\t$c = strip_tags($_SERVER['HTTP_USER_AGENT']);\n\t\t$d = strip_tags($_SERVER['PHP_SELF']);\n\t\t$e = strip_tags($_POST[\"usuario\"]);\n\t\t$stmt->execute();\n\n\t\t\n\t\tswitch($_SESSION[\"nivel\"])\n\t\t{\n\t\t\tcase 'ADMINISTRADOR':\n\t\t\t$_SESSION[\"acceso\"]=\"administrador\";\n\n\t\t\t?>\n\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\twindow.location=\"panel\";\n\t\t\t</script>\n\n\t\t\t<?php\n\t\t\tbreak;\n\t\t\tcase 'CAJERO':\n\t\t\t$_SESSION[\"acceso\"]=\"cajero\";\n\t\t\t?>\n\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\twindow.location=\"panel\";\n\t\t\t</script>\n\n\t\t\t<?php\n\t\t\tbreak;\n\t\t\tcase 'COCINERO':\n\t\t\t$_SESSION[\"acceso\"]=\"cocinero\";\n\t\t\t?>\n\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\twindow.location=\"panel\";\n\t\t\t</script>\n\n\t\t\t<?php\n\t\t\tbreak;\n\t\t\tcase 'MESERO':\n\t\t\t$_SESSION[\"acceso\"]=\"mesero\";\n\t\t\t?>\n\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\twindow.location=\"panel\";\n\t\t\t</script>\n\n\t\t\t<?php\n\t\t\tbreak;\n\t\t\tcase 'REPARTIDOR':\n\t\t\t$_SESSION[\"acceso\"]=\"repartidor\";\n\t\t\t?>\n\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\twindow.location=\"panel\";\n\t\t\t</script>\n\n\t\t\t<?php\n\t\t\tbreak;\n\t\t//}\n\t}\n}\n\t//print_r($_POST);\n\texit;\n}", "function modeloUserGetAll (){\n // Genero lo datos para la vista que no muestra la contraseña ni los códigos de estado o plan\n // sino su traducción a texto\n $db = AccesoDatos::getModelo();\n $tusuarios = $db->getUsuarios();\n foreach ($tusuarios as $clave=>$user){\n \n $tabla[$user->id]= ['nombre'=>$user->nombre,\n 'correo'=>$user->correo,\n 'plan'=>PLANES[$user->plan],\n 'estado'=>ESTADOS[$user->estado],\n ];\n }\n return $tabla;\n}", "public function loginalumno_post() //INICIAR SESION = http://localhost/foxweb/Api/login\n {\n $matricula = $this->post('matricula');\n $password = $this->post('password');\n $type = $this->post('type');\n\n $datauser = $this->ApiModel->flogin($matricula, $password, $type);\n\n if ($datauser != false) {\n foreach ($datauser as $data) {\n $matricula = $data['matricula'];\n $nombre = $data['nombre'];\n $apellidos = $data['apellidos'];\n $num_grupo = $data['num_grupo'];\n }\n\n $response = ['error' => false, 'status' => parent::HTTP_OK, \"matricula\" => $matricula, \"nombre\" => $nombre, \"apellidos\" => $apellidos, \"num_grupo\" => $num_grupo];\n\n $this->response($response, parent::HTTP_OK);\n\n } else {\n\n $response = ['error' => true,'status' => parent::HTTP_NOT_FOUND, 'msg' => 'Usuario o Contraseña Invalidos!'];\n\n $this->response($response, parent::HTTP_NOT_FOUND);\n\n }\n }" ]
[ "0.80781835", "0.74761945", "0.73945075", "0.7313413", "0.7231224", "0.72130466", "0.7125053", "0.70997417", "0.70988566", "0.70779276", "0.7067186", "0.7058312", "0.7028614", "0.70137393", "0.701358", "0.6986614", "0.6949664", "0.6936137", "0.6894268", "0.6886269", "0.68718755", "0.6871054", "0.6856238", "0.68542737", "0.68528163", "0.6850544", "0.68491423", "0.68451405", "0.6835955", "0.6832799", "0.6829883", "0.6825978", "0.68254083", "0.6821153", "0.6817035", "0.6811738", "0.6804302", "0.6800939", "0.67928916", "0.6782353", "0.67795616", "0.67668146", "0.675162", "0.675162", "0.675162", "0.67293364", "0.672484", "0.6714742", "0.67132115", "0.67118615", "0.6709386", "0.67050886", "0.6704147", "0.66841424", "0.66834545", "0.6678241", "0.66733176", "0.6659991", "0.6646882", "0.66459054", "0.66396207", "0.66356045", "0.66350573", "0.6620035", "0.6618203", "0.6617011", "0.6616003", "0.6606185", "0.65933305", "0.6578501", "0.65726995", "0.6571191", "0.6566834", "0.6549578", "0.6548884", "0.65435636", "0.65374565", "0.6536281", "0.6527494", "0.65255827", "0.6525127", "0.6524263", "0.6521372", "0.651875", "0.65159744", "0.6515496", "0.6502763", "0.64975786", "0.64961183", "0.649141", "0.648513", "0.64791304", "0.6476231", "0.6476043", "0.6466406", "0.6459242", "0.64518267", "0.6451781", "0.64489573", "0.6447681", "0.64437026" ]
0.0
-1
metodo encargado de mostrar el sigiente registro de un conjunto de datos
public function Siguiente($result) { try { //por medio del objeto de la clase datos llamamos el metodo encargado de hacer un salto al sigiente registro de un conjunto de datos return $this->cn->resultados($result); } catch(PDOException $e) { $this->log->write('Error en la clase Departamento metodo siguiente '.$e->getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRecordatorio() {\n $recordatorio = $this->_db->query(\"SELECT deuda.Id_cliente as dni, nombre as nombre, apellidos as apellido, \n direccion as direccion, telefono as telefono, celular as celular, total as totalDeuda\n FROM pagos as pagos \n INNER JOIN venta as venta ON venta.Id_deuda = pagos.Id_deuda\n INNER JOIN productoventa as prodventa ON venta.cod_busqueda = prodventa.cod_busqueda\n INNER JOIN deuda as deuda ON deuda.Id_deuda = venta.Id_deuda\n INNER JOIN cliente as cliente ON cliente.Id_cliente = deuda.Id_cliente where pagos.estado >= 0 and pagos.Fecha_Pago = CURDATE()\n ORDER BY deuda.Fecha_deuda\"\n );\n return $recordatorio->fetchall();\n }", "function recuperarDatos(){\r\n\t\t\t\t$this->objFunc=$this->create('MODEmpresa');\r\n\t\t\t\t$objetoFuncion = $this->create('MODEmpresa');\r\n\t\t\t\t$this->res=$this->objFunc->insertarEmpresa($this->objParam);\t//esta bien\t\t\t\r\n\t\t\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\t\t}", "public function mostrar(){\n $conectar=Conectar::conexion();\n $sql=\"SELECT i.idingreso, DATE(i.fecha_hora) as fecha, i.idproveedor,\n p.nombre as proveedor, u.idusuario, u.nombre as usuario, i.tipo_comprobante,\n i.serie_comprobante, i.num_comprobante,i.total_compra,i.impuesto,i.estado\n FROM ingreso i INNER JOIN persona p ON i.idproveedor=p.idpersona\n INNER JOIN usuario u ON i.idusuario=u.idusuario\n ORDER BY i.idingreso desc\";\n $sql=$conectar->prepare($sql);\n $sql->execute();\n\n while ($resultado = $sql->fetch()) {\n $this->mostrar[]=$resultado;\n }\n return $this->mostrar;\n }", "function __toString() {\n\t\t \t\n\t\t return \"(\" . $this->id . \", \" . $this->nom_usuari . \", \" . \n \t$this->contrasenya . \", \" . $this->email . \",\" . $this->admin . \")\";\n }", "public function mostrarInfo()\n {\n // $datos.= \"Cuatrimestre\".$this->cuatrimestre;\n // return parent::mostrarInfo().\" \".$datos;\n }", "function ListaCompetenciaDeUsuario(){\n \n include(\"../modelo/cnx.php\");\n $cnx = pg_connect($entrada) or die (\"Error de conexion. \". pg_last_error());\n session_start();\n $id_usuario=$_SESSION[\"id_usuario\"];\n $seleccionar=\"SELECT competencia.id_competencia, competencia.nombre_competencia, fecha_inicio_competencia, fecha_fin_competencia\n FROM equipo_usuario, equipo, competencia_equipo, competencia, usuario\n where competencia.id_competencia=competencia_equipo.id_competencia and\n competencia_equipo.id_equipo=equipo.id_equipo and \n equipo.id_equipo=equipo_usuario.id_equipo and\n equipo_usuario.id_usuario='$id_usuario'\n group by competencia.id_competencia, competencia.nombre_competencia, fecha_inicio_competencia, fecha_fin_competencia\n order by competencia.id_competencia desc\";\n \n $result = pg_query($seleccionar) or die('ERROR AL INSERTAR DATOS: ' . pg_last_error());\n $columnas = pg_numrows($result);\n $this->formu.='<table><tr><td>Identificador</td>';\n $this->formu.='<td>Nombre Competencia</td>';\n $this->formu.='<td>Fecha Inicio</td>';\n $this->formu.='<td>Fecha Final</td></tr>';\n for($i=0;$i<=$columnas-1; $i++){\n $line = pg_fetch_array($result, null, PGSQL_ASSOC);\n $this->formu.='<tr> \n <td>'.$line['id_competencia'].'</td> \n <td>'.$line['nombre_competencia'].'</td>\n <td>'.$line['fecha_inicio_competencia'].'</td>\n <td>'.$line['fecha_fin_competencia'].'</td>\n </tr>';\n }\n $this->formu.='</table>';\n\n return $this->formu; \n }", "public function visualizzazione(){\n $nameColumn = $this->getColumnName();\n $tuple = $this->read();\n foreach($nameColumn as $nome){\n $x = ' <td> '. $nome . ' </td> ';\n echo $x;\n }\n \n foreach($tuple as $ris){\n $str ='<tr> <td> '.$ris->getId(). ' </td> '.\n '<td> '.$ris->getNome(). '</td>'.\n '<td> '.$ris->getUsername(). '</td>'.\n '<td> '.$ris->getPassword(). '</td>'.\n '<td> '.$ris->getEmail(). '</td>'.\n '<td> '.$ris->getMuseo(). '</td>'.\n '</tr>';\n echo $str;\n };\n }", "public function __toString() {\n\t\treturn \"BusquedaSubastasBean: idNotificacion = \".$this->idNotificacion.\",\n\t\t \t\tidEstadoNotificacion = \".$this->idEstadoNotificacion.\",\n\t\t\t\tidUsuarioOrigen = \".$this->idUsuarioOrigen.\",\n\t\t\t\tidUsuarioDestino = \".$this->idUsuarioDestino.\",\n\t\t\t\ttextoNot = \".$this->textoNot.\",\n\t\t\t\tasuntoNot = \".$this->asuntoNot;\n\t}", "public function getEduardoShow($data)\n {\n $sql = \"SELECT * FROM \".$this->tabla.\" WHERE id=\".$data->data;\n $tmp=$this->executeQuery($sql);\n $tablas['datos'] = $tmp[0];\n $tablas['error'] = 0;\n return $tablas;\n }", "public function mostrarDados(){\n\t\t$sql = \"SELECT cliente.cod_cliente, cliente.nome_cliente, categoria.cod_categoria, categoria.desc_categoria, servico.cod_servico, servico.desc_servico, servico.foto\t\n\t\t\t\tFROM cliente INNER JOIN (categoria INNER JOIN servico ON categoria.cod_categoria = servico.cod_categoria) ON cliente.cod_cliente = servico.cod_cliente\n\t\t\t\twhere cod_servico = '$this->cod_servico'\";\n\t\t$qry= self:: executarSQL($sql);\n\t\t$linha = self::listar($qry);\n\t\t\n\t\t$this-> cod_servico = $linha['cod_servico'];\n\t\t$this-> cod_categoria = $linha['cod_categoria'];\n\t\t$this-> desc_categoria = $linha['desc_categoria'];\n\t\t$this-> cod_cliente = $linha['cod_cliente'];\n\t\t$this-> nome_cliente = $linha['nome_cliente'];\n\t\t$this-> desc_servico = $linha['desc_servico'];\n\t\t$this-> foto = $linha['foto'];\n\t}", "public function mostrar_insertar() {\r\n\t\t\t$this -> pantalla_edicion('insertar'); \r\n\t\t }", "function toString(){\n echo \"<br><br><br>\";\n echo \"<h2>Maestros:</h2>\";\n /* Conexion con base de datos. */\n $conexion = new PDO('mysql:host=localhost;dbname=tarea02;charset=UTF8', 'root', '');\n $conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n\n if ($conexion){\n \n /* Se define la consulta SQL */\n $consulta = \"SELECT * FROM maestro;\"; \n $stmt = $conexion->prepare($consulta);\n $stmt->execute(); \n \n $arr = $stmt->fetchAll(PDO::FETCH_ASSOC);\n foreach ($arr as $row) {\n echo $row['noEmpleado'];\n echo \" \";\n echo $row['carrera'];\n echo \" \"; \n echo $row['nombre'];\n echo \" \"; \n echo $row['telefono'];\n echo \"<br>\"; \n \n \n }\n \n\n } else {\n echo \"Hubo un problema con la conexión\";\n }\n }", "public function reportar_consumo() {\n return $this->db\n ->select(format_select(array(\n 'cirugia.idCirugia' => 'idCirugia',\n 'empleado.idEmpleado' => 'idEmpleado',\n 'empleado.matricula' => 'matricula',\n 'empleado.nombre' => 'nombre',\n 'empleado.apellido_paterno' => 'a_paterno',\n 'empleado.apellido_materno' => 'a_materno',\n 'especialidad.nombre' => 'especialidad',\n 'cirugia.fecha' => 'fecha',\n 'quirofano.nombre' => 'quirofano'\n )))\n ->join('usuario','tipo_usuario.idTipo_Usuario = usuario.idTipo_Usuario')\n ->join('empleado','empleado.idEmpleado = usuario.idEmpleado')\n ->join('departamento','departamento.idDepartamento = tipo_usuario.idDepartamento')\n ->join('especialidad','especialidad.idEspecialidad = departamento.idEspecialidad')\n ->join('proceso_tipo_usuario','proceso_tipo_usuario.idTipo_Usuario = tipo_usuario.idTipo_Usuario')\n ->join('proceso','proceso.idProceso = proceso_tipo_usuario.idProceso')\n ->join('cirugia','cirugia.idProceso = proceso.idProceso AND cirugia.idquirofano > 0 AND cirugia.status = \"1\"')\n ->join('quirofano','cirugia.idQuirofano = quirofano.idQuirofano')\n ->get('tipo_usuario')\n ->result_array();\n }", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "public function mostra(){\n echo \"<tr><td>\".$this->codi.\"</td><td>\".$this->nom.\"</td></tr>\";\n }", "public function __toString(){\n\t\t\t//imprimir resultados\n\t\t\treturn \"<h2>Resultados</h2> <b>Edad: </b>\" .$this->edad. \" a&ntilde;os<br> <b>Altura: </b>\" .$this->altura. \" cm<br> <b>Peso:</b> \" .$this->peso. \" kg<br> <b>IMC:</b> \"\n\t\t\t. self::imc();// . self::registro() ;\t//Llamar a un metodo declarado dentro de la misma clase\n\t\t}", "public function buscarEstudiante() {\n\n $sql = \"SELECT D.tipodocumento, D.nombrecortodocumento, E.codigocarrera,\n EG.numerodocumento, EG.idestudiantegeneral, EG.nombresestudiantegeneral, \n EG.apellidosestudiantegeneral, EG.expedidodocumento, EG.codigogenero, \n EG.ciudadresidenciaestudiantegeneral, EG.fechanacimientoestudiantegeneral, EG.direccionresidenciaestudiantegeneral, \n EG.telefonoresidenciaestudiantegeneral, EG.emailestudiantegeneral, D.nombredocumento\n\t\tFROM \n estudiantegeneral EG\n\t\tINNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n\t\tINNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n\t\tWHERE\n E.codigoestudiante = ? \";\n /* FIN MODIFICACION */\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n $this->setFechaNacimiento($this->persistencia->getParametro(\"fechanacimientoestudiantegeneral\"));\n $this->setDireccion($this->persistencia->getParametro(\"direccionresidenciaestudiantegeneral\"));\n $this->setTelefono($this->persistencia->getParametro(\"telefonoresidenciaestudiantegeneral\"));\n $this->setEmail($this->persistencia->getParametro(\"emailestudiantegeneral\"));\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $this->setCarrera($carrera);\n\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n $tipoDocumento->setNombreDocumento($this->persistencia->getParametro(\"nombredocumento\"));\n\n $genero = new Genero(null);\n $genero->setCodigo($this->persistencia->getParametro(\"codigogenero\"));\n\n $ciudad = new Ciudad(null);\n $ciudad->setId($this->persistencia->getParametro(\"ciudadresidenciaestudiantegeneral\"));\n\n $this->setCiudad($ciudad);\n $this->setGenero($genero);\n $this->setTipoDocumento($tipoDocumento);\n }\n\n $this->persistencia->freeResult();\n }", "function mostrarRegistro($infoProyecto=\"\") {\r\n if($infoProyecto!=\"\")\r\n {\r\n $planEstudio=$infoProyecto[0]['PLAN'];\r\n $codProyecto=$infoProyecto[0]['PROYECTO'];\r\n $nombreProyecto=$infoProyecto[0]['NOMBRE'];\r\n\r\n $variable=array($codProyecto,$nombreProyecto,$planEstudio);\r\n }else if($_REQUEST['codProyecto'] && $_REQUEST['planEstudio'])\r\n {\r\n $codProyecto=$_REQUEST['codProyecto'];\r\n $planEstudio=$_REQUEST['planEstudio'];\r\n $nombreProyecto=isset($_REQUEST['nombreProyecto']);\r\n $variable=array($codProyecto,$nombreProyecto,$planEstudio);\r\n }else\r\n {\r\n $cadena_sql=$this->sql->cadena_sql(\"proyectos_curriculares\",$this->usuario);//echo $cadena_sql;exit;\r\n $resultado_datosCoordinador=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\" );\r\n\r\n $planEstudio=$resultado_datosCoordinador[0]['PLAN'];\r\n $codProyecto=$resultado_datosCoordinador[0]['PROYECTO'];\r\n $nombreProyecto=$resultado_datosCoordinador[0]['NOMBRE'];\r\n\r\n $variable=array($codProyecto,$nombreProyecto,$planEstudio);\r\n }\r\n\r\n $this->menuCoordinador($variable);\r\n \r\n }", "function mostrarDatos($resultados){\n global $CampoNombre;\n global $CampoContrasena;\n global $CampoCorreo;\n global $Repetido;\n //captura de datos \n $CampoNombre=$_POST['Camponombre'];\n $CampoContrasena=$_POST['Campocedula'];\n $CampoCorreo=$_POST['Campocorreo'];\n //echo '$CampoNombre ','$CampoContrasena ','$CampoCorreo'; \n //este if recorre todo e array que se creo con la columna correo de la bd\n if($resultados !=NULL) {//en vez de imprimir los comparo con el ingresado en formulario\n if($CampoCorreo==$resultados['Correo']){\n $Repetido=$Repetido+1;\n echo 'El correo esta repetido :( <br>'; \n } \n }//echo 'reps: ',$Repetido,\"<br>\"; \n }", "function toString()\n {\n return \"Data rinnovo: \".$this->date.\"\\n\".\n \"Stato: \".$this->stato;\n }", "function showUD() {\n $rows = self::$db->getRows(\"SELECT * FROM usuario where tipousuario = 2\"); \n $arrayUsuario= array(); \n foreach ($rows as $c){\n $aux = new Usuario($c{'idusuario'},$c{'usuario'},$c{'contrasenia'},$c{'tipousuario'});\n array_push($arrayUsuario, $aux);\n }\n return $arrayUsuario; \n }", "public function displayDatoSeguimiento($etapa_id){\n try{\n log_message(\"INFO\", \"Obteniendo valor de campo para etapa: \".$etapa_id, FALSE);\n log_message(\"INFO\", \"Nombre campo: \".$this->nombre, FALSE);\n\n $dato = Doctrine::getTable('DatoSeguimiento')->findByNombreHastaEtapa($this->nombre,$etapa_id);\n if(!$dato ){\n //Se deben crear\n $dato = new DatoSeguimiento();\n $dato->nombre = $this->nombre;\n $dato->etapa_id = $etapa_id;\n $dato->valor = NULL;\n }\n log_message(\"INFO\", \"Nombre dato: \".$dato->nombre, FALSE);\n log_message(\"INFO\", \"Valor dato: .\".$dato->valor.\".\", FALSE);\n log_message(\"INFO\", \"this->valor_default: \".$this->valor_default, FALSE);\n if(isset($this->valor_default) && strlen($this->valor_default) > 0 && $dato->valor === NULL){\n $regla=new Regla($this->valor_default);\n $valor_dato=$regla->getExpresionParaOutput($etapa_id);\n $dato->valor = $valor_dato;\n $dato->save();\n }else{\n $valor_dato = $dato->valor;\n }\n\n log_message(\"INFO\", \"valor_default: \".$valor_dato, FALSE);\n\n return $valor_dato;\n }catch(Exception $e){\n log_message('error',$e->getMessage());die;\n throw $e;\n }\n }", "function tablaDatos(){\n\n $editar = $this->Imagenes($this->PrimaryKey,0);\n $eliminar = $this->Imagenes($this->PrimaryKey,1);\n $sql = 'SELECT\n C.id_componentes,\n P.descripcion planta,\n S.descripcion secciones,\n E.descripcion Equipo,\n C.`descripcion` Componente\n ,'.$editar.','.$eliminar.' \nFROM\n `componentes` C\nINNER JOIN\n equipos E ON E.id_equipos = C.`id_equipos`\nINNER JOIN\n secciones S ON S.id_secciones = E.id_secciones\nINNER JOIN\n plantas P ON P.id_planta = S.id_planta\nWHERE\n \n C.`activo` = 1';\n \n $datos = $this->Consulta($sql,1); \n if(count($datos)){\n $_array_formu = array();\n $_array_formu = $this->generateHead($datos);\n $this->CamposHead = ( isset($_array_formu[0]) && is_array($_array_formu[0]) )? $_array_formu[0]: array();\n \n $tablaHtml = '<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"panel panel-default\">\n <div class=\"panel-body recargaDatos\" style=\"page-break-after: always;\">\n <div class=\"table-responsive\">';\n $tablaHtml .='';\n \t\t$tablaHtml .= $this->print_table($_array_formu, 7, true, 'table table-striped table-bordered',\"id='tablaDatos'\");\n \t\t$tablaHtml .=' </div>\n </div>\n </div>\n </div>\n </div>\n ';\n }else{\n $tablaHtml = '<div class=\"col-md-8\">\n <div class=\"alert alert-info alert-dismissable\">\n <button class=\"close\" aria-hidden=\"true\" data-dismiss=\"alert\" type=\"button\">×</button>\n <strong>Atenci&oacute;n</strong>\n No se encontraron registros.\n </div>\n </div>';\n }\n \n if($this->_datos=='r') echo $tablaHtml;\n else return $tablaHtml;\n \n }", "public function Mostrar()\n\t{\n\t\t$data_table = $this->data_source->ejecutarConsulta(\"SELECT * FROM noticias order by 1 desc\");\n\n\t\treturn $data_table;\n\t}", "public function mostrar_usuaris(){\n $sql = \"SELECT usuaris.id AS id, usuaris.nom AS nom, usuaris.cognoms AS cognoms, usuaris.email AS email,\n usuaris.idrol AS idrol, rols.descrip AS descrip FROM usuaris INNER JOIN rols ON usuaris.idrol = rols.id\";\n \n $query=$this->db->prepare($sql);\n $query->execute();\n $res=$query->fetchAll();\n return $res;\n }", "function getDatos(){\n $res = $this->Consulta('SELECT C.*, P.id_planta FROM '.$this->Table .' C\n INNER JOIN\n equipos E ON E.id_equipos = C.`id_equipos`\n INNER JOIN\n secciones S ON S.id_secciones = E.id_secciones\n INNER JOIN\n plantas P ON P.id_planta = S.id_planta\n \n WHERE '.$this->PrimaryKey.' = '.$this->_datos);\n $resultado = $res[0];\n // $resultado = array_map('utf8_encode',$resultado);\n \n print_r( json_encode( $resultado ) );\n }", "function consultarOtro(){\n $queryconsultarOtro=$this->mdlOrdenes->consultarOtro(base64_decode($_POST[\"idAtencion\"]));\n echo json_encode($queryconsultarOtro);\n }", "public function __toString() {\n\t\t$infoUsuario = $this->usr.\": \";\n\t\t$infoUsuario .= $this->nombre.\" \";\n\t\t$infoUsuario .= $this->ap_paterno.\" \";\n\t\t$infoUsuario .= $this->ap_materno.\"<br />\".PHP_EOL;\n\t\t$infoUsuario .= \"Sucursal: \". $this->sucursal;\n\t\t$infoUsuario .= \" Tipo: \" . $this->tipo_usuario;\n\t\t$infoUsuario .= \" Seguridad: \" . $this->permisos();\n\n\t\treturn $infoUsuario;\n\t}", "public function mostrar(){\n\t\t\t$Oconn = new conexaoClass();\n\t\t\t$Oconn -> abrir_conexao();\n\t\t\t$sql = \"SELECT * FROM noticias\";\n\t\t\t$conn = $Oconn -> getconn();\n\t\t\t$this -> resultado = $conn -> query($sql);\n\t\t}", "function RellenaDatos()\n{\n\t//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM EDIFICIO\n\t\t\tWHERE (\n\t\t\t\t(CODEDIFICIO = '$this->codedificio') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\tif (!$resultado = $this->mysqli->query($sql)) //Si la consulta no se ha realizado correctamente, mostramos mensaje de error\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devolvemos el mensaje\n\t}\n\telse //Si no, convierte el resultado en array\n\t{\n\t\t$tupla = $resultado->fetch_array(); //guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "public function mostrarTablaAsegurados() {\n\n\t\t$item = null;\n\t\t$valor = null;\n\n\t\t$asegurados = ControladorAsegurados::ctrMostrarAsegurados($item, $valor);\n\n\t\tif ($asegurados == null) {\n\t\t\t\n\t\t\t$datosJson = '{\n\t\t\t\t\"data\": []\n\t\t\t}';\n\n\t\t} else {\n\n\t\t\t$datosJson = '{\n\t\t\t\"data\": [';\n\n\t\t\tfor ($i = 0; $i < count($asegurados); $i++) { \n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LA EMPRESA\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemEmpleador = \"id\";\n\t\t\t\t$valorEmpleador = $asegurados[$i][\"id_empleador\"];\n\n\t\t\t\t$Empleadores = ControladorEmpleadores::ctrMostrarEmpleadores($itemEmpleadore, $valorEmpresa);\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS EL TIPO DE SEGURO\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemSeguro = \"id\";\n\t\t\t\t$valorSeguro = $asegurados[$i][\"id_seguro\"];\n\n\t\t\t\t$seguros = ControladorSeguros::ctrMostrarSeguros($itemSeguro, $valorSeguro);\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LAS LOCALIDADES\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemLocalidad = \"id\";\n\t\t\t\t$valorLocalidad = $asegurados[$i][\"id_localidad\"];\n\n\t\t\t\t$localidades = ControladorLocalidades::ctrMostrarLocalidades($itemLocalidad, $valorLocalidad);\t\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LAS OCUPACIONES\n\t\t\t\t=============================================*/\n\n\t\t\t\t$itemOcupacion = \"id\";\n\t\t\t\t$valorOcupacion = $asegurados[$i][\"id_ocupacion\"];\n\n\t\t\t\t$ocupaciones = ControladorOcupaciones::ctrMostrarOcupaciones($itemOcupacion, $valorOcupacion);\t\t\t\t\n\n\t\t\t\t/*=============================================\n\t\t\t\tTRAEMOS LAS ACCIONES\n\t\t\t\t=============================================*/\n\n\t\t\t\t$botones1 = \"<div class='btn-group'><button class='btn btn-info btnAgregarBeneficiario' idAsegurado='\".$asegurados[$i][\"id\"].\"' data-toggle='tooltip' title='Agregar Beneficiario'><i class='fas fa-check'></i></button></div>\";\n\n\t\t\t\t$botones2 = \"<div class='btn-group'><button class='btn btn-warning btnEditarEmpleador' idAsegurado='\".$asegurados[$i][\"id\"].\"' data-toggle='tooltip' title='Editar'><i class='fas fa-pencil-alt'></i></button><button class='btn btn-danger btnEliminarAsegurado' idAsegurado='\".$asegurados[$i][\"id\"].\"' data-toggle='tooltip' title='Eliminar'><i class='fas fa-times'></i></button></div>\";\n\n\t\t\t\t$datosJson .='[\n\t\t\t\t\t\"'.$botones1.'\",\t\n\t\t\t\t\t\"'.$empleadores[\"razon_social\"].'\",\t\t\t\n\t\t\t\t\t\"'.$seguros[\"tipo_seguro\"].'\",\t\n\t\t\t\t\t\"'.$asegurados[$i][\"matricula\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"documento_ci\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"paterno\"].' '.$asegurados[$i][\"materno\"].' '.$asegurados[$i][\"nombre\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"sexo\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"fecha_nacimiento\"].'\",\n\t\t\t\t\t\"'.$Localidades[\"nombre_localidad\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"zona\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"calle\"].' '.$asegurados[$i][\"nro_calle\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"salario\"].'\",\n\t\t\t\t\t\"'.$ocupaciones[\"nombre_ocupacion\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"fecha_ingreso\"].'\",\n\t\t\t\t\t\"'.$asegurados[$i][\"estado\"].'\",\n\t\t\t\t\t\"'.$botones2.'\"\n\t\t\t\t],';\n\t\t\t}\n\n\t\t\t$datosJson = substr($datosJson, 0, -1);\n\n\t\t\t$datosJson .= ']\n\t\t\t}';\t\n\n\t\t}\n\n\t\techo $datosJson;\n\t\n\t}", "function entrada_por_traspaso(){\n\t\t$e= new Entrada();\n\t\t$e->usuario_id=$GLOBALS['usuarioid'];\n\t\t$e->empresas_id=$GLOBALS['empresaid'];\n\t\t$related = $e->from_array($_POST);\n\t\t//if($e->costo_unitario=='undefined') $e->costo_unitario=0;\n\t\t$e->espacios_fisicos_id=$GLOBALS['espacios_fisicos_id'];\n\t\t$e->costo_total=($e->cantidad * $e->costo_unitario);\n\t\t$e->cproveedores_id=1;\n\t\t$e->fecha=date(\"Y-m-d H:i:s\");\n\t\tif($e->id==0)\n\t\t\tunset($e->id);\n\t\tif($e->save($related)) {\n\t\t\techo $e->id;\n\t\t} else\n\t\t\techo 0;\n\t}", "public function showDataPendiente()\n {\n $data = DB::select(\"SELECT\n b.id,\n LTRIM(RIGHT('0000' + CAST(f.nroResolucion AS varchar(4)), 4))+'-'+LTRIM(YEAR(f.fechaFirma)) nro_rm,\n d.nroDocumento ruc,\n d.nombre,\n d.region,\n d.provincia,\n d.distrito,\n e.fecha_inicio,\n e.duracion,\n e.inversion_pcc,\n e.inversion_entidad,\n e.inversion_total\n FROM InicResolucionMinisterial a\n INNER JOIN (\n SELECT * FROM InicPostulante\n ) b ON b.id = a.codPostulante\n LEFT JOIN (\n SELECT * FROM InicContrato\n ) c ON c.codPostulante = a.codPostulante\n LEFT JOIN (\n SELECT * FROM vw_data_opa\n ) d ON d.id = b.codEntidad\n LEFT JOIN (\n SELECT * FROM InicProyecto\n ) e ON e.codPostulante = a.codPostulante\n LEFT JOIN (\n SELECT * FROM InicResolucionMinisterial\n ) f ON f.codPostulante = a.codPostulante\n WHERE b.codTipoIncentivo = 2 AND c.id IS NULL\");\n \n return view($this->path.'.data', compact('data'));\n }", "private function RetornarRegistroJSON(){\r\n $oRegistro = \"{'registro':[{\";\r\n $oRegistro .= \"'totalNome':'\" .$this->nTotalNome. \"'\";\r\n $oRegistro .= \",'totalEmail':'\" .$this->nTotalEmail. \"'\";\r\n $oRegistro .= \",'totalLogin':'\" .$this->nTotalLogin. \"'\";\r\n $oRegistro .= \"}]}\";\r\n echo $oRegistro;\r\n }", "public function __toString(){\n\t\t\treturn json_encode(array(\n\t\t\t\t\"idusuario\"=>$this->getIdusuario(),\n\t\t\t\t\"deslogim\"=>$this->getDeslogim(),\n\t\t\t\t\"dessenha\"=>$this->getDessenha(),\n\t\t\t\t\"dtcadastro\"=>$this->getDtcadastro()->format(\"d/m/Y H:i:s\")\n\t\t\t));\n\t\t}", "public function cadastrar()\r\n {\r\n //definir data copiar para instituicao\r\n $this->datacriacao = date('Y-m-d H:i:s');\r\n // inserir instituicao no banco\r\n $obDatabase = new Database('instituicao');\r\n $this->id = $obDatabase->insert([\r\n 'nome' => $this->nome,\r\n 'datacriacao' => $this->datacriacao,\r\n 'tipo' => $this->tipo\r\n ]);\r\n return true;\r\n\r\n // print_r($this);\r\n\r\n //atribuir o id de instituicao na instancia\r\n\r\n //retornar sucesso\r\n }", "function toString(){\n echo \"<h2>Alumnos:</h2>\";\n /* Conexion con base de datos. */\n $conexion = new PDO('mysql:host=localhost;dbname=tarea02;charset=UTF8', 'root', '');\n $conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n\n if ($conexion){\n \n /* Se define la consulta SQL */\n $consulta = \"SELECT * FROM alumno;\"; \n $stmt = $conexion->prepare($consulta);\n $stmt->execute(); \n \n $arr = $stmt->fetchAll(PDO::FETCH_ASSOC);\n foreach ($arr as $row) {\n echo $row['matricula'];\n echo \" \";\n echo $row['nombre'];\n echo \" \"; \n echo $row['carrera'];\n echo \" \"; \n echo $row['email'];\n echo \" \"; \n echo $row['telefono'];\n echo \"<br>\"; \n \n \n }\n\n } else {\n echo \"Hubo un problema con la conexión\";\n }\n }", "public function exposConEntrada(){\n\t\t$query = sprintf(\"SELECT * FROM Eventos EV, Entradas EN WHERE EV.id=EN.id_evento AND EN.id_usuario=%d\", $this->id);\n\t\t$obras = self:: consulta($query);\n\t\treturn $obras;\n\t}", "function alta_tipo_entrada(){\n\t\t$u= new Tipo_entrada();\n\t\t$related = $u->from_array($_POST);\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han registrado los datos del Tipo de Entrada.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "function informacao() {\n $this->layout = '_layout.perfilUsuario';\n $usuario = new Usuario();\n $api = new ApiUsuario();\n $usuario->codgusario = $this->getParametro(0);\n\n $this->dados = array(\n 'dados' => $api->Listar_informacao_cliente($usuario)\n );\n $this->view();\n }", "public function buscar() {\n $buscarUsuario = new SqlQuery(); //instancio la clase\n (string) $tabla = get_class($this); //uso el nombre de la clase que debe coincidir con la BD \n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción\n $statement = $this->refControladorPersistencia->ejecutarSentencia(\n $buscarUsuario->buscar($tabla)); //senencia armada desde la clase SqlQuery sirve para comenzar la busqueda\n $arrayUsuario = $statement->fetchAll(PDO::FETCH_ASSOC); //retorna un array asociativo para no duplicar datos\n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit\n return $arrayUsuario; //regreso el array para poder mostrar los datos en la vista... con Ajax... y dataTable de JavaScript\n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n }\n }", "public function verDados(){\n\t\t\techo $this->nome.\"<br>\";\n\t\t\techo $this->idade.\"<br>\";\n\t\t\techo $this->senha.\"<br>\";\n\t\t}", "function recuperar_datos() {\n\t\tglobal $nombre, $tipo ;\n\t\t\n\t\t\t$pers_id =(isset($_POST['id_marcas']) && !empty($_POST['id_marcas']))? $_POST['id_marcas']:\"\";\n\t\t\t$tipo =(isset($_POST['tipo']) && !empty($_POST['tipo']))? $_POST['tipo']:\"A\"; \t\n\n\t\t\t$nombre=(isset($_POST[\"nombre\"]) && !empty($_POST[\"nombre\"]))? $_POST[\"nombre\"]:\"\";\t\t\t\n\t\n\t\t}", "public function incluir(){\n header(\"Content-type: text/html;charset=utf-8\");\n $sql = \"SHOW FULL FIELDS FROM \" . $this->table;\n $execute = conexao::toConnect()->executeS($sql);\n $atributos = \"\";\n $values = \"\";\n $id_registro = \"\";\n $contador = count($execute) - 1;\n foreach ($execute as $key => $attr){\n if ($attr->Key != 'PRI') {\n $atributos_field = $attr->Field;\n $select_p = substr(strtoupper($atributos_field), 0, 1);\n $select_t = substr($atributos_field, 1);\n $get = 'get' . $select_p . $select_t;\n if ($contador != $key) {\n $atributos .= $attr->Field . ',';\n $values .= \"'\".$this->$get() .\"',\";\n } else {\n $atributos .= $attr->Field;\n $values .= \"'\".$this->$get() .\"'\";\n }\n }else{\n $id_registro = $attr->Field;\n }\n }\n $insert = \"INSERT INTO \".$this->table.\" (\".$atributos.\") VALUES($values)\";\n $execute_into = conexao::toConnect()->executeQuery($insert);\n if (count($execute_into) > 0) {\n $sql = \"SELECT \".$id_registro.\" FROM \".$this->table.\" ORDER BY \".$id_registro.\" DESC LIMIT 1\";\n $id_r = conexao::toConnect()->executeS($sql);\n return $id_r[0]->$id_registro;\n }else{\n return false;\n }\n\n }", "public function __toString() {\n return \"Denominacion: \" . $this->getDenominacion() . \"\\n\" .\n \"Direccion: \" . $this->getDireccion() . \"\\n\" .\n \"Clientes:\\n\" . $this->mostrarClientes() .\n \"Productos:\\n\" . $this->mostrarProductos() .\n \"Ventas:\\n\" . $this->mostrarVentas();\n }", "public function cadastrar(){\r\n //DEFINIR A DATA DE CADASTRO\r\n $this->cadastro = date('Y-m-d H:i:s');\r\n\r\n $db = new Database('cartao');\r\n $this->id = $db->insert([\r\n 'bandeira' => $this->bandeira,\r\n 'numero' => $this->numero,\r\n 'doador' => $this->doador,\r\n ]);\r\n\r\n }", "public function por_asignar() {\n return $this->db\n ->select(format_select(array(\n 'cirugia.idCirugia' => 'idCirugia',\n 'empleado.idEmpleado' => 'idEmpleado',\n 'empleado.matricula' => 'matricula',\n 'empleado.nombre' => 'nombre',\n 'empleado.apellido_paterno' => 'a_paterno',\n 'empleado.apellido_materno' => 'a_materno',\n 'especialidad.nombre' => 'especialidad',\n )))\n ->join('usuario','tipo_usuario.idTipo_Usuario = usuario.idTipo_Usuario')\n ->join('empleado','empleado.idEmpleado = usuario.idEmpleado')\n ->join('departamento','departamento.idDepartamento = tipo_usuario.idDepartamento')\n ->join('especialidad','especialidad.idEspecialidad = departamento.idEspecialidad')\n ->join('proceso_tipo_usuario','proceso_tipo_usuario.idTipo_Usuario = tipo_usuario.idTipo_Usuario')\n ->join('proceso','proceso.idProceso = proceso_tipo_usuario.idProceso')\n ->join('cirugia','cirugia.idProceso = proceso.idProceso AND cirugia.idquirofano = 0 AND cirugia.status = \"1\"')\n ->get('tipo_usuario')\n ->result_array();\n }", "function RellenaDatos()\n{//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM PROF_ESPACIO\n\t\t\tWHERE (\n\t\t\t\t(DNI = '$this->DNI' AND CODESPACIO = '\".$this->CODESPACIO.\"') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\t\t\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devuelve el mensaje\n\t} //si no se ejecuta con éxito \n\telse\n\t{\n\t\t$tupla = $resultado->fetch_array();//guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "public function buscarEstudianteAcuerdo() {\n\n $sql = \"SELECT \n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n INNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera )\n INNER JOIN AcuerdoActa A ON ( A.FechaGradoId = FG.FechaGradoId )\n INNER JOIN DetalleAcuerdoActa DAC ON ( DAC.AcuerdoActaId = A.AcuerdoActaId AND E.codigoestudiante = DAC.EstudianteId )\n WHERE\n E.codigoestudiante = ?\n AND D.CodigoEstado = 100\n AND DAC.EstadoAcuerdo = 0\n AND DAC.CodigoEstado = 100\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n\n $fechaGrado->setCarrera($carrera);\n\n $this->setTipoDocumento($tipoDocumento);\n\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }", "public function get_recibos_print($mes_recibo,$ano_recibo,$empresa_recibo){\n $conectar=parent::conexion();\n parent::set_names();\n\n $mes=$_POST[\"mes_recibo\"];\n $ano=$_POST[\"ano_recibo\"]; \n $fecha= ($ano.\"-\".$mes.\"%\");\n\n $sql=\"select r.fecha,r.numero_recibo,r.numero_venta,r.abono_act,r.paciente,r.empresa,r.id_recibo,v.tipo_pago from ventas as v inner join recibos as r on v.numero_venta=r.numero_venta where fecha like ? and r.empresa=? AND v.tipo_pago='Descuento en Planilla';\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$fecha);\n $sql->bindValue(2,$empresa_recibo);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n}", "public function __toString() {\r\n return $this->persona->getNombres().' '.$this->persona->getApellidos();\r\n }", "function RellenaDatosPorEdificio()\n{\n $sql = \"SELECT *\n\t\t\tFROM CENTRO\n\t\t\tWHERE (\n\t\t\t\t(CODEDIFICIO = '$this->CODEDIFICIO') \n\t\t\t)\";\n\t//si se ha actualizado guardamos un mensaje de éxito en la variable resultado\n\t//si se cumple la condicion\n\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t}\n\treturn $resultado;//devuelve el mensaje\n}", "public function filtro($bus,$tip) {\n $this->buscar=$bus;\n $this->tipo=$tip;\n \n switch ($this->tipo){\n case 'apellido': $this->consulta=$this->con->query(\"SELECT * FROM usuarios WHERE apellido LIKE '%$this->buscar%' ORDER BY apellido ASC, nombre ASC\");\n break;\n case 'dni': $this->consulta=$this->con->query(\"SELECT * FROM usuarios WHERE dni = '$this->buscar'\");\n break;\n case 'telefono': $this->consulta=$this->con->query(\"SELECT * FROM usuarios WHERE telefono = '$this->buscar' ORDER BY apellido ASC, nombre ASC\");\n }\n $this->i=1;\n while($this->datos= $this->consulta->fetch_array()) {\n ?>\n <tr>\n <td>\n <b><?php echo $this->i;?></b>\n <img src=\"fotos/<?php echo $this->datos['idUsuario'];?>\" width=\"50px\"> \n </td>\n <td><?php echo $this->datos['apellido'].\", \".$this->datos['nombre'];?></td>\n <td><?php echo $this->datos['usuario'];?></td>\n <td><?php echo $this->datos['dni'];?></td>\n <td><?php echo $this->datos['edad'];?></td>\n <td><?php echo $this->datos['domicilio'];?></td>\n <td><?php echo $this->datos['telefono'];?></td>\n <td><?php echo $this->datos['email'];?></td>\n <td><?php echo $this->datos['sexo'];?></td>\n <td><?php echo $this->datos['privilegio'];?></td>\n <td>\n <div class=\"row\">\n <a class=\"btn btn-success btn-sm\" href=\"formmodificar.php?idUsuario=<?php echo $this->datos['idUsuario'];?>\"><i class=\"material-icons\">create</i></a>\n <a class=\"btn btn-danger btn-sm\" onclick=\"return confirm('¿Desea eliminar este registro?')\" href=\"formeliminar.php?idUsuario=<?php echo $this->datos['idUsuario'];?>\"><i class=\"material-icons\">delete</i></a>\n </div>\n </td>\n </tr> \n <?php \n $this->i++;\n }\n $this->con->close();\n }", "function BuscaRegistrosReporte($tupla)\r\n {\r\n If ($tupla[formulario] != 'S')\r\n return 'No Aplica';\r\n \r\n $encryt = new EnDecryptText();\r\n $dbl = new Mysql($encryt->Decrypt_Text($_SESSION[BaseDato]), $encryt->Decrypt_Text($_SESSION[LoginBD]), $encryt->Decrypt_Text($_SESSION[PwdBD]) );\r\n $Nivls = \"\";\r\n { \r\n //$Consulta3=\"select id as id_organizacion,parent_id as organizacion_padre, title as identificacion from mos_organizacion where id in ($tupla[id_organizacion])\";\r\n $Consulta3=\"select count(*) cant from mos_registro where IDDoc='\".$tupla[IDDoc].\"'\"; \r\n $Resp3 = $dbl->query($Consulta3,array()); \r\n $resp3 = $Resp3[0][cant];\r\n $html = str_pad($resp3, 5, '0', STR_PAD_LEFT);\r\necho $Consulta3;\r\n return $html;\r\n }\r\n \r\n return $Nivls;\r\n\r\n }", "function consultarEmpleado(){\n\t$ced=$this->objEmpleado->getCedula();\n\t$objConexion = new ControlConexion();\n\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n\t//$comandoSql=\"SELECT cedula, nombre_tmp, tipoCliente, fechaRegistro, imagen_tmp, email_tmp, telefono_tmp, cupoCredito, contrasena FROM CLIENTE WHERE USUARIO='\".$usu.\"' \";\n\t$comandoSql=\"SELECT * FROM EMPLEADO WHERE CEDULA='\".$ced.\"' \";\n\n\t$recordSet=$objConexion->ejecutarSelect($comandoSql);\n\n\t\t \n\t\n\twhile($registro = $recordSet->fetch_array(MYSQLI_ASSOC)){\n\t\n\t\t$this->objEmpleado->setNombre($registro[\"nombre\"]);\n\t\t$this->objEmpleado->setFechaIngreso($registro[\"fechaIngreso\"]);\n\t\t$this->objEmpleado->setFechaRetiro($registro[\"fechaRetiro\"]);\n\t\t$this->objEmpleado->setSalarioBasico($registro[\"salarioBasico\"]);\n\t\t$this->objEmpleado->setDeducciones($registro[\"deducciones\"]);\n\t\t$this->objEmpleado->setFoto($registro[\"foto\"]);\n\t\t$this->objEmpleado->setHojaVida($registro[\"hojaVida\"]);\n\t\t$this->objEmpleado->setEmail($registro[\"email\"]);\n\t\t$this->objEmpleado->setTelefono($registro[\"telefono\"]);\n\t\t$this->objEmpleado->setCelular($registro[\"celular\"]);\n\t\t$this->objEmpleado->setEstado($registro[\"estado\"]);\n\t\t$this->objEmpleado->setContrasena($registro[\"contrasena\"]);\n\t\t$this->objEmpleado->setNombreTmp($registro[\"nombre_tmp\"]);\n\t\t$this->objEmpleado->setFotoTmp($registro[\"foto_tmp\"]);\n\t\t$this->objEmpleado->setHojaVidaTmp($registro[\"hojaVida_tmp\"]);\n\t\t$this->objEmpleado->setEmailTmp($registro[\"email_tmp\"]);\n\t\t$this->objEmpleado->setTelefonoTmp($registro[\"telefono_tmp\"]);\n\t\t$this->objEmpleado->setCelularTmp($registro[\"celular_tmp\"]);\n\t\t}\t\n\t\t$objConexion->cerrarBd(); \n\t\treturn $this->objEmpleado; \t\t\n}", "public function mostrarEspecialidad(){\n\t\t\t$sql = \"SELECT * FROM especialidades\";\n\t\t\t\t$result = mysqli_query(Conexion::conectar(), $sql);\n\n\n\n\t\t$tabla = \"<table class='table'> \\n\";\n\t\t\t$tabla.= \"<tr> \\n\";\n\t\t\t$tabla.= \"<td><b>ID</b></td>\\n\";\n\t\t\t$tabla.= \"<td><b>Nombre</b></td>\\n\";\n\n\n\t\t\t\twhile ($fila = mysqli_fetch_row($result)) {\n\n\t\t\t\t\t$tabla.= \"<tr> \\n\";\n\t\t\t\t\t$tabla.= \"<td>$fila[0]</td>\\n\";\n\t\t\t\t\t$tabla.= \"<td>$fila[1]</td>\\n\";\n\n\t\t\t\t\t$tabla.=\"</tr> \\n\";\n\t\t\t\t}\n\n\t\t\t\t$tabla.=\"</table> \\n\";\n\n\t\t\t\treturn $tabla;\n\n\t}", "public function buscarDatosDeCodigo($lote, $suc){\n $db = new My();\n $my = new My();\n $datos = array();\n $query = \"SELECT a.codigo AS Codigo,l.lote,CONCAT( a.descrip, '-', p.nombre_color) AS Descrip , s.suc, s.cantidad AS Stock, s.estado_venta,a.um AS UM,l.ancho AS Ancho,l.gramaje AS Gramaje,l.tara AS Tara,l.padre AS Padre,s.ubicacion AS U_ubic,\n l.img AS Img, l.kg_desc AS U_kg_desc,h.fecha_hora AS entDate\n\n FROM articulos a INNER JOIN lotes l ON a.codigo = l.codigo INNER JOIN stock s ON l.codigo = s.codigo AND l.lote = s.lote \n INNER JOIN pantone p ON l.pantone = p.pantone INNER JOIN historial h ON l.codigo = h.codigo AND l.lote = h.lote\n WHERE s.cantidad > 0 AND s.suc = '$suc' AND l.lote ='$lote' GROUP BY lote ORDER BY h.fecha_hora ASC LIMIT 1\";\n \n $my->Query($query);\n if($my->NextRecord()){\n $datos = $my->Record;\n if(count($datos)){\n $datos = array_map(\"utf8_encode\",$datos);\n // print_r($datos);\n \n $rem = \"SELECT CONCAT(fecha_cierre,' ',hora_cierre) AS fecha_ingreso FROM nota_remision n, nota_rem_det d WHERE n.n_nro = d.n_nro AND lote = '$lote' AND n.estado = 'Cerrada' AND n.suc_d = '$suc'\";\n \n $db->Query($rem);\n if($db->NumRows() > 0){ \n $db->NextRecord();\n $fecha_ingreso = $db->Record['fecha_ingreso'];\n $datos['entDate'] = $fecha_ingreso;\n }\n // Buscar si esta en una Remision Abierta o En Proceso\n $rem2 = \"SELECT n.n_nro, n.suc_d FROM nota_remision n, nota_rem_det d WHERE n.n_nro = d.n_nro AND lote = '$lote' AND n.estado != 'Cerrada' AND n.suc = '$suc'\";\n \n $db->Query($rem2);\n if($db->NumRows() > 0){ \n $db->NextRecord();\n $n_nro = $db->Record['n_nro'];\n $destino = $db->Record['suc_d'];\n $datos['NroRemision'] = $n_nro;\n $datos['Destino'] = $destino;\n $datos['Mensaje']=\"En Remision\";\n }else{\n $datos['Mensaje']=\"Ok\"; \n }\n \n }\n echo json_encode($datos);\n }else{\n echo '{\"Mensaje\":\"Error: Codigo no encontrado!\"}';\n } \n $my->Close();\n }", "function toString(){\n\t\tinclude '../Views/base/header.php';\n\t\t\n\t\techo '<table class=\"detalle\">';\n\t\t\t$i = 0;\n\t\t\twhile($fila = $this->pistasyHorarios->fetch_row()){\n\t\t\t\tif($i == 0){\n\t\t\t\t\techo '<tr class=\"'; echo $this->_getTr($i); echo'\">';\n\t\t\t\t\t\techo '<td class=\"formularioTd\">';\n\t\t\t\t\t\t\techo $this->campos['nombre'];\n\t\t\t\t\t\techo '</td>';\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '<td class=\"nombrePista\">';\n\t\t\t\t\t\t\techo $fila[1];\n\t\t\t\t\t\techo '</td>';\n\t\t\t\t\techo '</tr>';\n\t\t\t\t\t$i++;\n\t\t\t\t\techo '<tr class=\"'; echo $this->_getTr($i); echo'\">';\n\t\t\t\t\t\techo '<td class=\"formularioTd\">';\n\t\t\t\t\t\t\techo $this->campos['codigoHorario'];\n\t\t\t\t\t\techo '</td>';\n\t\t\t\t\techo '<td class=\"mensaje\">';\n\t\t\t\t}\n\t\t\t\techo '<form method=\"POST\" accept-charset=\"UTF-8\" id=\"addHorario'; echo $i; echo '\" name=\"addHorario'; echo $i; echo '\" action=\"../Controllers/'; echo $this->controlador; echo '\">';\n\t\t\t\techo '<b class=\"lblBtAddHorario\"> Desde las ' . $fila[3] . ' hasta las ' . $fila[4] . '</b>';\n\t\t\t\techo '<input type=\"hidden\" name=\"codigoPista\" value=\"'; echo $fila[0]; echo '\"/>';\n\t\t\t\techo '<input type=\"hidden\" name=\"codigoHorario\" value=\"'; echo $fila[2]; echo '\"/>';\n\t\t\t\techo '<input type=\"hidden\" name=\"nombre\" value=\"'; echo $fila[1]; echo '\"/>';\n\t\t\t\techo '<input class=\"btn btn-info\" type=\"submit\" name=\"submit\" value=\"ADDHORARIO\"/><br/><br/>';\n\t\t\t\techo '</form>';\n\t\t\t}\n\t\t\techo '</td>';\n\t\t\techo '</tr>';\n\t\t\t\t$i++;\n\t\t\t/*Fila para volver*/\n\t\t\techo '<tr class=\"'; echo $this->_getTr($i); echo'\">';\n\t\t\t\techo '<td class=\"formularioTd\">';\n\t\t\t\t\techo $this->Volver;\n\t\t\t\techo '</td>';\n\t\t\t\t\n\t\t\t\techo '<td class=\"formularioTd\">';\n\t\t\t\t\techo '<a href=\"'; echo $this->controlador; echo '\">';\n\t\t\t\t\techo '<button class=\"btn btn-secondary\">'; echo $this->Volver; echo '</button>';\n\t\t\t\t\techo '</a>';\n\t\t\t\techo '</td>';\n\t\t\techo '</tr>';\n\t\t\t\n\t\t/**FIN TABLA**/\n\t\techo '</table>';\n\t\tinclude '../Views/base/footer.php';\n\t}", "public function listadoRaza(){\n \n\t\t$data= $this->Model_maestras->BuscarRaza();\n\t\n\t\techo($data); \n\t \n\n\t}", "public function buscarDocumento( $txtCodigoCarrera ){\n\t\t\t$sql = \"SELECT E.idestudiantegeneral, ET.codigoestudiante, E.numerodocumento, E.tipodocumento,\n \t\t\tDATE_FORMAT(E.fechanacimientoestudiantegeneral,'%Y-%m-%d') AS fechanacimientoestudiantegeneral, E.telefonoresidenciaestudiantegeneral,\n\t\t\t\tE.telefono2estudiantegeneral, E.tipodocumento, E.nombresestudiantegeneral, E.apellidosestudiantegeneral , E.emailestudiantegeneral, E.celularestudiantegeneral,\n\t\t\t\tD.nombredocumento, E.codigogenero, G.nombregenero\n \t\t\tFROM estudiantegeneral E\n \t\t\tINNER JOIN estudiante ET ON ( ET.idestudiantegeneral = E.idestudiantegeneral )\n \t\t\tINNER JOIN carrera C ON ( C.codigocarrera = ET.codigocarrera )\n \t\t\tINNER JOIN documento D ON ( D.tipodocumento = E.tipodocumento )\n \t\t\tINNER JOIN genero G ON ( G.codigogenero = E.codigogenero )\n \t\t\tWHERE numerodocumento = ? \n \t\t\tAND C.codigocarrera = ? \";\n\t\t\t\n\t\t\t\n\t\t\t$this->persistencia->crearSentenciaSQL( $sql );\n\t\t\t$this->persistencia->setParametro( 0 , $this->getDocumento( ) , false );\n\t\t\t$this->persistencia->setParametro( 1 , $txtCodigoCarrera , false );\n\t\t\t//echo $this->persistencia->getSQLListo( );\n\t\t\t$this->persistencia->ejecutarConsulta( );\n\t\t\t\n\t\t\tif( $this->persistencia->getNext( ) ){\n\t\t\t\t$this->setId( $this->persistencia->getParametro( \"codigoestudiante\" ) );\n\t\t\t\t$this->setNombres( $this->persistencia->getParametro( \"nombresestudiantegeneral\" ) );\n\t\t\t\t$this->setApellidos( $this->persistencia->getParametro( \"apellidosestudiantegeneral\" ) );\n\t\t\t\t\n\t\t\t\t$tipoDocumento = new TipoDocumento( null );\n\t\t\t\t$tipoDocumento->setIniciales( $this->persistencia->getParametro( \"tipodocumento\" ) );\n\t\t\t\t$tipoDocumento->setDescripcion( $this->persistencia->getParametro( \"nombredocumento\" ) );\n\t\t\t\t$this->setTipoDocumento( $tipoDocumento );\n\t\t\t}\n\t\t}", "function evt__enviar(){\n if($this->dep('datos')->tabla('mesa')->esta_cargada()){\n $m = $this->dep('datos')->tabla('mesa')->get();\n // print_r($m);\n $m['estado'] = 2;//Cambia el estado de la mesa a Enviado\n $this->dep('datos')->tabla('mesa')->set($m);\n // print_r($m['id_mesa']);\n $this->dep('datos')->tabla('mesa')->sincronizar();\n // $this->dep('datos')->tabla('mesa')->resetear();\n \n $m = $this->dep('datos')->tabla('mesa')->get_listado($m['id_mesa']);\n if($m[0]['estado'] == 2){//Obtengo de la BD y verifico que hizo cambios en la BD\n //Se enviaron correctamente los datos\n toba::notificacion()->agregar(utf8_decode(\"Los datos fueron enviados con éxito\"),\"info\");\n }\n else{\n //Se generó algún error al guardar en la BD\n toba::notificacion()->agregar(utf8_decode(\"Error al enviar la información, verifique su conexión a internet\"),\"info\");\n }\n }\n \n }", "function obtener_registro_todos_los_registros(){\n $this->sentencia_sql=\"CALL pa_consultar_todos_los_\".$this->TABLA.\"()\"; \n \n if($this->ejecutar_consulta_sql()){\n //return array(\"codigo\"=>\"00\",\"mensaje\"=>\"Estos son los resultados de la consulta a la tabla $this->TABLA\",\"respuesta\"=>TRUE);\n return array(\"codigo\"=>\"00\",\"mensaje\"=>\"Estos son los resultados de la consulta a la tabla $this->TABLA\",\"respuesta\"=>TRUE,\"valores_consultados\"=>$this->filas_json);\n }else{\n return array(\"codigo\"=>\"01\",\"mensaje\"=> $this->mensajeDepuracion,\"respuesta\"=>TRUE);\n }\n \n }", "public function print_recibo_paciente($n_recibo,$n_venta,$id_paciente){\n $conectar=parent::conexion();\n parent::set_names();\n\n $sql=\"select*from recibos where numero_recibo=? and numero_venta=? and id_paciente=?;\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$n_recibo);\n $sql->bindValue(2,$n_venta);\n $sql->bindValue(3,$id_paciente);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n}", "public function mostrar(){\n\t\t\t$db=DB::conectar();\n\t\t\t$listarComentarios=[];\n\t\t\t$select=$db->query('SELECT * FROM comentarios');\n\n\t\t\tforeach ($select->fetchAll() as $comentario) {\n\t\t\t\t$myComentario = new Comentario();\n\t\t\t\t$myComentario->setIdproducto($comentario['idproducto']);\t\t\t\t\n\t\t\t\t$myComentario->setIp($comentario['ip']);\n\t\t\t\t$myComentario->setFecha($comentario['fecha']);\n\t\t\t\t$myComentario->setComentario($comentario['comentario']);\n\t\t\t\t$myComentario->setEstrellas($comentario['estrellas']);\n\t\t\t\t$myComentario->setActivo($comentario['activo']);\n\t\t\t\t$myComentario->setEmail($comentario['email']);\n\t\t\t\t$listarComentarios[]=$myComentario;\n\t\t\t\t# code...\n\t\t\t}\n\t\t\treturn $listarComentarios;\n\t\t}", "public function get_Docente(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n $sql=\"select * from docente;\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->execute();\r\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\r\n }", "public function busquedaEstudianteplanificacion() {\n $con = \\Yii::$app->db_academico;\n $estado = 1;\n \n $sql = \"SELECT est.per_id as id, concat(/*est.per_id, ' - ',*/ pers.per_cedula, ' - ', \n ifnull(pers.per_pri_nombre, ' ') ,' ', \n ifnull(pers.per_pri_apellido,' ')) as name\n FROM db_academico.estudiante est\n JOIN db_asgard.persona pers ON pers.per_id = est.per_id\n WHERE pers.per_estado = :estado AND\n pers.per_estado_logico = :estado AND\n est.est_estado = :estado AND\n est.est_estado_logico = :estado;\";\n\n $comando = $con->createCommand($sql);\n $comando->bindParam(\":estado\", $estado, \\PDO::PARAM_STR);\n $resultData = $comando->queryAll();\n return $resultData;\n }", "public function cadastrar()\n{\n //DEFINIR A DATA\n $this->data = date('Y-m-d H:i:s');\n\n //INSERIR A VAGA NO BANCO\n $obDatabase = new Database('vagas');\n $obDatabase->insert([\n 'titulo' => $this->titulo,\n 'descricao' => $this->descricao,\n 'ativo' => $this->ativo,\n 'data' => $this->data\n ]);\n //echo \"<pre>\"; print_r($obDatabase); echo \"</pre>\"; exit;\n\n\n //ATRIBUIR O ID DA VAGA NA INSTANCIA\n\n //RETORNAR SUCESSO\n}", "function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}", "function consultarTratamiento(){\n $queryConsultarTratamiento=$this->mdlOrdenes->consultarTratamiento(base64_decode($_POST[\"idAtencion\"]));\n echo json_encode($queryConsultarTratamiento);\n\n }", "public static function recupereTudo() {\n include_once 'conexao.php';\n $sql = \"SELECT * FROM INSTITUICAO\";\n $query = mysql_query($sql);\n while ($sql = mysql_fetch_array($query)) {\n $id = $sql[\"id\"];\n $nome = $sql[\"nome\"];\n echo \"<a href=nome.php?id=$id>$nome</a>\";\n }\n }", "public function getInfoSolicitante() {\n $data = SolicitanteModel::getSolicitanteModel(['dni' => $_POST['solicitud-dni']]);\n\n if($data->rowCount() == 1) {\n $row = $data->fetch();\n\n $message = [\n 'error' => false,\n 'name' => $row['nombre'],\n 'lastName' => $row['apellido'],\n 'email' => $row['email'],\n 'phone' => $row['celular'],\n 'direction' => $row['direccion']\n ];\n } else {\n $message = [\n 'error' => true,\n 'message' => 'No existe ese usuario'\n ];\n }\n\n echo json_encode($message);\n }", "function dadosCadastros(){//função geral que será chamada na index\n pegaCadastrosJson();//pega os valores dos cadastros do arquivo JSON e salva em um array\n contaNumeroCadastros();//conta Quantos cadastros existem\n }", "function mostrarDetalleProceso(){\r\n ?>\r\n <script type=\"text/javascript\" src=\"<? echo $this->configuracion[\"host\"].$this->configuracion[\"site\"].$this->configuracion[\"javascript\"];?>/datatables/js/jquery.js\"></script>\r\n <script type=\"text/javascript\" src=\"<? echo $this->configuracion[\"host\"].$this->configuracion[\"site\"].$this->configuracion[\"javascript\"];?>/datatables/js/jquery.dataTables.js\"></script>\r\n <script>\r\n $(document).ready(function() { \r\n $('#tabla').dataTable();\r\n })\r\n </script>\r\n <link type=\"text/css\" href=\"<? echo $this->configuracion[\"host\"].$this->configuracion[\"site\"].$this->configuracion[\"javascript\"];?>/datatables/css/jquery.dataTables_themeroller.css\" rel=\"stylesheet\"/>\r\n \r\n <? \r\n echo \"<h1>Detalles de Proceso</h1>\";\r\n $html = \"<table id='tabla' >\";\r\n $html .= \"<thead>\";\r\n $html .= \"<tr>\"; \r\n $html .= \"<td>Código Estudiante</td>\"; \r\n $html .= \"<td>Observación</td>\";\r\n $html .= \"</tr>\";\r\n $html .= \"</thead>\";\r\n $html .= \"<tbody>\";\r\n foreach ($this->mensaje as $key => $estudiante) {\r\n \r\n $html .= \"<tr>\";\r\n $html .= \"<td>\".$key.\"</td>\";\r\n $html .= \"<td>\";\r\n foreach ($estudiante as $key2=>$obs_estudiante) {\r\n if (count($estudiante)>1&&$key2>0)\r\n {\r\n $html.=\"<br>\";\r\n }\r\n $html .= $obs_estudiante;\r\n }\r\n $html .= \"</td>\";\r\n $html .= \"</tr>\";\r\n }\r\n $html .= \"</tbody>\";\r\n \r\n $html .= \"</table>\";\r\n echo $html;\r\n }", "function padres_consultan_hijos($id_padre){\r\n\t\t$cn = $this->conexion();\r\n \r\n if($cn!=\"no_conexion\"){\r\n \t\r\n \t\r\n\t \t$sql=\"select * from $this->tabla_alumno where id_padre='$id_padre'\";\r\n\t\t\t\r\n\t $rs = mysql_query($sql,$cn);\r\n \r\n \t\r\n\t\t\twhile($fila=mysql_fetch_object($rs)){\r\n\t\t\t\t$cursos[]=$fila;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\t$respuesta=\"\";\r\n\t\t\tif($cursos){\r\n\t\t\t\t\t\r\n\t\t\t\tforeach($cursos as $q):\r\n\t\t\t\t\t\r\n\t\t\t\t\t$respuesta.=$q->codigo.\"{\".$q->nombres.\"{\".$q->apellido_paterno.\"{\".$q->apellido_materno.\"{\".$q->nivel.\"{\".$q->grado.\"{\".$q->seccion.\"{\";\r\n\t\t\t\t\t\r\n\t\t\t\tendforeach;\t\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t$respuesta=\"no data\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmysql_close($cn);\r\n\r\n\t\t\treturn $respuesta;\r\n\t\t}else{\r\n\t\treturn \"mysql_no\";\r\n\t\t}\r\n\t}", "function RellenaDatos()\n {\t// se construye la sentencia de busqueda de la tupla\n $sql = \"SELECT * FROM ENTREGA WHERE (IdTrabajo = '$this->idTrabajo' AND login = '$this->login')\";\n // Si la busqueda no da resultados, se devuelve el mensaje de que no existe\n if (!($resultado = $this->mysqli->query($sql))){\n return 'No existe en la base de datos'; //\n }\n else{ // si existe se devuelve la tupla resultado\n $result = $resultado->fetch_array();\n return $result;\n }\n }", "public function busca() {\r\n $this->SQL = \"SELECT rcja_usuarios.empleado, rcja_usuarios.nif, rcja_usuarios.nombre, \";\r\n $this->SQL .= \"\t\t rcja_usuarios.perfil_Usuario, rcja_usuarios.etiqueta_Emp, rcja_usuarios.observaciones_Emp, rcja_usuarios.centro_Directivo_Depart, \";\r\n $this->SQL .= \"\t\t rcja_usuarios.centro_Trabajo, rcja_usuarios.puesto_Trabajo, rcja_usuarios.servicio, rcja_usuarios.tipo_Usuario, rcja_usuarios.grupo_Nivel \";\r\n $this->SQL .= \" FROM rcja_usuarios\";\r\n //$this->debug($this->SQL);\r\n return $this->SQL;\r\n }", "public function mostrar1(){\n\t\t\t$db=DB::conectar();\n\t\t\t$listarComentarios=[];\n\t\t\t$select=$db->query('SELECT * FROM comentarios WHERE activo=0');\n\n\t\t\tforeach ($select->fetchAll() as $comentario) {\n\t\t\t\t$myComentario = new Comentario();\n\t\t\t\t$myComentario->setIdproducto($comentario['idproducto']);\t\t\t\t\n\t\t\t\t$myComentario->setIp($comentario['ip']);\n\t\t\t\t$myComentario->setFecha($comentario['fecha']);\n\t\t\t\t$myComentario->setComentario($comentario['comentario']);\n\t\t\t\t$myComentario->setEstrellas($comentario['estrellas']);\n\t\t\t\t$myComentario->setActivo($comentario['activo']);\n\t\t\t\t$myComentario->setEmail($comentario['email']);\n\t\t\t\t$listarComentarios[]=$myComentario;\n\t\t\t\t# code...\n\t\t\t}\n\t\t\treturn $listarComentarios;\n\t\t}", "public function mostrar($idcompra){\n $sql = \"SELECT c.idcompra, c.idordencompra, c.nrofactura, c.idproveedor, p.razonsocial AS proveedor, c.idpersonal, concat(per.nombre, ' ', per.apellido) AS personal, c.idsucursal, suc.descripcion AS sucursal, c.idformapago, fp.descripcion AS formapago, c.idtipodocumento, td.descripcion AS tipodoc, c.iddeposito, d.descripcion AS deposito, date(c.fecha) as fecha, c.obs, c.monto \n FROM compras c JOIN proveedores p ON c.idproveedor = p.idproveedor JOIN personales per ON c.idpersonal = per.idpersonal JOIN sucursales suc ON c.idsucursal = suc.idsucursal JOIN formas_pago fp ON c.idformapago = fp.idformapago JOIN tipo_documentos td ON c.idtipodocumento = td.idtipodocumento JOIN depositos d ON c.iddeposito = d.iddeposito \n WHERE idcompra = '$idcompra'\";\n return ejecutarConsultaSimpleFila($sql);\n }", "public function mostrar()\n\t{\n\t\t$db = Db::conectar();\n\t\t$listaColegios = null;\n\t\t$select = $db->query('SELECT * FROM colegios ORDER BY idColegios DESC');\n\t\tforeach ($select->fetchAll() as $colegio1) {\n\t\t\t$myColegio = new Colegios();\n\t\t\t$myColegio->setIdColegios($colegio1['idColegios']);\n\t\t\t$myColegio->setColegio($colegio1['colegio']);\n\t\t\t$myColegio->setCantonCantonId($colegio1['canton_cantonId']);\n\t\t\t$myColegio->setTipoColegioTipoColegioId($colegio1['tipoColegio_tipoColegioId']);\n\t\t\t$myColegio->setColegioscodigo($colegio1['colegioscodigo']);\n\t\t\t$myColegio->setColegiosOculto($colegio1['colegiosOculto']);\n\t\t\t$myColegio->setColegiosAccion($colegio1['colegiosAccion']);\n\t\t\t$myColegio->setColegiosfecha($colegio1['colegiosfecha']);\n\t\t\t$myColegio->setColegiosuser($colegio1['colegiosuser']);\n\t\t\t$listaColegios[] = $myColegio;\n\t\t}\n\t\treturn $listaColegios;\n\t}", "function mostrar_extras($dia1, $mes1, $anho1, $dia2, $mes2, $anho2)\r\n\t{\r\n\t\t$Informacion = array();\r\n\t\t//Establecemos la consulta para determinar si el usuario\r\n\t\t//ha ingresado la contrasenha correctamente.\r\n\t\t\t$Consulta = '\r\n\t\t\t\t\t\t\t\tselect usu.id_usuario, id_extra, contrasena, cod_empleado, nombre, hora, inicio, fin, fin_real,\r\n\t\t\t\t\t\t\t\tfecha, total_h, total_m, id_usu_adm\r\n\t\t\t\t\t\t\t\tfrom usuario usu, extra ext\r\n\t\t\t\t\t\t\t\twhere usu.id_usuario = ext.id_usuario\r\n\t\t\t\t\t\t\t\tand fecha >= \"'.$anho1.'-'.$mes1.'-'.$dia1.'\"\r\n\t\t\t\t\t\t\t\tand fecha <= \"'.$anho2.'-'.$mes2.'-'.$dia2.'\"\r\n\t\t\t\t\t\t\t\tand usu.id_grupo = \"'.$this->session->userdata[\"id_grupo\"].'\"\r\n\t\t\t\t\t\t\t\torder by usu.id_usuario asc, fecha asc\r\n\t\t\t';\r\n\r\n\t\t//Ejecutamos la consulta.\r\n\t\t$Resultado = $this->db->query($Consulta);\r\n\t\t//Veririficamos si obtuvimos informacion.\r\n\t\tif(0 < $Resultado->num_rows())\r\n\t\t{\r\n\t\t\treturn $Resultado->result_array();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn array();\r\n\t\t}\r\n\t}", "function consultarUserEmpleado(){\n\t\t\n\t\t$usu=$this->objEmpleado->getUsuario();\n\t\t//SELECT ESTADO FROM `cliente` WHERE `usuario`=\"lili\"\n\t\t$objConexion = new ControlConexion();\n\t\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n\t\t//$comandoSql=\"SELECT cedula, nombre_tmp, tipoCliente, fechaRegistro, imagen_tmp, email_tmp, telefono_tmp, cupoCredito, contrasena FROM CLIENTE WHERE USUARIO='\".$usu.\"' \";\n\t\t$comandoSql=\"SELECT * FROM EMPLEADO WHERE USUARIO='\".$usu.\"' \";\n\t\t\n\t\t$recordSet=$objConexion->ejecutarSelect($comandoSql);\n\n\t\t \n\t\t\n\t\twhile($registro = $recordSet->fetch_array(MYSQLI_ASSOC)){\n\t\t\n\t\t\t$this->objEmpleado->setNombre($registro[\"nombre\"]);\n\t\t\t$this->objEmpleado->setCedula($registro[\"cedula\"]);\n\t\t\t$this->objEmpleado->setFechaIngreso($registro[\"fechaIngreso\"]);\n\t\t\t$this->objEmpleado->setFechaRetiro($registro[\"fechaRetiro\"]);\n\t\t\t$this->objEmpleado->setSalarioBasico($registro[\"salarioBasico\"]);\n\t\t\t$this->objEmpleado->setDeducciones($registro[\"deducciones\"]);\n\t\t\t$this->objEmpleado->setFoto($registro[\"foto\"]);\n\t\t\t$this->objEmpleado->setHojaVida($registro[\"hojaVida\"]);\n\t\t\t$this->objEmpleado->setEmail($registro[\"email\"]);\n\t\t\t$this->objEmpleado->setTelefono($registro[\"telefono\"]);\n\t\t\t$this->objEmpleado->setCelular($registro[\"celular\"]);\n\t\t\t$this->objEmpleado->setEstado($registro[\"estado\"]);\n\t\t\t$this->objEmpleado->setContrasena($registro[\"contrasena\"]);\n\t\t\t$this->objEmpleado->setNombreTmp($registro[\"nombre_tmp\"]);\n\t\t\t$this->objEmpleado->setFotoTmp($registro[\"foto_tmp\"]);\n\t\t\t$this->objEmpleado->setHojaVidaTmp($registro[\"hojaVida_tmp\"]);\n\t\t\t$this->objEmpleado->setEmailTmp($registro[\"email_tmp\"]);\n\t\t\t$this->objEmpleado->setTelefonoTmp($registro[\"telefono_tmp\"]);\n\t\t\t$this->objEmpleado->setCelularTmp($registro[\"celular_tmp\"]);\n\n\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t$objConexion->cerrarBd(); \n\t\t\treturn $this->objEmpleado; \t\t\n\t}", "function stampaPersona($numeroEvento, $conn) {\n \n $stmt = $conn->prepare(\"SELECT tep.nome, P.alt_name, P.nome, P.cognome, P.id FROM (((eventoPersona AS ep INNER JOIN tipologiaEventoPersona AS tep ON tep.id = ep.tipologia) INNER JOIN Evento AS E ON E.id = ep.id_evento) INNER JOIN Persona AS P ON P.id = ep.id_persona) WHERE E.id = ? ORDER BY ep.tipologia\");\n $stmt->bind_param(\"i\", $numeroEvento);\n $stmt->execute();\n $stmt->bind_result($nome_tipo_rapporto, $alt_name, $nome, $cognome, $id);\n \n $daRitornare=\"\";\n \n $ultimaTipologia = \"babbi l'orsetto\";\n while($stmt->fetch()) {\n \n \n if( $nome_tipo_rapporto == $ultimaTipologia ){\n $daRitornare.= \", \". stampaNome($id, $conn);\n }else{\n if($ultimaTipologia != \"babbi l'orsetto\"){$daRitornare.= \"<br>\";}\n $daRitornare.= \"<b class='cappato'>\" . $nome_tipo_rapporto . \":</b> \";\n $daRitornare.= stampaNome($id);\n }\n \n $ultimaTipologia = $nome_tipo_rapporto; \n }\n return $daRitornare;\n }", "public function getEspecialPersonal(){\n\t\t\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\t\t\n\t\t$negocios= $this->extra['select_obj'];\n\t\t$negocios = json_decode($negocios);\n\t\t$conf_eventos=null;\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(REP_PATH_PRINTTEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'especial_personal.tpl');\n\t\t$T->setBlock('tpl_tabla', 'TIENE_EVENTO_DATO', 'tiene_evento_dato');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_NEGOCIOS', 'lista_negocios');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_EVENTO', 'bloque_titulo_evento');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_DISPONIBILIDAD', 'bloque_disponibilidad');\n\n\t\t$subObjetivo = null;\n\t\t$muestra_titulo=true;\n\n\t\t$T->setVar('bloque_disponibilidad', '');\n\t\tfor ($i=0; $i <3 ; $i++) {\n\t\t\t$T->setVar('lista_negocios', '');\n\t\t\t//obtiene nombre negocio\n\t\t\tforeach ($negocios as $key => $conf_negocio) {\n\t\t\t\t$T->setVar('__negocio', $conf_negocio->nombre);\n\t\t\t\t$acumulador_porcentaje=null;\n\t\t\t\t$count_obj=0;\n\t\t\t\t$T->setVar('tiene_evento_dato', '');\n\t\t\t\t//obtiene id de objetivo por negocio\n\t\t\t\tforeach ($conf_negocio->objetivos as $key => $conf_objetivo) {\n\t\t\t\t\t$count_obj ++;\n\t\t\t\t\t$subobjetivo_id=$conf_objetivo;\n\t\t\t\t\t$sql = \"SELECT * FROM reporte.disponibilidad_resumen_consolidado(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($subobjetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($this->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"', \".\n\t\t\t\t\t(isset($this->extra[\"variable\"])?$usr->cliente_id:'0').\")\";\n\t\t\t\t\t//echo $sql.'<br>';\n\t\t\t\t\t$res =& $mdb2->query($sql);\n\t\t\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\t\t\texit();\n\t\t\t\t\t}\n\t\t\t\t\tif($row = $res->fetchRow()){\n\t\t\t\t\t\t$dom = new DomDocument();\n\t\t\t\t\t\t$dom->preserveWhiteSpace = FALSE;\n\t\t\t\t\t\t$dom->loadXML($row[\"disponibilidad_resumen_consolidado\"]);\n\t\t\t\t\t\t$xpath = new DOMXpath($dom);\n\t\t\t\t\t\tunset($row[\"disponibilidad_resumen_consolidado\"]);\n\t\t\t\t\t}\n\t\t\t\t\t$conf_objetivo= $xpath->query(\"/atentus/resultados/propiedades/objetivos/objetivo\")->item(0);\n\t \t\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t \t\t\t\t$conf_eventos = $xpath->query(\"/atentus/resultados/propiedades/eventos/evento\");\n\t \t\t\t\t$subObjetivo = $conf_objetivo->getAttribute('nombre');\n\t \t\t\t\t$T->setVar('__paso_objetivos', $subObjetivo);\n\t\t\t\t\t$T->parse('tiene_evento_dato', 'TIENE_EVENTO_DATO', true);\n\n\t \t\t\t\tforeach ($conf_pasos as $conf_paso) {\n\t \t\t\t\t\t$tag_paso =$xpath->query(\"/atentus/resultados/detalles/detalle[@objetivo_id=\".$subobjetivo_id.\"]/detalles/detalle[@nodo_id=0]/detalles/detalle[@paso_orden=\".$conf_paso->getAttribute('paso_orden').\"]\")->item(0);\n\t \t\t\t\t\tforeach ($conf_eventos as $conf_evento) {\n\t \t\t\t\t\t\t$evento = $conf_evento->getAttribute('evento_id');\n\t \t\t\t\t\t\t$tag_dato = $xpath->query(\"estadisticas/estadistica[@evento_id=\".$conf_evento->getAttribute('evento_id').\"]\",$tag_paso)->item(0);\n\t \t\t\t\t\t\t$porcentaje= isset($tag_dato)?$tag_dato->getAttribute('porcentaje'):0;\n\t \t\t\t\t\t\t$acumulador_porcentaje[$evento] += $porcentaje/$conf_pasos->length;\t\n\t\t \t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t\tif($muestra_titulo){\n\t \t\t\t\t\t$conf_eventos = $xpath->query(\"/atentus/resultados/propiedades/eventos/evento\");\n\t \t\t\t\t}\n\t \t\t\t\t$muestra_titulo=false;\n\t \t\t\t}\n\t \t\t\tforeach ($conf_eventos as $conf_evento) {\n\t \t\t\t\t$evento = $conf_evento->getAttribute('evento_id');\n\t \t\t\t\t$acumulador_negocio[$evento] = $acumulador_porcentaje[$evento]/$count_obj;\n\t\t\t\t}\n\t\t\t\t//numero acumulado de eventos por negocio\n\t\t\t \t$uptime = $acumulador_negocio[1];\n\t\t\t\t$downtime = $acumulador_negocio[2];\n\t\t\t\t$downtime_parcial = $acumulador_negocio[3];\n\t\t\t\t$sin_monitoreo = $acumulador_negocio[7];\n\n\t\t\t\tif($i==0){\n\t\t\t\t\t//establece calculo para disponibilidad especial\n\t\t\t\t\t$uptime_especial = $uptime + $downtime_parcial;\n\t\t\t\t\t$total_especial = $uptime_especial + $downtime;\n\t\t\t\t\t$uptime_especial = $uptime_especial*100/$total_especial;\n\t\t\t\t\t$downtime_especial = $downtime*100/$total_especial;\n\t\t\t\t\t\n\t\t\t\t\t$uptime_td_especial = '<td class=\"txtBlanco12 celdaUptime\" align=\"right\">'.number_format($uptime_especial, 2, '.', '').'</td>';\n\t\t\t\t\t$downtime_td_especial = '<td class=\"txtBlanco12 celdaDtGlobal\" align=\"right\">'.number_format($downtime_especial, 2, '.', '').'</td>';\n\t\t\t\t\t\n\t\t\t\t\t$T->setVar('__paso_uptime', $uptime_td_especial );\n\t\t\t\t\t$T->setVar('__paso_downtime_global', $downtime_td_especial);\n\t\t\t\t\t$T->setVar('__paso_down_parcial', '');\n\t\t\t\t\t$T->setVar('__paso_sin_monitoreo', '');\n\t\t\t\t}\n\t\t\t\tif($i==1){\n\t\t\t\t\t//establece calculo para disponibilidad real\n\t\t\t\t\t$total_real = $uptime + $downtime+ $downtime_parcial;\n\t\t\t\t\t$uptime_real = $uptime*100/$total_real;\n\t\t\t\t\t$downtime_real = $downtime*100/$total_real;\n\t\t\t\t\t$downtime_parcial_real = $downtime_parcial*100/$total_real;\n\n\t\t\t\t\t$uptime_td_real = '<td class=\"txtBlanco12 celdaUptime\" align=\"right\">'.number_format($uptime_real, 2, '.', '').'</td>';\n\t\t\t\t\t$downtime_td_real = '<td class=\"txtBlanco12 celdaDtGlobal\" align=\"right\">'.number_format($downtime_real, 2, '.', '').'</td>';\n\t\t\t\t\t$downtime_td_parcial_real = '<td class=\"txtBlanco12 celdaDtParcial\" align=\"right\">'.number_format($downtime_parcial_real, 2, '.', '').'</td>';\n\t\t\t\t\t\n\t\t\t\t\t$T->setVar('__paso_uptime', $uptime_td_real);\n\t\t\t\t\t$T->setVar('__paso_downtime_global',$downtime_td_real);\n\t\t\t\t\t$T->setVar('__paso_down_parcial', $downtime_td_parcial_real);\n\t\t\t\t\t$T->setVar('__paso_sin_monitoreo', '');\n\t\t\t\t}\n\t\t\t\tif($i==2){\n\t\t\t\t\t//establece calculo para disponibilidad normal\n\t\t\t\t\t$total_disponible = $uptime + $downtime+$downtime_parcial + $sin_monitoreo;\n\t\t\t\t\t$uptime_disponible = $uptime*100/$total_disponible;\n\t\t\t\t\t$downtime_disponible = $downtime*100/$total_disponible;\n\t\t\t\t\t$downtime_parcial_disponible = $downtime_parcial*100/$total_disponible;\n\t\t\t\t\t$sin_monitoreo_disponible = $sin_monitoreo*100/$total_disponible;\n\t\t\t\t\t\n\t\t\t\t\t$uptime_td_disponible = '<td class=\"txtBlanco12 celdaUptime\" align=\"right\">'.number_format($uptime_disponible, 2, '.', '').'</td>';\n\t\t\t\t\t$downtime_td_disponible = '<td class=\"txtBlanco12 celdaDtGlobal\" align=\"right\">'.number_format($downtime_disponible, 2, '.', '').'</td>';\n\t\t\t\t\t$downtime_td_parcial_disponible = '<td class=\"txtBlanco12 celdaDtParcial\" align=\"right\">'.number_format($downtime_parcial_disponible, 2, '.', '').'</td>';\n\t\t\t\t\t$sin_monitoreo_td_disponible = '<td class=\"txtBlanco12 celdaSinMonitoreo\" align=\"right\">'.number_format($sin_monitoreo_disponible, 2, '.', '').'</td>';\n\t\t\t\t\t\n\t\t\t\t\t$T->setVar('__paso_uptime', $uptime_td_disponible);\n\t\t\t\t\t$T->setVar('__paso_downtime_global',$downtime_td_disponible);\n\t\t\t\t\t$T->setVar('__paso_down_parcial', $downtime_td_parcial_disponible);\n\t\t\t\t\t$T->setVar('__paso_sin_monitoreo', $sin_monitoreo_td_disponible);\n\t\t\t\t}\n\t\t\t\t$T->parse('lista_negocios', 'LISTA_NEGOCIOS', true);\n\t\t\t}\n\t\t\t$T->setVar('bloque_titulo_evento', '');\n\t\t\tforeach ($conf_eventos as $conf_evento) {\n\t\t\t\tif($i==0 && ($conf_evento->getAttribute('orden')==0 || $conf_evento->getAttribute('orden')==2 )){\n\t\t\t\t\t$evento = $conf_evento->getAttribute('nombre');\n\t\t\t\t\t$T->setVar('__nombre_tabla_negocio', 'Disponibilidad Especial'.'<br>');\n\t\t\t\t\t$T->setVar('__titulo_evento', $evento);\n\t\t\t\t\t$T->parse('bloque_titulo_evento', 'BLOQUE_TITULO_EVENTO',true);\n\t\t\t\t}\n\t\t\t\tif($i==1 && ($conf_evento->getAttribute('orden')==0 || $conf_evento->getAttribute('orden')==2 || $conf_evento->getAttribute('orden')==1)){\n\t\t\t\t\t$evento = $conf_evento->getAttribute('nombre');\n\t\t\t\t\t$T->setVar('__nombre_tabla_negocio', 'Disponibilidad Real'.'<br>');\n\t\t\t\t\t$T->setVar('__titulo_evento', $evento);\n\t\t\t\t\t$T->parse('bloque_titulo_evento', 'BLOQUE_TITULO_EVENTO',true);\n\t\t\t\t}\n\t\t\t\tif($i==2 && ($conf_evento->getAttribute('orden')==0 || $conf_evento->getAttribute('orden')==2 || $conf_evento->getAttribute('orden')==1||$conf_evento->getAttribute('orden')==3 )){\n\t\t\t\t\t$evento = $conf_evento->getAttribute('nombre');\n\t\t\t\t\t$T->setVar('__nombre_tabla_negocio', 'Disponibilidad Normal'.'<br>');\n\t\t\t\t\t$T->setVar('__titulo_evento', $evento);\n\t\t\t\t\t$T->parse('bloque_titulo_evento', 'BLOQUE_TITULO_EVENTO',true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_disponibilidad', 'BLOQUE_DISPONIBILIDAD', true);\n\t\t}\n\t\t$this->tiempo_expiracion = $parser->tiempo_expiracion;\n\t\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}", "public static function showData() {\n\n\t\tforeach(self::$employee_array as $id => $employee) { // Pour chaque ligne on affiche chaque attribut correspondant au colonne du tableau\n\n\t\t\tif($employee->_entityShortName == null) // Gestion du cas où une entité a été supprimée mais pas l'employé de l'entité\n\t\t\t\techo \"<tr><td>null</td><td>\" . $employee->_lastName . \"</td><td>\" . $employee->_firstName . \"</td><td>\" . $employee->_login . \"</td><td><a href=\\\"user.php?action=modifier&id=\" . $employee->_id . \"\\\">modifier</a></td><td><a href=\\\"user.php?action=supprimer&id=\" . $id . \"\\\">supprimer</a></td></tr>\";\n\t\t\telse\n\t\t\t\techo \"<tr><td>\" . $employee->_entityShortName . \"</td><td>\" . $employee->_lastName . \"</td><td>\" . $employee->_firstName . \"</td><td>\" . $employee->_login . \"</td><td><a href=\\\"user.php?action=modifier&id=\" . $employee->_id . \"\\\">modifier</a></td><td><a href=\\\"user.php?action=supprimer&id=\" . $id . \"\\\">supprimer</a></td></tr>\";\n\t\t}\n\t}", "public function TraspasoData(){\r\n\t\t$this->idorigen = \"\";\r\n\t\t$this->iddestino = \"\";\r\n\t\t$this->idusuario = \"\";\r\n\t\t$this->fecha = \"NOW()\";\r\n\r\n\t\t#Realizar el traspaso de cada producto\r\n\t\t$this->idtraspaso = \"\";\r\n\t\t$this->idproducto = \"\";\r\n\t\t$this->cantidad = \"\";\r\n\t}", "public function registroEstudiante()\n {\n $id = Auth::user()->id;\n $detalle_curso = detalle_curso::where('tutor_id', $id)->get();\n $datos = array();\n $cont = 0;\n foreach($detalle_curso as $row)\n {\n $curso = curso::where('codigo', $row->curso_codigo)->first();\n \n $datos[$cont++] = array(\n 'id_detalle' => $row[\"id\"],\n 'curso' => $curso[\"nombre\"],\n 'periodo' => $row[\"periodo\"],\n 'num_periodo' => $row[\"num_periodo\"],\n 'hora_inicio' => $row[\"hora_inicio\"],\n 'dia' => $row[\"dia\"]\n );\n }\n $data = json_encode($datos);\n return view('Tutor/listaEstudiantes')->with('data', $data);\n\n }", "public function Registrar_FormacionProfesional(HojaVida $data){\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n \n $tiporegistro = \"Formación Profesional\";\n $accion = \"Registra una Nueva \".$tiporegistro.\" En el Sistema (Hoja vida) TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_SESSION['idUsuario'];\n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n\n $sql = \"INSERT INTO `th_formacion_profesional`(`for_pro_id_HV`, `for_pro_id_user`, `for_pro_id_userR`, `for_pro_id_nivel_educacion`, \n `for_pro_titulo`,`for_pro_institucion`, `for_pro_fecha_inicio`, `for_pro_fecha_fin`, `for_pro_ruta_certificado`) \n VALUES (?,?,?,?,?,?,?,?,?)\";\n $this->pdo->prepare($sql)\n ->execute(\n array(\n $data->id,\n $data->usuario,\n $idusuario,\n $data->for_pro_id_nivel,\n $data->for_pro_titulo,\n $data->for_pro_institucion,\n $data->for_pro_fecha_inicio,\n $data->for_pro_fecha_fin,\n $data->for_pro_ruta_certificado\n )\n ); \n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "public function getConsulta(){\n\t\t\treturn $this -> resultado;\n\t\t}", "public function Registrar_Ref_Personal(HojaVida $data){\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n \n $tiporegistro = \"Referencia Personal\";\n $accion = \"Registra una Nueva \".$tiporegistro.\" En el Sistema (Hoja vida) TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_SESSION['idUsuario'];\n \n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n\n $sql = \"INSERT INTO `th_referencias_personales`(`ref_id_hv`, `ref_id_usuario`, `ref_id_usuarioR`, `ref_nombre`, `ref_cargo`, `ref_empresa`, `ref_telefono`) \n VALUES (?,?,?,?,?,?,?)\";\n $this->pdo->prepare($sql)\n ->execute(\n array(\n $data->id,\n $data->usuario,\n $idusuario,\n $data->ref_per_nombre,\n $data->ref_per_cargo,\n $data->ref_per_empresa,\n $data->ref_per_telefono\n )\n ); \n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n \n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "public function gerarVenda($titulo,$cliente){\n //$conexao = $c->conexao();\n\n\n $sql = \"INSERT INTO tbpedidos (reg, tipo, titulo, data_inc) VALUES ('$cliente','V','$titulo', NOW()) \";\n\n return $this->conexao->query($sql);\n\n\n }", "public function data()\n {\n $orders=libro::all();\n foreach ($orders as $key => $value) {\n \n if(count(autor::find($value->id_autor)))\n $value->id_autor=autor::find($value->id_autor)->nombre;\n else $value->id_autor='No asignado';\n \n }\n return \\Datatables::of($orders)->addColumn('action', 'libro.partials.vista')->make(true) ; \n }", "public function consultaSeguimientos(){\n\t\t$conect= Yii::app()->db;\n\t\t$sqlConsSegPaiDer=\"select fecha_seguim_compderecho,seguim_compderecho from seguimiento_compderecho \n\t\twhere id_pai=:id_pai and id_derechocespa=:id_derechocespa and num_doc=:num_doc order by fecha_seguim_compderecho desc\";\n\t\t$segCompDer=$conect->createCommand($sqlConsSegPaiDer);\n\t\t$segCompDer->bindParam(\":id_pai\",$this->id_pai,PDO::PARAM_INT);\n\t\t$segCompDer->bindParam(\":id_derechocespa\",$this->id_derechocespa,PDO::PARAM_INT);\n\t\t$segCompDer->bindParam(\":num_doc\",$this->num_doc,PDO::PARAM_STR);\n\t\t$readConsSegPaiDer=$segCompDer->query();\n\t\t$resConsSegPaiDer=$readConsSegPaiDer->readAll();\n\t\t$readConsSegPaiDer->close();\n\t\treturn $resConsSegPaiDer;\n\t}", "function rellenaDatos(){\r\n\r\n $stmt = $this->db->prepare(\"SELECT *\r\n\t\t\t\t\tFROM edificio\r\n\t\t\t\t\tWHERE edificio_id = ?\");\r\n\r\n $stmt->execute(array($this->edificio_id));\r\n $edificio = $stmt->fetch(PDO::FETCH_ASSOC);\r\n\r\n if($edificio != null){\r\n return new EDIFICIO_Model($this->edificio_id, $edificio[\"nombre_edif\"],$edificio[\"direccion_edif\"],$edificio[\"telef_edif\"],\r\n $edificio[\"num_plantas\"],$edificio[\"agrup_edificio\"]);\r\n }else {\r\n return 'Error inesperado al intentar cumplir su solicitud de consulta';\r\n }\r\n\r\n }", "public function data(){\n $id = $this->registro_id;\n $tabla = $this->tabla;\n $datos = '';\n\n if ($tabla == 'conductor') {\n $datos = Persona::where('id','=',$id)->get();\n }elseif ($tabla == 'propietario') {\n $datos = Persona::where('id','=',$id)->get();\n }elseif ($tabla == 'usuarios') {\n $datos = User2::where('id','=',$id)->get();\n }elseif($tabla == 'operadoras') {\n $datos = Operadora::where('id','=',$id)->get();\n }elseif ($tabla == 'rutas') {\n $datos = Ruta::where('id','=',$id)->get();\n }elseif ($tabla == 'marcas') {\n $datos = Marca::where('id','=',$id)->get();\n }elseif ($tabla == 'colores') {\n $datos = Color::where('id','=',$id)->get();\n }elseif($tabla == 'vehiculos') {\n $datos = Vehiculo::where('id','=',$id)->get();\n }\n\n return $datos;\n }", "public function listarIdNome() {\n $rs = $this->model->listarIdNome();\n\n echo $this->toJson($rs);\n }", "public function ObtenerPaciente() {\n $sql= $this->config_mdl->_get_data_condition('os_rx',array(\n 'triage_id'=> $this->input->post('triage_id')\n ));\n $info= $this->config_mdl->_get_data_condition('os_triage',array(\n 'triage_id'=> $this->input->post('triage_id')\n ));\n if(!empty($sql)){\n $this->setOutput(array('accion'=>'1','rx'=>$sql[0],'paciente'=>$info[0]));\n }else{\n $this->setOutput(array('accion'=>'2'));\n }\n }", "public function mostrar()\n\t\t{\n\t\t\tfor ($i=0; $i<count($this->nombres); $i++) { \n\t\t\t\techo $this->nombres[$i].\" \".$this->apellidos[$i].\"<br>\";\n\t\t\t}\n\t\t}", "public function RegistrarDatosPersonales(HojaVida $data){\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n \n $tiporegistro = \"Info. Datos Personales\";\n $accion = \"Registra una Nueva \".$tiporegistro.\" En el Sistema (HOJA VIDA) TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_POST['id_usuarioR'];\n $idusuarioR = $_SESSION['idUsuario'];\n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n\n $sql = \"INSERT INTO `th_personas`(`per_id_usuario`, `per_cedula`, `per_nombres`, `per_apellidos`, `per_fecha_nacimiento`,\n `per_id_dep_nacimiento`, `per_id_ciu_nacimiento`, `per_direccion`, `per_telefono`, `per_celular`, `per_email`, `per_ruta_foto`, \n `per_id_usuarioR`) \n VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n $this->pdo->prepare($sql)\n ->execute(\n array(\n $data->id_usuario,\n $data->per_cedula,\n $data->per_nombres,\n $data->per_apellidos,\n $data->per_fecha_nacimiento,\n $data->per_id_departamento,\n $data->per_id_municipio,\n $data->per_direccion,\n $data->per_telefono,\n $data->per_celular,\n $data->per_email,\n $data->per_ruta_foto,\n $idusuarioR\n )\n ); \n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n \n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "public function __toString()\n {\n return json_encode(array(\n \"idusuario\"=>$this->getIdusuario(),\n \"deslogin\"=>$this->getDeslogin(),\n \"dessenha\"=>$this->getDessenha(),\n \"dataCadastro\"=>$this->getDataCadastro()->format(\"d-m-Y H:i:s\")\n ));\n }", "public function ctlInventarioNuez () {\n \t//if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n \t\t//$Respuesta = Datos::mdlInventarioNuez ($_POST[\"producto\"]);\n \t\t$Respuesta = Datos::mdlInventarioNuez ();\n \t\tforeach ($Respuesta as $Row => $item) {\n\t \t\techo \"<tr>\n\t \t\t\t<td>\".$item[\"nombre\"].\"</td>\n\t \t\t\t<td>\".$item[\"calidad\"].\"</td>\n\t \t\t\t<td>\".$item[\"kgs\"].\"</td>\n\t \t\t\t<td>\".$item[\"precioPromedio\"].\"</td>\n\t \t\t</tr>\";\n\t \t}\n\n\n \t//}\n }", "public function showAseg(){\n $ordenado = \\DB::table('Asegurado')->orderBy('Ap_paterno', 'asc')->get();\n return $ordenado;\n }" ]
[ "0.64914197", "0.6488605", "0.64223367", "0.63989294", "0.63636345", "0.6359123", "0.6351034", "0.6344997", "0.6337876", "0.63306737", "0.62997603", "0.6294971", "0.6286071", "0.6270717", "0.627019", "0.62653273", "0.62581587", "0.6247289", "0.62338734", "0.6231922", "0.6231223", "0.62312037", "0.6224323", "0.6217162", "0.62001663", "0.61840683", "0.6175943", "0.61638045", "0.614636", "0.6145182", "0.6141773", "0.61379", "0.6136779", "0.6107051", "0.6106269", "0.6097706", "0.6089998", "0.6087583", "0.6078844", "0.60634345", "0.60588354", "0.60507727", "0.6040464", "0.6039836", "0.6035093", "0.6006376", "0.6005214", "0.60049546", "0.60045224", "0.5995373", "0.59947705", "0.59945", "0.59895873", "0.59892637", "0.5987701", "0.5981117", "0.59797275", "0.5972164", "0.59689736", "0.59661204", "0.59635454", "0.59560055", "0.59553266", "0.59504193", "0.5947668", "0.59435743", "0.5943191", "0.59386176", "0.59371525", "0.5937033", "0.59351015", "0.5934257", "0.592515", "0.59236836", "0.59215564", "0.5920357", "0.59168255", "0.59166574", "0.5915652", "0.5915619", "0.591396", "0.59087604", "0.5908294", "0.5903153", "0.5897293", "0.5896304", "0.58955586", "0.5895008", "0.589387", "0.58929676", "0.58911836", "0.5887897", "0.5886231", "0.58843166", "0.5876165", "0.5876093", "0.58737636", "0.58718914", "0.5866988", "0.58580476", "0.5855462" ]
0.0
-1
returns first forwarded IP match it finds
function forwarded_ip() { $server=array( 'HTTP_X_FORWARDED_FOR'=>'123.123.123.123.', ); $keys = array( 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'HTTP_CLIENT_IP', 'HTTP_X_CLUSTER_CLIENT_IP', ); foreach($keys as $key) { if(isset($server[$key])) { $ip_array = explode(',', $server[$key]); foreach($ip_array as $ip) { $ip = trim($ip); if(validateIp($ip)){ return $ip; } } } } return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function forwarded_ip(){\n\n // for testing \n $server = array(\n // 'HTTP_X_FORWARDED_FOR'=> \"0.0.0.0,1sd.1.2.3\",\n // 'HTTP_X_FORWARDED' => \"jlaldjfl,99adf,123.123.123.123,1.2.4.4\",\n \n );\n\n $keys = array(\n 'HTTP_X_FORWARDED_FOR', \n 'HTTP_X_FORWARDED', \n 'HTTP_FORWARDED_FOR', \n 'HTTP_FORWARDED',\n 'HTTP_CLIENT_IP', \n 'HTTP_X_CLUSTER_CLIENT_IP',\n );\n\n foreach($keys as $key){\n if(isset($_SERVER[$key])){\n $ip_array = explode(\",\",$_SERVER[$key]);\n\n foreach($ip_array as $ip){\n $ip = trim($ip);\n if(validate_ip($ip)){\n return $ip;\n }\n }\n }\n }\n\n return \"\";\n\n}", "function get_ip()\n{\n\t// No IP found (will be overwritten by for\n\t// if any IP is found behind a firewall)\n\t$ip = FALSE;\n\n\t// If HTTP_CLIENT_IP is set, then give it priority\n\tif (!empty($_SERVER[\"HTTP_CLIENT_IP\"])) {\n\t\t$ip = $_SERVER[\"HTTP_CLIENT_IP\"];\n\t}\n\n\t// User is behind a proxy and check that we discard RFC1918 IP addresses\n\t// if they are behind a proxy then only figure out which IP belongs to the\n\t// user. Might not need any more hackin if there is a squid reverse proxy\n\t// infront of apache.\n\tif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\n\t\t// Put the IP's into an array which we shall work with shortly.\n\t\t$ips = explode (\", \", $_SERVER['HTTP_X_FORWARDED_FOR']);\n\t\tif ($ip) {\n\t\t\tarray_unshift($ips, $ip);\n\t\t\t$ip = FALSE;\n\t\t}\n\n\t\tfor ($i = 0; $i < count($ips); $i++)\n\t\t{\n\t\t\t// Skip RFC 1918 IP's 10.0.0.0/8, 172.16.0.0/12 and\n\t\t\t// 192.168.0.0/16 -- jim kill me later with my regexp pattern\n\t\t\t// below.\n\t\t\tif (!eregi (\"^(10|172\\.16|192\\.168)\\.\", $ips[$i])) {\n\t\t\t\tif (version_compare(phpversion(), \"5.0.0\", \">=\")) {\n\t\t\t\t\tif (ip2long($ips[$i]) != false) {\n\t\t\t\t\t\t$ip = $ips[$i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (ip2long($ips[$i]) != -1) {\n\t\t\t\t\t\t$ip = $ips[$i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return with the found IP or the remote address\n\treturn ($ip ? $ip : $_SERVER['REMOTE_ADDR']);\n}", "public function getFirstIp()\n\t{\n\t\treturn $this->first_ip;\n\t}", "protected static function GetRemoteAddr()\n {\n $ipSet = new IPSet(IPSet::PRIVATE_NETS);\n if ( ! $ipSet->match($_SERVER[\"REMOTE_ADDR\"])) {\n return $_SERVER[\"REMOTE_ADDR\"]; // Remote ADDR is Public Address: Use this! (We want Load-Balancers with private IPs only!)\n }\n if (isset ($_SERVER[\"HTTP_X_FORWARDED_FOR\"])) {\n $forwardsRev = array_reverse($forwards = explode(\",\", $_SERVER[\"HTTP_X_FORWARDED_FOR\"]));\n for ($i=0; $i<count ($forwardsRev); $i++) {\n if ( ! $ipSet->match(trim ($forwardsRev[$i]))) {\n return $forwardsRev[$i]; // Return first non-private IP from last to first\n }\n }\n return $forwards[0]; // Return first IP if no public IP found.\n }\n return $_SERVER[\"REMOTE_ADDR\"]; // Return the private Remote-ADDR\n }", "function detectProxy(){\r\n\r\n\t$ip_sources = array(\r\n\t\t\"HTTP_X_FORWARDED_FOR\",\r\n\t\t\"HTTP_X_FORWARDED\",\r\n\t\t\"HTTP_FORWARDED_FOR\",\r\n\t\t\"HTTP_FORWARDED\",\r\n\t\t\"HTTP_X_COMING_FROM\",\r\n\t\t\"HTTP_COMING_FROM\",\r\n\t\t\"REMOTE_ADDR\"\r\n\t);\r\n\t\r\n\t#loop through array.\r\n\tforeach ($ip_sources as $ip_source){\r\n\t\t#If the ip source exists, capture it\r\n\t\tif (isset($_SERVER[$ip_source])){\r\n\t\t\t$proxy_ip = $_SERVER[$ip_source];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t\r\n\t#if all else fails, just set a false value.\r\n\t$proxy_ip = (isset($proxy_ip)) ? $proxy_ip : $_SERVER[\"REMOTE_ADDR\"];\r\n\r\n\treturn ($proxy_ip);\r\n}", "function direct_ip_match($ALLOWED,$IP)\n\t{\n\t\t$DEBUG=0;\n\t\tif ($DEBUG) print \"<hr>\";\n\t\t$QUERY =<<<EOQ\n\t\t\tSELECT *\n\t\t\tFROM `rodin_firewall_rules` \n\t\t\tWHERE ALLOWED = $ALLOWED\n\t\t\tAND IP = '$IP'\nEOQ;\n\n\t\t$REC=fetch_record($QUERY);\n\t\tif ($DEBUG) {\n\t\t\tprint \"<br>RECORD MATCHING $IP (ALLOWED=$ALLOWED) in query ($QUERY)\";\n\t\t\tvar_dump($REC);\n\t\t}\n\t\t\n\t\treturn $REC;\n\t}", "function get_next($ip) {\n\t\t\tif (IPv6::validate_subnet($ip)) {\n\t\t\t\tlist($ip, $cidr) = explode(\"/\", $ip);\n\t\t\t\treturn IPv6::get_next(IPv6::maxip($ip .\"/\" .$cidr)) .\"/\" .$cidr;\n\t\t\t} else if (IPv6::validate_ip($ip)) {\n\t\t\t\t$binip = IPv6::iptobin($ip);\n\t\t\t\tif ($binip == sprintf(\"%'1\", 128))\n\t\t\t\t\treturn false;\n\t\t\t\telse {\n\t\t\t\t\t$bits = str_split($binip);\n\t\t\t\t\tfor ($index = count($bits)-1; $index >= 0; $index--) {\n\t\t\t\t\t\tif ($bits[$index] == 1)\n\t\t\t\t\t\t\t$bits[$index] = 0;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$bits[$index] = 1;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn IPv6::bintoip(implode(\"\", $bits));\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\treturn false;\n\t\t}", "private function _getProxyIpAddress() {\n static $forwarded = [\n 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED',\n ];\n $flags = FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE;\n foreach ($forwarded as $key) {\n if (!array_key_exists($key, $_SERVER)) {\n continue;\n }\n sscanf($_SERVER[$key], '%[^,]', $ip);\n if (filter_var($ip, FILTER_VALIDATE_IP, $flags) !== FALSE) {\n return $ip;\n }\n }\n return '';\n }", "function get_ip() {\n if ( function_exists( 'apache_request_headers' ) ) {\n $headers = apache_request_headers();\n } else {\n $headers = $_SERVER;\n }\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\n $the_ip = filter_var( $_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 );\n }\n return $the_ip;\n }", "public static function getIP() {\n\n //Just get the headers if we can or else use the SERVER global\n if ( function_exists( 'apache_request_headers' ) ) {\n $rawheaders = apache_request_headers();\n } else {\n $rawheaders = $_SERVER;\n }\n\n // Lower case headers\n $headers = array();\n foreach($rawheaders as $key => $value) {\n $key = trim(strtolower($key));\n if ( !is_string($key) || empty($key) ) continue;\n $headers[$key] = $value;\n }\n\n // $filter_option = FILTER_FLAG_IPV4;\n // $filter_option = FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE;\n $filter_option = 0;\n\n $the_ip = false;\n\n // Check Cloudflare headers\n if ( $the_ip === false && array_key_exists( 'http_cf_connecting_ip', $headers ) ) {\n $pieces = explode(',',$headers['http_cf_connecting_ip']);\n $the_ip = filter_var(current($pieces),FILTER_VALIDATE_IP, $filter_option );\n }\n\n if ( $the_ip === false && array_key_exists( 'cf-connecting-ip', $headers ) ) {\n $pieces = explode(',',$headers['cf-connecting-ip']);\n $the_ip = filter_var(current($pieces),FILTER_VALIDATE_IP, $filter_option );\n }\n\n // Get the forwarded IP from more traditional places\n if ( $the_ip == false && array_key_exists( 'x-forwarded-for', $headers ) ) {\n $pieces = explode(',',$headers['x-forwarded-for']);\n $the_ip = filter_var(current($pieces),FILTER_VALIDATE_IP, $filter_option );\n }\n\n if ( $the_ip === false && array_key_exists( 'http_x_forwarded_for', $headers ) ) {\n $pieces = explode(',',$headers['http_x_forwarded_for']);\n $the_ip = filter_var(current($pieces),FILTER_VALIDATE_IP, $filter_option );\n }\n\n if ( $the_ip === false && array_key_exists( 'remote_addr', $headers ) ) {\n $the_ip = filter_var( $headers['remote_addr'], FILTER_VALIDATE_IP, $filter_option );\n }\n\n // Fall through and get *something*\n if ( $the_ip === false && array_key_exists( 'REMOTE_ADDR', $_SERVER ) ) {\n $the_ip = filter_var( $_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, $filter_option );\n }\n\n if ( $the_ip === false ) $the_ip = NULL;\n return $the_ip;\n }", "function getRemoteAddr()\n{\n\tif (isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND $_SERVER['HTTP_X_FORWARDED_FOR'] AND (!isset($_SERVER['REMOTE_ADDR']) OR preg_match('/^127\\..*/i', trim($_SERVER['REMOTE_ADDR'])) OR preg_match('/^172\\.16.*/i', trim($_SERVER['REMOTE_ADDR'])) OR preg_match('/^192\\.168\\.*/i', trim($_SERVER['REMOTE_ADDR'])) OR preg_match('/^10\\..*/i', trim($_SERVER['REMOTE_ADDR']))))\n\t{\n\t\tif (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ','))\n\t\t{\n\t\t\t$ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n\t\t\treturn $ips[0];\n\t\t}\n\t\telse\n\t\t\treturn $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t}\n\treturn $_SERVER['REMOTE_ADDR'];\n}", "public static function fetch_alt_ip() {\n $alt_ip = $_SERVER['REMOTE_ADDR'];\n\n if (isset($_SERVER['HTTP_CLIENT_IP'])) {\n $alt_ip = $_SERVER['HTTP_CLIENT_IP'];\n } else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND preg_match_all('#\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}#s', $_SERVER['HTTP_X_FORWARDED_FOR'], $matches)) {\n // try to avoid using an internal IP address, its probably a proxy\n $ranges = array(\n '10.0.0.0/8' => array(ip2long('10.0.0.0'), ip2long('10.255.255.255')),\n '127.0.0.0/8' => array(ip2long('127.0.0.0'), ip2long('127.255.255.255')),\n '169.254.0.0/16' => array(ip2long('169.254.0.0'), ip2long('169.254.255.255')),\n '172.16.0.0/12' => array(ip2long('172.16.0.0'), ip2long('172.31.255.255')),\n '192.168.0.0/16' => array(ip2long('192.168.0.0'), ip2long('192.168.255.255')),\n );\n foreach ($matches[0] AS $ip) {\n $ip_long = ip2long($ip);\n if ($ip_long === false) {\n continue;\n }\n\n $private_ip = false;\n foreach ($ranges AS $range) {\n if ($ip_long >= $range[0] AND $ip_long <= $range[1]) {\n $private_ip = true;\n break;\n }\n }\n\n if (!$private_ip) {\n $alt_ip = $ip;\n break;\n }\n }\n } else if (isset($_SERVER['HTTP_FROM'])) {\n $alt_ip = $_SERVER['HTTP_FROM'];\n }\n\n return $alt_ip;\n }", "public static function getRemoteAddr() {\n if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND $_SERVER['HTTP_X_FORWARDED_FOR'] AND ( !isset($_SERVER['REMOTE_ADDR']) OR preg_match('/^127\\..*/i', trim($_SERVER['REMOTE_ADDR'])) OR preg_match('/^172\\.16.*/i', trim($_SERVER['REMOTE_ADDR'])) OR preg_match('/^192\\.168\\.*/i', trim($_SERVER['REMOTE_ADDR'])) OR preg_match('/^10\\..*/i', trim($_SERVER['REMOTE_ADDR'])))) {\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',')) {\n $ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n return $ips[0];\n } else\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n return $_SERVER['REMOTE_ADDR'];\n }", "function guess_location_from_ip( $dotted_ip ) {\n\tglobal $wpdb, $cache_group, $cache_life;\n\n\t$cache_key = 'guess_location_from_ip:' . $dotted_ip;\n\t$location = wp_cache_get( $cache_key, $cache_group );\n\n\tif ( $location !== false ) {\n\t\tif ( '__NOT_FOUND__' == $location ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $location;\n\t}\n\n\t$long_ip = false;\n\n\tif ( filter_var( $dotted_ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ) {\n\t\t$long_ip = ip2long( $dotted_ip );\n\t\t$from = 'ip2location';\n\t\t$where = 'ip_to >= %d';\n\t} elseif ( filter_var( $dotted_ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) ) {\n\t\t$long_ip = _ip2long_v6( $dotted_ip );\n\t\t$from = 'ipv62location';\n\t\t$where = 'ip_to >= CAST( %s AS DECIMAL( 39, 0 ) )';\n\t}\n\n\tif ( false === $long_ip || ! isset( $from, $where ) ) {\n\t\twp_cache_set( $cache_key, '__NOT_FOUND__', $cache_group, $cache_life );\n\n\t\treturn false;\n\t}\n\n\t$row = $wpdb->get_row( $wpdb->prepare( \"\n\t\tSELECT ip_city, ip_latitude, ip_longitude, country_short\n\t\tFROM $from\n\t\tWHERE $where\n\t\tORDER BY ip_to ASC\n\t\tLIMIT 1\",\n\t\t$long_ip\n\t) );\n\n\t// Unknown location:\n\tif ( ! $row || '-' == $row->country_short ) {\n\t\twp_cache_set( $cache_key, '__NOT_FOUND__', $cache_group, $cache_life );\n\n\t\treturn false;\n\t}\n\n\twp_cache_set( $cache_key, $row, $cache_group, $cache_life );\n\n\treturn $row;\n}", "function get_ip() {\n\tif ( function_exists( 'apache_request_headers' ) ) {\n\t\t$headers = apache_request_headers();\n\t} else {\n\t\t$headers = $_SERVER;\n\t}\n\t$the_ip='';\n\t//Get the forwarded IP if it exists\n\tif ( array_key_exists( 'X-Forwarded-For', $headers ) && filter_var( $headers['X-Forwarded-For'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ) {\n\t\t$the_ip = $headers['X-Forwarded-For'];\n\t} elseif ( array_key_exists( 'HTTP_X_FORWARDED_FOR', $headers ) && \n\t\tfilter_var( $headers['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 )) {\n\t\t$the_ip = $headers['HTTP_X_FORWARDED_FOR'];\n\t} else \n\t\t$the_ip = filter_var( $_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 );\n\tif (empty($the_ip)) $the_ip='10.0.0.1';\n\treturn $the_ip;\n\t/*$ipaddress ='';\n\tif ($_SERVER['HTTP_CLIENT_IP'] != '127.0.0.1')\n\t$ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n\telse if ($_SERVER['HTTP_X_FORWARDED_FOR'] != '127.0.0.1')\n\t$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\telse if ($_SERVER['HTTP_X_FORWARDED'] != '127.0.0.1')\n\t$ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n\telse if ($_SERVER['HTTP_FORWARDED_FOR'] != '127.0.0.1')\n\t$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n\telse if ($_SERVER['HTTP_FORWARDED'] != '127.0.0.1')\n\t$ipaddress = $_SERVER['HTTP_FORWARDED'];\n\telse if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1')\n\t$ipaddress = $_SERVER['REMOTE_ADDR'];\n\telse\n\t$ipaddress = 'UNKNOWN';\n\treturn $ipaddress;*/\n}", "public function getVisitorIP(){\n\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t$proxy = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\n\n\t\tif(preg_match(\"/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$/\",$proxy))\n\t\t $ip = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\n\n\t\t//return '127.0.0.1';\n\t\treturn $ip;\n\t}", "function get_ip() {\n if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') {\n $fwd_addresses = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n $ip_address = $fwd_addresses[0];\n } else {\n $ip_address = $_SERVER['REMOTE_ADDR'];\n }\n\n return $ip_address;\n}", "function getRealIpAddr()\n{\n\tif (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet\n\t{\n\t\t$ip=$_SERVER['HTTP_CLIENT_IP'];\n\t}\n\telseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy\n\t{\n\t\t$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n\t}\n\telseif ($_SERVER[\"HTTP_CF_CONNECTING_IP\"]) {\n\t\t$ip = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n }\n\telse\n\t{\n\t\t$ip=$_SERVER['REMOTE_ADDR'];\n\t}\n\treturn $ip;\n}", "function partial_ip_match($ALLOWED,$IP)\n\t{\n\t\t$DEBUG=0;\n\t\t$REC=null;\n\t\tif ($DEBUG) print \"<hr>\";\n\t\tif (!$ALLOWED) $ALLOWED=0;\n\t\t\n\t\t$QUERY =<<<EOQ\n\t\t\tSELECT *\n\t\t\tFROM `rodin_firewall_rules` \n\t\t\tWHERE ALLOWED = $ALLOWED\nEOQ;\n\t\t\t$RECS = fetch_records($QUERY);\n\t\t\tif ($RECS)\n\t\t\t{\n\t\t\t\tif ($DEBUG) {print \"Trying IP partial match \" ;var_dump($RECS);}\n\t\t\t\tforeach($RECS as $RECX)\n\t\t\t\t{\n\t\t\t\t\t$XIP=$RECX['IP'];\n\t\t\t\t\t$partial_match= (strstr($IP,$XIP) || strstr($XIP,$IP));\n\t\t\t\t\tif ($DEBUG) print \"<br> IP: $XIP \".($partial_match?'YES':'NO');\n\t\t\t\t\tif ($partial_match)\n\t\t\t\t\t{\n\t\t\t\t\t\t$REC=$RECX;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {if ($DEBUG) print \"EMPTY RESULT FOR QUERY: ($QUERY)\";}\n\t\t\t\n\t\treturn $REC;\n\t}", "public static function proxyForwardedFor() {\n\t\tif (isset($_SERVER) && isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t\treturn $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t}\n\n\t\treturn null;\n\t}", "public function getRealIpAddr(){\n\t\t//check ip from share internet\n\t if (!empty($_SERVER['HTTP_CLIENT_IP'])){\n\t\t\t$ip=$_SERVER['HTTP_CLIENT_IP'];\n\t }elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){\n\t\t\t//to check ip is pass from proxy\n\t\t\t$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n\t } else {\n\t\t\t$ip=$_SERVER['REMOTE_ADDR'];\n\t\t}\n\t\treturn $ip;\n\t}", "function getRealIpAddr()\n{\n if (!empty($_SERVER['HTTP_CLIENT_IP']))\n {\n $ip=$_SERVER['HTTP_CLIENT_IP'];\n }\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n //to check ip is pass from proxy\n {\n $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n else\n {\n $ip=$_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n}", "function getRealIpAddr()\n{\nif(!empty($_SERVER['HTTP_CLIENT_IP']))\n//check if from share internet\n{\n\t$ip = $_SERVER['HTTP_CLIENT_IP'];\n}\n elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n //to check ip is pass from proxy\n {\n\t $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n else{\n\t $ip = $_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n}", "public static function realIP() {\n\t\tif (isset($_SERVER['HTTP_CLIENT_IP']))\n\t\t\t// Behind proxy\n\t\t\treturn $_SERVER['HTTP_CLIENT_IP'];\n\t\telseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t\t// Use first IP address in list\n\t\t\t$_ip=explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']);\n\t\t\treturn $_ip[0];\n\t\t}\n\t\treturn $_SERVER['REMOTE_ADDR'];\n\t}", "public function gatewayIpAddr()\n {\n $datas = 'N.A';\n\n if(exec('ip route | awk \\'/a/ { print $3 }\\'',$output))\n $datas = $output[0];\n\n return $datas;\n }", "private function findIP()\n {\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip_address = $_SERVER['HTTP_CLIENT_IP'];\n }\n //whether ip is from proxy\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n //whether ip is from remote address\n else {\n $ip_address = $_SERVER['REMOTE_ADDR'];\n }\n return $ip_address;\n }", "function getRealIpAddr()\n{\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet\n {\n $ip=$_SERVER['HTTP_CLIENT_IP'];\n }\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy\n {\n $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n else\n {\n $ip=$_SERVER['REMOTE_ADDR'];\n }\n return $ip;\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 }", "private function getIp()\n\t {\n\t \n\t if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) &&( $_SERVER['HTTP_X_FORWARDED_FOR'] != '' ))\n\t {\n\t $client_ip =\n\t ( !empty($_SERVER['REMOTE_ADDR']) ) ?\n\t $_SERVER['REMOTE_ADDR']\n\t :\n\t ( ( !empty($_ENV['REMOTE_ADDR']) ) ?\n\t $_ENV['REMOTE_ADDR']\n\t :\n\t \"unknown\" );\n\t \n\t // los proxys van añadiendo al final de esta cabecera\n\t // las direcciones ip que van \"ocultando\". Para localizar la ip real\n\t // del usuario se comienza a mirar por el principio hasta encontrar\n\t // una dirección ip que no sea del rango privado. En caso de no\n\t // encontrarse ninguna se toma como valor el REMOTE_ADDR\n\t \n\t $entries = split('[, ]', $_SERVER['HTTP_X_FORWARDED_FOR']);\n\t \n\t reset($entries);\n\t while (list(, $entry) = each($entries))\n\t {\n\t $entry = trim($entry);\n\t if ( preg_match(\"/^([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)/\", $entry, $ip_list) )\n\t {\n\t // http://www.faqs.org/rfcs/rfc1918.html\n\t $private_ip = array(\n\t '/^0\\./',\n\t '/^127\\.0\\.0\\.1/',\n\t '/^192\\.168\\..*/',\n\t '/^172\\.((1[6-9])|(2[0-9])|(3[0-1]))\\..*/',\n\t '/^10\\..*/');\n\t \n\t $found_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);\n\t \n\t if ($client_ip != $found_ip)\n\t {\n\t $client_ip = $found_ip;\n\t break;\n\t }\n\t }\n\t }\n\t }\n\t else\n\t {\n\t $client_ip =\n\t ( !empty($_SERVER['REMOTE_ADDR']) ) ?\n\t $_SERVER['REMOTE_ADDR']\n\t :\n\t ( ( !empty($_ENV['REMOTE_ADDR']) ) ?\n\t $_ENV['REMOTE_ADDR']\n\t :\n\t \"unknown\" );\n\t }\n\t \n\t return $client_ip;\n\t \n\t}", "static function getRealIpAddr()\r\n\t{\r\n\t\tif (!empty($_SERVER['HTTP_CLIENT_IP']) && ($_SERVER['HTTP_CLIENT_IP']!=\"unknown\")) //check ip from share internet\r\n\t\t\t$ip = $_SERVER['HTTP_CLIENT_IP'];\r\n\t\telseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']) && ($_SERVER['HTTP_X_FORWARDED_FOR']!=\"unknown\")) //to check ip is pass from proxy\r\n\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n\t\telse\r\n\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\r\n\r\n\t\treturn $ip;\r\n\t}", "function getRealIpAddr()\n{\nif (!empty($_SERVER['HTTP_CLIENT_IP']))\n\n//CHECK IP FROM SHARE INTERNET\n\n{\n$ip=$_SERVER['HTTP_CLIENT_IP'];\n\n}\n\nelse if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n\n// to check if ip is pass from proxy\n\n{\n $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n}\nelse\n{\n$ip=$_SERVER['REMOTE_ADDR'];\n}\nreturn $ip;\n}", "public function doResolveHost() {\r\n if (preg_match('|[a-zA-Z]|', $this->getTarget())) {\r\n return $this->resolveHost($this->getTarget());\r\n }\r\n return $this->resolveAddr($this->getTarget());\r\n }", "function f_getIP() {\r\n $ip_keys = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR');\r\n foreach ($ip_keys as $key) {\r\n if (array_key_exists($key, $_SERVER) === true) {\r\n foreach (explode(',', $_SERVER[$key]) as $ip) {\r\n // trim for safety measures\r\n $ip = trim($ip);\r\n // attempt to validate IP\r\n ferror_log(\"Detected IP address: \" . $ip);\r\n if (f_validateIP($ip)) {\r\n return $ip;\r\n }\r\n }\r\n }\r\n }\r\n return isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : false;\r\n}", "function getRealIpAddr(){\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n //check ip from share internet\n $ip=$_SERVER['HTTP_CLIENT_IP'];\n }elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n //check ip is pass from proxy\n $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n }else {\n $ip=$_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n}", "public function getGivenIp()\n\t{\n\t\treturn $this->given_ip;\n\t}", "public function getXForwardedFor();", "private function auto_reverse_proxy_remote_ip(){\n $remote_addr = $_SERVER['REMOTE_ADDR'];\n if (!empty($_SERVER['X_FORWARDED_FOR'])) {\n $X_FORWARDED_FOR = explode(',', $_SERVER['X_FORWARDED_FOR']);\n if (!empty($X_FORWARDED_FOR)) {\n $remote_addr = trim($X_FORWARDED_FOR[0]);\n }\n }\n /*\n * Some php environments will use the $_SERVER['HTTP_X_FORWARDED_FOR'] \n * variable to capture visitor address information.\n */\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $HTTP_X_FORWARDED_FOR= explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n if (!empty($HTTP_X_FORWARDED_FOR)) {\n $remote_addr = trim($HTTP_X_FORWARDED_FOR[0]);\n }\n }\n return preg_replace('/[^0-9a-f:\\., ]/si', '', $remote_addr);\n }", "function getIp()\n{\n $ip = false;\n\n if(!empty($_SERVER['HTTP_CLIENT_IP']))\n {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n }\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n {\n $ips = explode(\",\", \n $_SERVER['HTTP_X_FORWARDED_FOR']);\n for ($i = 0; $i < count($ips); $i++)\n {\n $ips = trim($ips[$i]);\n if (!eregi(\"^(10|172\\.16|192\\.168)\\.\", \n $ips[$i]))\n {\n $ip = $ips[$i];\n break;\n }\n }\n }\n elseif (!empty($_SERVER['HTTP_VIA']))\n {\n $ips = explode(\",\", \n $_SERVER['HTTP_VIA']);\n for ($i = 0; $i < count($ips); $i++)\n {\n $ips = trim($ips[$i]);\n if (!eregi(\"^(10|172\\.16|192\\.168)\\.\", \n $ips[$i]))\n {\n $ip = $ips[$i];\n break;\n }\n }\n }\n elseif (!empty($_SERVER['REMOTE_ADDR']))\n {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n\n if (($longip = ip2long($ip)) !== false)\n {\n if ($ip == long2ip($longip))\n {\n return $ip;\n }\n }\n \n return false;\n}", "function getRealIPAddress() {\r\n\t\tif (!empty($_SERVER['HTTP_CLIENT_IP'])) {\r\n\t\t\t// Check ip from share internet\r\n\t\t\t$ip = $_SERVER['HTTP_CLIENT_IP'];\r\n\t\t}\r\n\t\telse if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\n\t\t\t// Check ip passed from proxy\r\n\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\r\n\t\t}\r\n\t\treturn $ip;\r\n\t}", "public static function get_x_forwarded_ip()\r\n\t{\r\n\t\treturn $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n\t}", "function find($ip, $url, $limit);", "public static function real_ip() {\n foreach (array(\n 'HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'REMOTE_ADDR'\n ) as $key) {\n if (array_key_exists($key, $_SERVER) === true) {\n foreach (explode(',', $_SERVER[$key]) as $ip) {\n $ip = trim($ip); // just to be safe\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) {\n return $ip;\n }\n }\n }\n }\n }", "function GetUserIP()\n{\n if (isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"])) {\n $_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n $_SERVER['HTTP_CLIENT_IP'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n }\n $client = @$_SERVER['HTTP_CLIENT_IP'];\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n $remote = $_SERVER['REMOTE_ADDR'];\n\n if(filter_var($client, FILTER_VALIDATE_IP))\n {\n $ip = $client;\n }\n elseif(filter_var($forward, FILTER_VALIDATE_IP))\n {\n $ip = $forward;\n }\n else\n {\n $ip = $remote;\n }\n\n return $ip;\n}", "private function get_nextHop()\n\t{\n\t\treturn $this->m_nextHop;\n\t}", "public static function getRealIpAddr()\n {\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet\n {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy\n {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n }", "public static function get_ip() {\n //Just get the headers if we can or else use the SERVER global\n if ( function_exists( 'apache_request_headers' ) ) {\n $headers = apache_request_headers();\n } else {\n $headers = $_SERVER;\n }\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\n $the_ip = filter_var( $_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 );\n }\n return $the_ip;\n }", "function getRealIpAddr()\r\n{\r\nif (!empty($_SERVER[\"HTTP_CLIENT_IP\"]))\r\n{\r\n //check for ip from share internet\r\n $ip = $_SERVER[\"HTTP_CLIENT_IP\"];\r\n}\r\nelseif (!empty($_SERVER[\"HTTP_X_FORWARDED_FOR\"]))\r\n{\r\n // Check for the Proxy User\r\n $ip = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\r\n}\r\nelse\r\n{\r\n $ip = $_SERVER[\"REMOTE_ADDR\"];\r\n}\r\n \r\n// This will print user's real IP Address\r\n// does't matter if user using proxy or not.\r\nreturn $ip;\r\n}", "public function getFallbackAddr()\n {\n return $this->fallback_addr;\n }", "public function determineInitialForward(Request $request);", "function ObtenerRealIP() {\n\tif (!empty($_SERVER['HTTP_CLIENT_IP']))\n\t\treturn $_SERVER['HTTP_CLIENT_IP'];\n\t \n\tif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n\t\treturn $_SERVER['HTTP_X_FORWARDED_FOR'];\n \n\treturn $_SERVER['REMOTE_ADDR'];\n}", "function ObtenerRealIP() {\n\tif (!empty($_SERVER['HTTP_CLIENT_IP']))\n\t\treturn $_SERVER['HTTP_CLIENT_IP'];\n\t \n\tif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n\t\treturn $_SERVER['HTTP_X_FORWARDED_FOR'];\n \n\treturn $_SERVER['REMOTE_ADDR'];\n}", "function real_ip_ad () {\n\t\t\n\t\tif (!empty($_SERVER[\"HTTP_CLIENT_IP\"]))\n\t\t{\n\t\t# check for ip from shared internet\n\t\t$ip = $_SERVER[\"HTTP_CLIENT_IP\"];\n\t\t}\n\t\telseif (!empty($_SERVER[\"HTTP_X_FORWARDED_FOR\"]))\n\t\t{\n\t\t// Check for the Proxy User\n\t\t$ip = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\n\t\t}\n\t\telse\n\t\t{\n\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t}\n\t\t// This will print user's real IP Address\n\t\t// does't matter if user using proxy or not.\n\t\treturn $ip;\n\t}", "protected function get_ip() {\n\t\t// Loop over server keys that could contain the client IP address,\n\t\t// and return the first valid one.\n\t\tforeach ( array( 'REMOTE_ADDR', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR' ) as $key ) {\n\t\t\tif ( isset( $_SERVER[ $key ] ) and preg_match( '~^(?:\\d{1,3}+\\.){3}\\d{1,3}+$~D', $_SERVER[ $key ] ) ) {\n\t\t\t\treturn $_SERVER[ $key ];\n\t\t\t}\n\t\t}\n\t}", "function getCamIP($name) {\n\t$query = sprintf(\"SELECT ipaddress FROM Nodes WHERE nodename ='%s'\",\n\t\tmysql_real_escape_string($name));\n\t$result = db_query($query);\n\t$row = mysql_fetch_row($result);\n\treturn $row[0];\n}", "function getUserIP()\n{\n if (isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"])) {\n $_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n $_SERVER['HTTP_CLIENT_IP'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n }\n $client = @$_SERVER['HTTP_CLIENT_IP'];\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n $remote = $_SERVER['REMOTE_ADDR'];\n\n if(filter_var($client, FILTER_VALIDATE_IP))\n {\n $ip = $client;\n }\n elseif(filter_var($forward, FILTER_VALIDATE_IP))\n {\n $ip = $forward;\n }\n else\n {\n $ip = $remote;\n }\n\n return $ip;\n}", "public static function getIp()\n {\n // Use $_SERVER or get the headers if we can\n $headers = $_SERVER;\n if (function_exists('apache_request_headers')) {\n $headers = apache_request_headers();\n }\n\n // Get the forwarded IP if it exists\n $the_ip = $_SERVER['REMOTE_ADDR'];\n if (array_key_exists('X-Forwarded-For', $headers)) {\n $the_ip = $headers['X-Forwarded-For'];\n } elseif (array_key_exists('HTTP_X_FORWARDED_FOR', $headers)) {\n $the_ip = $headers['HTTP_X_FORWARDED_FOR'];\n }\n $arrIp = explode(',', $the_ip);\n\n return filter_var(trim(trim($arrIp[0]), '[]'), FILTER_VALIDATE_IP);\n }", "function get_ip_address()\n{\n//\tif( isDev() )\n//\t\treturn \"66.135.205.14\";\t// US (ebay.com)\n//\t\treturn \"46.122.252.60\"; // ljubljana\n//\t\treturn \"190.172.82.24\"; // argentinia?\n//\t\treturn \"84.154.26.132\"; // probably invalid ip from munich\n//\t\treturn \"203.208.37.104\"; // google.cn\n//\t\treturn \"62.215.83.54\";\t// kuwait\n//\t\treturn \"41.250.146.224\";\t// Morocco (rtl!)\n//\t\treturn \"66.135.205.14\";\t// US (ebay.com)\n//\t\treturn \"121.243.179.122\";\t// india\n//\t\treturn \"109.253.21.90\";\t// invalid (user says UK)\n//\t\treturn \"82.53.187.74\";\t// IT\n//\t\treturn \"190.172.82.24\";\t// AR\n//\t\treturn \"99.230.167.125\";\t// CA\n//\t\treturn \"95.220.134.145\";\t// N/A\n//\t\treturn \"194.126.108.2\";\t// Tallinn/Estonia (Skype static IP)\n\n\tstatic $DETECTED_CLIENT_IP = 'undefined';\n\n\tif( $DETECTED_CLIENT_IP !== 'undefined' )\n\t\treturn $DETECTED_CLIENT_IP;\n\n\t$proxy_headers = array(\n\t\t'HTTP_VIA',\n\t\t'HTTP_X_FORWARDED_FOR',\n\t\t'HTTP_FORWARDED_FOR',\n\t\t'HTTP_X_FORWARDED',\n\t\t'HTTP_FORWARDED',\n\t\t'HTTP_CLIENT_IP',\n\t\t'HTTP_FORWARDED_FOR_IP',\n\t\t'VIA',\n\t\t'X_FORWARDED_FOR',\n\t\t'FORWARDED_FOR',\n\t\t'X_FORWARDED',\n\t\t'FORWARDED',\n\t\t'CLIENT_IP',\n\t\t'FORWARDED_FOR_IP',\n\t\t'HTTP_PROXY_CONNECTION',\n\t\t'REMOTE_ADDR' // REMOTE_ADDR must be last -> fallback\n\t);\n\n\tforeach( $proxy_headers as $ph )\n\t{\n\t\tif( !empty($_SERVER) && isset($_SERVER[$ph]) )\n\t\t{\n\t\t\t$DETECTED_CLIENT_IP = $_SERVER[$ph];\n\t\t\tbreak;\n\t\t}\n\t\telseif( !empty($_ENV) && isset($_ENV[$ph]) )\n\t\t{\n\t\t\t$DETECTED_CLIENT_IP = $_ENV[$ph];\n\t\t\tbreak;\n\t\t}\n\t\telseif( @getenv($ph) )\n\t\t{\n\t\t\t$DETECTED_CLIENT_IP = getenv($ph);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif( !isset($DETECTED_CLIENT_IP) )\n\t\treturn false;\n\n\t$is_ip = preg_match('/^(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})/',$DETECTED_CLIENT_IP,$regs);\n\tif( $is_ip && (count($regs) > 0) )\n\t\t$DETECTED_CLIENT_IP = $regs[1];\n\treturn $DETECTED_CLIENT_IP;\n}", "function getUserIP()\r\n{\r\n if (isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"])) {\r\n $_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\r\n $_SERVER['HTTP_CLIENT_IP'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\r\n }\r\n $client = @$_SERVER['HTTP_CLIENT_IP'];\r\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\r\n $remote = $_SERVER['REMOTE_ADDR'];\r\n\r\n if(filter_var($client, FILTER_VALIDATE_IP))\r\n {\r\n $ip = $client;\r\n }\r\n elseif(filter_var($forward, FILTER_VALIDATE_IP))\r\n {\r\n $ip = $forward;\r\n }\r\n else\r\n {\r\n $ip = $remote;\r\n }\r\n\r\n return $ip;\r\n}", "private function getIP(){\n\t\tif( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] )) $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\telse if( isset( $_SERVER ['HTTP_VIA'] )) $ip = $_SERVER['HTTP_VIA'];\n\t\telse if( isset( $_SERVER ['REMOTE_ADDR'] )) $ip = $_SERVER['REMOTE_ADDR'];\n\t\telse $ip = null ;\n\t\treturn $ip;\n\t}", "function getUserIP(){\n $client = @$_SERVER['HTTP_CLIENT_IP'];\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n $remote = $_SERVER['REMOTE_ADDR'];\n\n if(filter_var($client, FILTER_VALIDATE_IP))\n {\n $ip = $client;\n }\n elseif(filter_var($forward, FILTER_VALIDATE_IP))\n {\n $ip = $forward;\n }\n else\n {\n $ip = $remote;\n }\n\n return $ip;\n}", "function get_user_ip() {\n if (isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"])) {\n $_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n $_SERVER['HTTP_CLIENT_IP'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n }\n $client = @$_SERVER['HTTP_CLIENT_IP'];\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n $remote = $_SERVER['REMOTE_ADDR'];\n\n if(filter_var($client, FILTER_VALIDATE_IP))\n {\n $ip = $client;\n }\n elseif(filter_var($forward, FILTER_VALIDATE_IP))\n {\n $ip = $forward;\n }\n else\n {\n $ip = $remote;\n }\n\n return $ip;\n }", "function next_wg_if() {\n\tglobal $config, $wgg;\n\n\twg_globals();\n\n\t$used_ifs = array();\n\n\tforeach ($wgg['tunnels'] as $tunnel) {\n\n\t\t$used_ifs[] = $tunnel['name'];\n\n\t}\n\n\tfor ($ifnum = 0; $ifnum < $wgg['max_tunnels']; $ifnum++) {\n\n\t\t$want_if = \"{$wgg['if_prefix']}{$ifnum}\";\n\t\t\n\t\tif (!in_array($want_if, $used_ifs)) {\n\n\t\t\treturn $want_if;\n\n\t\t}\n\n\t}\n\n\treturn -1;\n\t\n}", "function gethostbyname6($host, $try_a = false) {\n // if $try_a is true, if AAAA fails, it tries for A\n // the first match found is returned\n // otherwise returns false\n\n $dns = gethostbynamel6($host, $try_a);\n if ($dns == false) { return false; }\n else { return $dns[0]; }\n}", "function match_first($text, $regex){\n\t\t\n\t\t$return = null;\n\t\tpreg_match_all($regex, $text, $matches, PREG_PATTERN_ORDER);\n\n\t\tif(sizeof($matches) > 0 && isset($matches[0][0])){\n\t\t\t$return = $matches[0][0];\n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "private function getIP(){\n \n if( isset($_SERVER['HTTP_X_FORWARDED_FOR']) ){ \n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n \n else{\n \n if( isset($_SERVER ['HTTP_VIA']) ){\n $ip = $_SERVER['HTTP_VIA'];\n }\n else{\n \n if( isset( $_SERVER ['REMOTE_ADDR'] )){\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n else{\n $ip = null ;\n }\n }\n \n }\n \n \n return $ip; //retorna la IP\n }", "function get_user_IP(){\n\t\tif (isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"])) {\n\t\t\t$_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n\t\t\t$_SERVER['HTTP_CLIENT_IP'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n\t\t}\n\t\t$client = @$_SERVER['HTTP_CLIENT_IP'];\n\t\t$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t$remote = $_SERVER['REMOTE_ADDR'];\n\n\t\tif(filter_var($client, FILTER_VALIDATE_IP)){\n\t\t\t$ip = $client;\n\t\t}elseif(filter_var($forward, FILTER_VALIDATE_IP)){\n\t\t\t$ip = $forward;\n\t\t} else {\n\t\t\t$ip = $remote;\n\t\t}\n\t\treturn $ip;\n\t}", "private function _getVisitorIP() {\n $rVal = \"\";\n\n if ( isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"]) ) {\n $rVal = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n } else {\n if (getenv('HTTP_X_FORWARDED_FOR')) {\n $rVal = getenv('HTTP_X_FORWARDED_FOR');\n } else {\n $rVal = getenv('REMOTE_ADDR');\n }\n }\n\n // Return the IPv4 Address\n return NoNull($rVal);\n }", "public static function proxy(){\t\t\treturn ($_SERVER['HTTP_X_FORWARDED_FOR']\n\t\t\t || $_SERVER['HTTP_X_FORWARDED']\n\t\t\t || $_SERVER['HTTP_FORWARDED_FOR']\n\t\t\t || $_SERVER['HTTP_VIA']\n\t\t\t || in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554))\n\t\t\t || @fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 30));\n\t\t}", "function searchIP()\t{\n \t$position = mt_rand(1, $this->rnd_ips_number);\n $query = \"select ip from \".self::RNDIPSC_NAME.\" where id=\".$position;\n if ($result = $this->db_conn->query($query)) {\n $row = $result->fetch_assoc();\n return $row[\"ip\"];\n }\n else {\n die (\"Error sending the query '\".$query.\"' to MySQL\");\n }\n\t}", "function getIfaddrIndex($p_ip) {\n $ifaddrIndex = '';\n foreach ($this->ifaddrs as $index => $oIfaddr) {\n if (is_object($oIfaddr)) { // should always be true\n if ($oIfaddr->getValue('ifaddr')==$p_ip) {\n $ifaddrIndex = $index;\n break;\n }\n }\n }\n return $ifaddrIndex;\n }", "function get_ip_address() {\n // check for shared internet/ISP IP\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_CLIENT_IP'])) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n\n // check for IPs passing through proxies\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n // check if multiple ips exist in var\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n if ($this->validate_ip($ip))\n return $ip;\n }\n } else {\n if ($this->validate_ip($_SERVER['HTTP_X_FORWARDED_FOR']))\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_X_FORWARDED']))\n return $_SERVER['HTTP_X_FORWARDED'];\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && $this->validate_ip($_SERVER['HTTP_FORWARDED_FOR']))\n return $_SERVER['HTTP_FORWARDED_FOR'];\n if (!empty($_SERVER['HTTP_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_FORWARDED']))\n return $_SERVER['HTTP_FORWARDED'];\n\n // return unreliable ip since all else failed\n return $_SERVER['REMOTE_ADDR'];\n }", "function getVisitorIP()\r\n {\r\n $ip_regexp = \"/^([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})/\"; \r\n\r\n //Retrieve IP address from which the user is viewing the current page \r\n if (isset ($HTTP_SERVER_VARS[\"HTTP_X_FORWARDED_FOR\"]) && !empty ($HTTP_SERVER_VARS[\"HTTP_X_FORWARDED_FOR\"]))\r\n { \r\n $visitorIP = (!empty ($HTTP_SERVER_VARS[\"HTTP_X_FORWARDED_FOR\"])) ? $HTTP_SERVER_VARS[\"HTTP_X_FORWARDED_FOR\"] : ((!empty ($HTTP_ENV_VARS['HTTP_X_FORWARDED_FOR'])) ? $HTTP_ENV_VARS['HTTP_X_FORWARDED_FOR'] : @ getenv ('HTTP_X_FORWARDED_FOR')); \r\n } \r\n else\r\n { \r\n $visitorIP = (!empty ($HTTP_SERVER_VARS['REMOTE_ADDR'])) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ((!empty ($HTTP_ENV_VARS['REMOTE_ADDR'])) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : @ getenv ('REMOTE_ADDR')); \r\n } \r\n\r\n return $visitorIP; \r\n }", "function get_ip(){?\r\r\t$do_check = 1;\r\r\t$addrs = array();\r\r\r\r\tif( $do_check )\r\r\t{\r\r\t\tif(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\r\t\t foreach( array_reverse(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])) as $x_f )\r\r \t\t{\r\r \t\t\t$x_f = trim($x_f);\r\r \t\t\tif( preg_match('/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/', $x_f) )\r\r \t\t\t{\r\r \t\t\t\t$addrs[] = $x_f;\r\r \t\t\t}\r\r \t\t}\r\r\t\t}\r\r \r\r\r\r\t\tif(isset($_SERVER['HTTP_CLIENT_IP'])) $addrs[] = $_SERVER['HTTP_CLIENT_IP'];\r\r\t\tif(isset($_SERVER['HTTP_PROXY_USER'])) $addrs[] = $_SERVER['HTTP_PROXY_USER'];\r\r\t}\r\r\r\r\t$addrs[] = $_SERVER['REMOTE_ADDR'];\r\r\r\r\tforeach( $addrs as $v )\r\r\t{\r\r\t\tif( $v )\r\r\t\t{\r\r\t\t\tpreg_match(\"/^([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})$/\", $v, $match);\r\r\t\t\t$ip = $match[1].'.'.$match[2].'.'.$match[3].'.'.$match[4];\r\r\r\r\t\t\tif( $ip && $ip != '...' )\r\r\t\t\t{\r\r\t\t\t\tbreak;\r\r\t\t\t}\r\r\t\t}\r\r\t}\r\r\r\r\tif( ! $ip || $ip == '...' )\r\r\t{\r\r\t\techo \"Không thể xác định địa chỉ IP của bạn.\";\r\r\t}\r\r\r\r\treturn $ip;\r\r}", "public function first() {\n\t\tif (empty($this->addresses)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $this->addresses[0];\n\t}", "function client_ip(){\r\n\tif(function_exists('apache_request_headers')){\r\n\r\n\t\t$headers = apache_request_headers();\r\n\r\n\t} else {\r\n\r\n\t\t$headers = $_SERVER;\r\n\r\n\t}\r\n\r\n\t//Get the forwarded IP if it exists\r\n\tif (array_key_exists('X-Forwarded-For', $headers ) and\r\n\t\tfilter_var($headers['X-Forwarded-For'],\r\n\t\t\tFILTER_VALIDATE_IP,\r\n\t\t\tFILTER_FLAG_IPV4)){\r\n\r\n\t\t$the_ip = $headers['X-Forwarded-For'];\r\n\r\n\t} elseif(array_key_exists('HTTP_X_FORWARDED_FOR', $headers) and\r\n\t\tfilter_var($headers['HTTP_X_FORWARDED_FOR'],\r\n\t\t\tFILTER_VALIDATE_IP, FILTER_FLAG_IPV4 )){\r\n\r\n\t\t$the_ip = $headers['HTTP_X_FORWARDED_FOR'];\r\n\r\n\t} else {\r\n\t\t\r\n\t\t$the_ip = filter_var($_SERVER['REMOTE_ADDR'],\r\n\t\t\tFILTER_VALIDATE_IP, FILTER_FLAG_IPV4);\r\n\r\n\t}\r\n\r\n\treturn $the_ip;\r\n}", "protected function getIpAddressFromProxy() {\n if (!$this->useProxy\n || ($this->getServerVariable('REMOTE_ADDR') != null && !in_array($this->getServerVariable('REMOTE_ADDR'), $this->trustedProxies))\n ) {\n return false;\n }\n\n $header = $this->proxyHeader;\n if (!$this->getServerVariable($header)) {\n return false;\n }\n\n // Extract IPs\n $ips = explode(',', $this->getServerVariable($header));\n // trim, so we can compare against trusted proxies properly\n $ips = array_map('trim', $ips);\n // remove trusted proxy IPs\n $ips = array_diff($ips, $this->trustedProxies);\n\n // Any left?\n if (empty($ips)) {\n return false;\n }\n\n // Since we've removed any known, trusted proxy servers, the right-most\n // address represents the first IP we do not know about -- i.e., we do\n // not know if it is a proxy server, or a client. As such, we treat it\n // as the originating IP.\n // @see http://en.wikipedia.org/wiki/X-Forwarded-For\n $ip = array_pop($ips);\n return $ip;\n }", "function gethostbynamel6($host, $try_a = false) {\n // if $try_a is true, if AAAA fails, it tries for A\n // results are returned in an array of ips found matching type\n // otherwise returns false\n\n $dns6 = dns_get_record($host, DNS_AAAA);\n if ($try_a == true) {\n $dns4 = dns_get_record($host, DNS_A);\n $dns = array_merge($dns4, $dns6);\n }\n else { $dns = $dns6; }\n $ip6 = array();\n $ip4 = array();\n foreach ($dns as $record) {\n if ($record[\"type\"] == \"A\") {\n $ip4[] = $record[\"ip\"];\n }\n if ($record[\"type\"] == \"AAAA\") {\n $ip6[] = $record[\"ipv6\"];\n }\n }\n if (count($ip6) < 1) {\n if ($try_a == true) {\n if (count($ip4) < 1) {\n return false;\n }\n else {\n return $ip4;\n }\n }\n else {\n return false;\n }\n }\n else {\n return $ip6;\n }\n}", "public function find_users_ip(){\n\t\tif ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {\n\t\t\t//check ip from share internet\n\t\t\t$ip = $_SERVER['HTTP_CLIENT_IP'];\n\t\t} elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {\n\t\t\t//to check ip is pass from proxy\n\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t} else {\n\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\t\t}\n\t\treturn $ip;\n\t}", "function getVisitorIP() {\n $ip = \"0.0.0.0\";\n if( ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) && ( !empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) ) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } elseif( ( isset( $_SERVER['HTTP_CLIENT_IP'])) && (!empty($_SERVER['HTTP_CLIENT_IP'] ) ) ) {\n $ip = explode(\".\",$_SERVER['HTTP_CLIENT_IP']);\n $ip = $ip[3].\".\".$ip[2].\".\".$ip[1].\".\".$ip[0];\n } elseif((!isset( $_SERVER['HTTP_X_FORWARDED_FOR'])) || (empty($_SERVER['HTTP_X_FORWARDED_FOR']))) {\n if ((!isset( $_SERVER['HTTP_CLIENT_IP'])) && (empty($_SERVER['HTTP_CLIENT_IP']))) {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n }\n return $ip;\n}", "public function getNextHop()\n {\n return $this->next_hop;\n }", "function get_ip() {\n if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else\n $ip = $_SERVER['REMOTE_ADDR'];\n return $ip;\n}", "function getUserIP()\r\n {\r\n if (isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"]))\r\n {\r\n $_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\r\n $_SERVER['HTTP_CLIENT_IP'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\r\n }\r\n $client = @$_SERVER['HTTP_CLIENT_IP'];\r\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\r\n $remote = $_SERVER['REMOTE_ADDR'];\r\n\r\n if(filter_var($client, FILTER_VALIDATE_IP))\r\n {\r\n $ip = $client;\r\n }\r\n elseif(filter_var($forward, FILTER_VALIDATE_IP))\r\n {\r\n $ip = $forward;\r\n }\r\n else\r\n {\r\n $ip = $remote;\r\n }\r\n return $ip;\r\n}", "function ip_is_local($ip){\r\n\t\r\n\t $ipv4array = explode('.',$ip); $ipv6array = explode(':',$ip);\r\n\t $lenipv4 = count($ipv4array) ; $lenipv6 = count($ipv6array); \r\n\t $ipint = array(); \r\n\t if($lenipv4 > 0 ){//We have an ipv4 address\r\n\t\t for ($i = 0 ; $i<$lenipv4 ; $i++){\r\n\t\t\t $ipint[$i] = intval($ipv4array[$i]) ; //Generating integera values for the ips\r\n\t\t }\r\n\t\t \r\n\t\t\t//Let's see if our IP is riv ate\r\n\t\t\tif ($ipint[0] == 10) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else if ($ipint[0] == 172 && $ipint[1] > 15 && $ipint[1] < 32) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else if ($ipint[0] == 192 && $ipint[1] == 168) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else return false ;\r\n\t }else{\r\n\t //Either something went wrong, or we are in IPV6 format.\t \r\n\t\t \r\n\t\t if( $lenipv6 > 0){//We are having a big IPV6 address here !\r\n\t\t\t //We are in IPV4. Haven't implemented IPV6 yet\r\n\t\t\t \r\n\t\t }\r\n\t\t return false ;\r\n\t }\r\n\t \r\n\t \r\n\t return false;\r\n}", "static public function ip__resolve($ip)\n\t{\n\t\tif(self::ip__validate($ip)){\n\t\t\t$url = gethostbyaddr($ip);\n\t\t\tif($url)\n\t\t\t\treturn $url;\n\t\t}\n\t\treturn $ip;\n\t}", "function getUserIP() {\n if (isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"])) {\n $_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n $_SERVER['HTTP_CLIENT_IP'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n }\n\n $client = @$_SERVER['HTTP_CLIENT_IP'];\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n $remote = $_SERVER['REMOTE_ADDR'];\n\n if(filter_var($client, FILTER_VALIDATE_IP)){\n $ip = $client;\n } elseif (filter_var($forward, FILTER_VALIDATE_IP)){\n $ip = $forward;\n } else {\n $ip = $remote;\n }\n return $ip;\n }", "public static function get_ip_address() {\n if(!empty($_SERVER['http-cf-connecting-ip'])){\n return $_SERVER['http-cf-connecting-ip'];\n }\n if (!empty($_SERVER['HTTP_CLIENT_IP']) && filter_var($_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP)) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',') !== false) {\n $iplist = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n foreach ($iplist as $ip) {\n if (filter_var($ip, FILTER_VALIDATE_IP)) {\n return $ip;\n }\n }\n } else {\n if (filter_var($_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP)) {\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n }\n }\n if (!empty($_SERVER['HTTP_X_FORWARDED']) && filter_var($_SERVER['HTTP_X_FORWARDED'], FILTER_VALIDATE_IP)) {\n return $_SERVER['HTTP_X_FORWARDED'];\n }\n if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && filter_var($_SERVER['HTTP_X_CLUSTER_CLIENT_IP'], FILTER_VALIDATE_IP)) {\n return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n }\n if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && filter_var($_SERVER['HTTP_FORWARDED_FOR'], FILTER_VALIDATE_IP)) {\n return $_SERVER['HTTP_FORWARDED_FOR'];\n }\n if (!empty($_SERVER['HTTP_FORWARDED']) && filter_var($_SERVER['HTTP_FORWARDED'], FILTER_VALIDATE_IP)) {\n return $_SERVER['HTTP_FORWARDED'];\n }\n return $_SERVER['REMOTE_ADDR'];\n }", "function getUserIP()\n{\n $client = @$_SERVER['HTTP_CLIENT_IP'];\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n $remote = $_SERVER['REMOTE_ADDR'];\n\n if(filter_var($client, FILTER_VALIDATE_IP))\n {\n $ip = $client.\"c\";\n }\n elseif(filter_var($forward, FILTER_VALIDATE_IP))\n {\n $ip = $forward.\"f\";\n }\n else\n {\n $ip = $remote.\"r\";\n }\n\n return $ip;\n}", "function getIPAddress() {\r\nif(!empty($_SERVER['HTTP_CLIENT_IP'])) { \r\n $ip = $_SERVER['HTTP_CLIENT_IP']; \r\n} \r\n//whether ip is from the proxy \r\nelseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { \r\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; \r\n} \r\n//whether ip is from the remote address \r\nelse{ \r\n $ip = $_SERVER['REMOTE_ADDR']; \r\n} \r\nreturn $ip; \r\n}", "function getForwardingInfo(\\Slim\\Http\\Headers $headers)\n{\n $info = null;\n $forwarded = $headers->get('Forwarded');\n if (!is_null($forwarded)) {\n $info = new UrlInfo($forwarded);\n } else {\n $fhost = $headers->get('X-Forwarded-Host');\n $fproto = $headers->get('X-Forwarded-Proto');\n if (!is_null($fhost)) {\n $info = new UrlInfo($fhost, $fproto);\n }\n }\n return $info;\n}", "function get_user_ip()\n{\n if (empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n return$_SERVER['REMOTE_ADDR'];\n }\n $ip = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);\n return $ip[0];\n}", "public function getForwardings() \n {\n $aForwardings = $this->fcpoGetExistingForwardings();\n $aForwardings = $this->_fcpoGetNewForwarding($aForwardings);\n \n return $aForwardings;\n }", "function getIP() {\n if(!empty($_SERVER['HTTP_CLIENT_IP'])){\n //ip from share internet\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n }elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){\n //ip pass from proxy\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }else{\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n return $ip === '::1' ? '127.0.0.1' : $ip;\n}", "public function getMatchedEmailAddress();", "protected static function _get_curl_remote_ips($fp){\n\t\t\trewind($fp); $bf=fread($fp,8192); $re='/\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\b/';\n\t\t\treturn preg_match_all($re,$bf,$matches) ? $matches[0] : array();\n\t\t}", "function getRealIP() {\r\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\r\n $ip = $_SERVER['HTTP_CLIENT_IP'];\r\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\r\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n } else {\r\n $ip = $_SERVER['REMOTE_ADDR'];\r\n }\r\n return $ip;\r\n}", "public function getRemoteIp();", "public function locate($ip);", "function getIpAddress()\n {\n foreach ([\n 'HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'REMOTE_ADDR'\n ] as $key) {\n if (array_key_exists($key, $_SERVER) === true) {\n foreach (explode(',', $_SERVER[$key]) as $ip) {\n $ip = trim($ip);\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE) !== false) {\n return $ip;\n }\n }\n }\n }\n }", "function check_ip_address($id = 0) {\r\n\r\n\t\t$ipAddressSessionData = $this->get_ip_address_from_throttle_by_user_id($id);\r\n\r\n\t\tif ($ipAddressSessionData == $this->ipAddress) {\r\n\r\n\t\t\t$result = 'match';\r\n\r\n\t\t} else {\r\n\r\n\t\t\t$result = 'not-match';\r\n\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\r\n\t}", "public function get_visitor_ip_address() {\n\t\t$forwarded_for = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];\n\n\t\t// Field HTTP_X_FORWARDED_FOR may contain multiple addresses, separated by a\n\t\t// comma. The first one is the real client, followed by intermediate proxy\n\t\t// servers\n\t\t$ip_addresses = explode(',', $forwarded_for);\n\t\t$visitor_ip = trim(array_shift($ip_addresses));\n\n\t\t$visitor_ip = apply_filters('wc_aelia_visitor_ip', $visitor_ip, $forwarded_for);\n\t\treturn $visitor_ip;\n\t}" ]
[ "0.6017717", "0.5844149", "0.5815098", "0.5758469", "0.5719107", "0.5659898", "0.5621015", "0.5545808", "0.5534804", "0.53948504", "0.5391258", "0.5323839", "0.53218716", "0.53096884", "0.53087234", "0.5288963", "0.5281532", "0.52707475", "0.5253457", "0.5247854", "0.52303857", "0.5218889", "0.5207034", "0.5205033", "0.5202645", "0.52001256", "0.519607", "0.5190532", "0.51858497", "0.5180786", "0.5176148", "0.5173337", "0.51699275", "0.5146394", "0.5142491", "0.51358455", "0.510423", "0.50967354", "0.5088078", "0.5085511", "0.5076182", "0.50753963", "0.5071941", "0.5071679", "0.5062884", "0.5058736", "0.5017734", "0.5010791", "0.50069535", "0.50016207", "0.50016207", "0.49969682", "0.49907443", "0.4989458", "0.49870557", "0.49822763", "0.49807167", "0.49804503", "0.49769413", "0.49641797", "0.49608222", "0.49605042", "0.4960342", "0.4956879", "0.49541077", "0.49540287", "0.49533567", "0.49476328", "0.49367008", "0.4933764", "0.49305323", "0.49241394", "0.49230605", "0.4917841", "0.49005285", "0.48950228", "0.48892674", "0.48780844", "0.48730156", "0.4872931", "0.487131", "0.48707363", "0.4869413", "0.48671207", "0.48610494", "0.48599812", "0.48535237", "0.4852299", "0.48495615", "0.48474017", "0.48472226", "0.4843535", "0.48339412", "0.48282176", "0.4825289", "0.4821918", "0.48204648", "0.48190868", "0.48165596", "0.48125896" ]
0.6055737
0
Display a listing of the resource.
public function index() { $items = Item::where("user_id", '=', Auth::id())->get(); $drafts = Item::onlyTrashed()->where("user_id", '=', Auth::id())->get(); $user = User::find(Auth::id()); return view('items', compact('items','drafts', 'user')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\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 create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $this->validate($request, [ 'name' => 'required', 'price' => 'required|integer', 'details' => 'required|min:20', 'online' => 'boolean', 'image' => 'required' ]); $item = new Item; $item->name = $request->name; $item->price = $request->price; $item->details = $request->details; $item->online = $request->online; $item->image = $request->file('image')->store('images/items'); $item->user_id = Auth::id(); $item->save(); return response()->json(['success' => true], 201); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.7286258", "0.71454436", "0.7132821", "0.6640289", "0.6621105", "0.6566493", "0.65255576", "0.65087926", "0.6448317", "0.63752604", "0.63736314", "0.6365631", "0.6365631", "0.6365631", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229" ]
0.0
-1
Display the specified resource.
public function show(Item $item) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $item = Item::find($id); return response()->json($item, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // dd($request->all()); $item = Item::find($id); $item->name = $request->name; $item->price = $request->price; $item->online = $request->online; $item->details = $request->details; if ($request->file("image")) { $item->image = $request->file("image")->store('images/items'); } $item->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(Item $item, $id) { $item = Item::find($id); $item->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Setup the layout used by the controller.
protected function setupLayout() { if ( ! is_null($this->layout) && ! $this->is_pjax()) { $this->layout = View::make($this->layout); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setupLayout() {\n\t\tif (!is_null($this -> layout)) {\n\t\t\t$this -> layout = View::make($this -> layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout() {\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\r\n\t{\r\n\t\tif ( ! is_null($this->layout))\r\n\t\t{\r\n\t\t\t$this->layout = View::make($this->layout);\r\n\t\t}\r\n\t}", "protected function setupLayout() {\n if (!is_null($this->layout)) $this->layout = View::make($this->layout);\n }", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout() {\n if ( ! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout)) {\n\t\t\t$this->layout = view($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = view($this->layout);\n $this->layout->menus = Menu::getMenu() ;\n }\n }", "protected function setupLayout()\n\t{\n\t\tdefine(\"aol_institute\", 68);\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout() {\n\t\tif ( ! is_null($this->layout)) {\n\n\n\t\t\t$cb_js_var = array(\n\t\t\t\t'site_url' => url('/'),\n\t\t\t\t'admin_url' => url('/admin'),\n\t\t\t\t'admin_assets_url' => asset('packages/vizioart/cookbook/'),\n\t\t\t\t'admin_api_url' => url('/admin/api')\n\t\t\t);\n\n\n\t\t\t$this->layout = View::make($this->layout, array(\n\t\t\t\t'cb_js_var' => $cb_js_var\n\t\t\t));\n\t\t}\n\t}", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = \\View::make($this->layout);\n }\n }", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout, $this->_data);\n\t\t\t$this->layout->content = null;\n\t\t\t$this->layout->currentProject = null;\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\n\t\t$this->setLocale();\n\t}", "protected function setupLayout()\n\t{\n\t\t$button['text'] = \"login\";\n\t\t$button['url'] = route('login');\n\n\t\tif(Auth::check())\n\t\t{\n\t\t\t$button['text'] = \"logout\";\n\t\t\t$button['url'] = route('logout');\n\t\t\t$this->logged_in_user = Auth::user();\n\t\t\t$notif = new Notification();\n\t\t\t$notifications = $notif->getNotifications($this->logged_in_user->id);\n\t\t\t$new = 0;\n\t\t\tforeach ($notifications as $not) {\n\t\t\t\tif($not->seen == 0)\n\t\t\t\t{\n\t\t\t\t\t$new++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$rating_types = RatingType::getRatingTypes($this->logged_in_user->id);\n\n\t\t\tView::share('notifications', $notifications);\n\t\t\tView::share('new', $new);\n\t\t\tView::share('rating_types', $rating_types);\n\t\t\tView::share('logged_in_user', $this->logged_in_user);\n\t\t}\n\n\t\tView::share('button', $button);\n\t\tView::share('show_feed', $this->show_feed);\n\t\t//Get image path info for all poster and backdrop images\n\t\t$t = new TheMovieDb();\n \t\t$this->image_path_config = $t->getImgPath();\n\t\tView::share('image_path_config', $this->image_path_config);\n\n\n\t\t\n\n\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n\n if (Request::Ajax())\n {\n $this->layout = View::make('layouts.ajax');\n }\n else\n $this->layout = View::make($this->layout);\n\n $this->layout->content = \" \";\n }\n }", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\treturn $this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function initLayout()\n {\n $showLabels = $this->hasLabels();\n $showErrors = $this->getConfigParam('showErrors');\n $this->mergeSettings($showLabels, $showErrors);\n $this->buildLayoutParts($showLabels, $showErrors);\n }", "public function setLayout() {\n if ($this->controller == 'login' || $this->controller == 'infos') {\n $this->viewBuilder()->setLayout('empty');\n } else if ($this->controller == 'ajax') {\n $this->viewBuilder()->setLayout('ajax');\n } else {\n $this->viewBuilder()->setLayout('chotreo');\n }\n }", "protected function setupLayout() {\n\t\t$this->data['route'] = Route::getCurrentRoute()->getPath();\t\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->data['enrolledCourses'] = NULL;\n\t\t\t\n\t\t\tif (Auth::check() && in_array(Auth::user()->user_type, array(3, 5))) {\n\t\t\t\t$this->data['enrolledCourses'] = EnrolledCourses::getEnrolledCourses();\n\t\t\t\t$this->data['endedCourses'] = EnrolledCourses::getEndedCourses();\n\t\t\t\t$this->data['profiling'] = User::getRegProfile();\t\n\t\t\t\t$this->data['profiling_ctr'] = $this->data['profiling'];\t\t\t\t\n\t\t\t} else if (Auth::check() && Auth::user()->user_type == 2) {\n\t\t\t\t$this->data['assigned_courses'] = Courses::getAssignedCourses();\n\t\t\t}\n\n\t\t\t$this->layout = View::make($this->layout, $this->data);\n\t\t}\n\t}", "public function init()\n {\n $this->getHelper('layout')->setLayout('manage-layout');\n }", "public function initLayout();", "protected function setupLayout()\n\t{\n\n $this->user = Auth::user();\n $this->theme = Theme::uses('default')->layout('default');\n $user = $this->user;\n $this->theme->bind('user', function() use($user)\n {\n return $user;\n });\n $cat = Category::all();\n $this->theme->bind('cat', function() use($cat)\n {\n return $cat;\n });\n if (Session::get('cart')){\n $cart_count = count(Session::get('cart'));\n $this->theme->bind('cart_count', function() use($cart_count)\n {\n return $cart_count;\n });\n }\n\t}", "public function init() {\n Zend_Layout::startMvc();\n $this->_helper->layout->setLayout('default');\n }", "public function init()\n {\n \t$this->view->layout = array();\n }", "public function init()\n {\n \t$this->_helper->layout()->setLayout('admin');\n }", "public function init()\n\t{\n\t\t$this->_helper->layout()->setLayout('home');\n\t}", "public function init()\n {\n $this->_helper->layout()->setLayoutPath(APPLICATION_PATH . \"/layouts/scripts/\");\n $this->_helper->layout()->setLayout('admin');\n }", "public function initialize()\n {\n\t\tparent::initialize();\n\t\t$this->viewBuilder()->layout('admin');\n\t\t\n }", "protected function makeViewLayout()\n {\n new MakeLayout($this, $this->files);\n }", "function initializeFilesLayout() {\n $this->loadFilesMenubar();\n // navigation stuff\n $this->layout->add($this->getSearchPanel());\n $this->layout->add($this->getTagsPanel());\n $this->layout->add($this->getFolderPanel());\n // file list\n $this->layout->add($this->getClipboardPanel());\n $this->layout->add($this->getFilesPanel());\n // dialog\n $this->layout->setParam('COLUMNWIDTH_CENTER', '50%');\n $this->layout->setParam('COLUMNWIDTH_RIGHT', '50%');\n }", "protected function _init()\n {\n $this->setLayoutTemplate(App::getConfig('Help','layout/default'));\n\n # set navbar template .phtml\n $this->getNavbar()->setTemplate('help/html/navbar.phtml');\n\n #set sidebar template .phtml\n $this->getSidebar()->setTemplate('help/html/sidebar.phtml');\n }", "public function layout() {\r\n $this->template['header'] = $this->load->view('common/header', $this->data, true);\r\n $this->template['content'] = $this->load->view($this->content, $this->data, true);\r\n $this->template['footer'] = $this->load->view('common/footer', $this->data, true);\r\n $this->load->view('common/layout', $this->template);\r\n }", "public function setCleanLayout()\n {\n $this->layout = \"@app/modules/site/views/layouts/public_clean\";\n }", "function index(){\n $this->layout = 'default';\n }", "public function init()\n {\n // $this->_helper->layout->setLayout('userarea');\n }", "public function init() {\n parent::init();\n $this->layout = 'static';\n }", "public function init(){\n\t\t$this->_helper->layout->setLayout('layout_login');\n\t}", "public function apply_layout()\n\t{\n\t\tif (!$this instanceof Controller)\n\t\t\tthrow new Kohana_Exception('The `Component_DefaultLayout` trait must be used by Controller class');\n\n // if we are logged in, we'll send user to tmpl\n $usr = Auth::instance()->logged_in()\n ? Auth::instance()->get_user()\n : null;\n\n\t\t$content = $this->response->getBody();\n\t\t$layout = View::factory('layouts/default', [\n\t\t\t'content' => $content,\n\t\t\t'template_settings' => $this->template_settings,\n 'user' => $usr,\n\t\t]);\n\n\t\t$this->response->body($layout);\n\t}", "protected function _constructMainLayout()\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'create main layout for display',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n if ($this->_get) {\n $typ = $this->_get->pageType();\n } else {\n $typ = NULL;\n }\n\n switch ($typ) {\n case'css': case'js':\n $this->DISPLAY['core'] = '{;css_js;}';\n break;\n\n default:\n $this->layout($this->_defaultOptions['template']);\n break;\n }\n }", "function initLayout(){\n $layout = array(\n 'left' => array(\n 'ProfileInfo' => array(\n 'title' => 'Profile Info',\n 'minimize' => false,\n ),\n 'EmailInboxMenu' => array(\n 'title' => 'Inbox Menu',\n 'minimize' => false,\n ),\n 'ActionMenu' => array(\n 'title' => 'Actions',\n 'minimize' => false,\n ),\n 'TopContacts' => array(\n 'title' => 'Top Contacts',\n 'minimize' => false,\n ),\n 'RecentItems' => array(\n 'title' => 'Recently Viewed',\n 'minimize' => false,\n ),\n 'ActionTimer' => array(\n 'title' => 'Action Timer',\n 'minimize' => true,\n ),\n 'UserCalendars' => array(\n 'title' => 'User Calendars',\n 'minimize' => false,\n ),\n 'CalendarFilter' => array(\n 'title' => 'Filter',\n 'minimize' => false,\n ),\n 'GroupCalendars' => array(\n 'title' => 'Group Calendars',\n 'minimize' => false,\n ),\n 'FilterControls' => array(\n 'title' => 'Filter Controls',\n 'minimize' => false,\n ),\n 'SimpleFilterControlEventTypes' => array(\n 'title' => 'Event Types',\n 'minimize' => false,\n ),\n ),\n 'right' => array(\n 'SmallCalendar' => array(\n 'title' => 'Small Calendar',\n 'minimize' => false,\n ),\n 'ChatBox' => array(\n 'title' => 'Activity Feed',\n 'minimize' => false,\n ),\n 'GoogleMaps' => array(\n 'title' => 'Google Map',\n 'minimize' => false,\n ),\n 'OnlineUsers' => array(\n 'title' => 'Active Users',\n 'minimize' => false,\n ),\n 'TagCloud' => array(\n 'title' => 'Tag Cloud',\n 'minimize' => false,\n ),\n 'TimeZone' => array(\n 'title' => 'Clock',\n 'minimize' => false,\n ),\n 'SmallCalendar' => array(\n 'title' => 'Calendar',\n 'minimize' => false,\n ),\n 'QuickContact' => array(\n 'title' => 'Quick Contact',\n 'minimize' => false,\n ),\n 'MediaBox' => array(\n 'title' => 'Files',\n 'minimize' => false,\n ),\n ),\n 'hiddenRight' => array(\n 'ActionMenu' => array(\n 'title' => 'My Actions',\n 'minimize' => false,\n ),\n 'MessageBox' => array(\n 'title' => 'Message Board',\n 'minimize' => false,\n ),\n 'NoteBox' => array(\n 'title' => 'Note Pad',\n 'minimize' => false,\n ),\n 'DocViewer' => array(\n 'title' => 'Doc Viewer',\n 'minimize' => false,\n ),\n 'TopSites' => array(\n 'title' => 'Top Sites',\n 'minimize' => false,\n ),\n ),\n );\n if(Yii::app()->contEd('pro')){\n if(file_exists('protected/config/proWidgets.php')){\n foreach(include('protected/config/proWidgets.php') as $loc=>$data){\n if (isset ($layout[$loc]))\n $layout[$loc] = array_merge($layout[$loc],$data);\n }\n }\n }\n return $layout;\n }", "public function _prepareLayout()\n {\n $this->setTemplate('authorizenetcim/form/cc.phtml');\n }", "public function render_screen_layout()\n {\n }", "public function init(){\r\n\t\t//Zend_Layout::startMvc($options);\r\n\r\n\r\n\t}", "protected function _prepareLayout()\n\t{\n\t\t$this->getLayout()->getBlock('head')->setTitle($this->__($this->_helper->pageTitle()));\n $this->getLayout()->getBlock('root')->setTemplate('page/1column.phtml');\n\t\t$this->getLayout()->getBlock('head')->addCss('css/extrembler/prelogin/form.css');\n\t\t$this->getLayout()->getBlock('root')->unsetChild('header');\n\t\t$this->getLayout()->getBlock('content')->insert('store_language');\n\t\t$this->getLayout()->getBlock('root')->unsetChild('footer');\n\t return parent::_prepareLayout();\n\t}", "private function setupViews()\n {\n // Sidebar\n View::composer('components.sidebar', \\App\\Http\\View\\Composers\\SidebarComposer::class);\n }", "private function setLayouts() {\n # list of layout names!\n $availableLayouts = $this->fileMaker->listLayouts();\n\n foreach ($availableLayouts as $layoutName){\n if ($this->name === 'mi' or $this->name === 'miw') {\n if ($layoutName == 'search-'.strtoupper($this->name)) {\n $this->search_layout = $this->fileMaker->getLayout($layoutName);\n } else if ($layoutName == 'results-'.strtoupper($this->name)) {\n $this->result_layout = $this->fileMaker->getLayout($layoutName);\n } else if ($layoutName == 'details-'.strtoupper($this->name)) {\n $this->detail_layout = $this->fileMaker->getLayout($layoutName);\n }\n } else {\n if (str_contains($layoutName, 'search')) {\n $this->search_layout = $this->fileMaker->getLayout($layoutName);\n } else if (str_contains($layoutName, 'results')) {\n $this->result_layout = $this->fileMaker->getLayout($layoutName);\n } else if (str_contains($layoutName, 'details')) {\n $this->detail_layout = $this->fileMaker->getLayout($layoutName);\n }\n }\n }\n }", "function beforeLayout() {\n }", "protected function _initDoctype()\r\n {\r\n// $this->bootstrap('view');\r\n// $view = $this->getResource('view');\r\n//\r\n// $view->headTitle('Module Frontend');\r\n// $view->headLink()->appendStylesheet('/css/clear.css');\r\n// $view->headLink()->appendStylesheet('/css/main.css');\r\n// $view->headScript()->appendFile('/js/jquery.js');\r\n// $view->doctype('XHTML1_STRICT');\r\n //$view->navigation = $this->buildMenu();\r\n }", "public function init() {\n\t\t// @todo replace with a setTemplate() in t41\\Exception\n\t\tView::setTemplate('default.html');\n\t\t\n\t\t// get page identifiers (module, controller and action)\n\t\tLayout::$module\t\t= $this->_getParam('module');\n\t\tLayout::$controller\t= $this->_getParam('controller');\n\t\tLayout::$action\t\t= $this->_getParam('action');\n\t\t\n\t\t// provide controller with basic information about the current module\n\t\tforeach (Module::getConfig() as $vendor => $modules) {\n\t\t\t\n\t\t\tforeach ($modules as $key => $module) {\n\t\t\t\t\n\t\t\t\tif (isset($module['controller']) && Layout::$module == $module['controller']['base']) {\n\t\t\t\t\t$this->_module = 'app/' . $vendor . '/' . $key;\n\t\t\t\t\tLayout::$vendor = $vendor;\n\t\t\t\t\tLayout::$moduleKey = $key;\n\n\t\t\t\t\t$resource = Layout::$controller;\n\t\t\t\t\tif (Layout::$action) $resource .= '/' . Layout::$action;\n\t\t\t\t\tif (isset($module['controller']['items'])) {\n\t\t\t\t\t\tforeach ($module['controller']['items'] as $controller) {\n\t\t\t\t\t\t\tif ($this->_getCurrentItem($resource, $controller) == true) break;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isset($module['controllers_extends'])) {\n\t\t\t\t\t\tforeach ($module['controllers_extends'] as $controller) {\n\t\t\t\t\t\t\tif ($this->_getCurrentItem($resource, $controller['items']) == true) break;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function init()\n {\n $this->getBootstrap()->bootstrap('view');\n $this->_view = $this->getBootstrap()->getResource('view');\n $this->setHeadLinks();\n }", "public function init()\r\n {\r\n \t $layout = $this->_helper->layout();\r\n \t $layout->setLayout('twocolumn');\r\n \t // action body\r\n //$bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');\r\n \t \r\n \r\n \r\n }", "protected function setUp() {\r\n $this->object = new Layout;\r\n }", "public function init() {\n\t\t$this->_helper->layout->disableLayout();\n\t\t$this->_helper->viewRenderer->setNeverRender();\n\t}", "function set_layout($layout) {\n $this->layout = $layout;\n }", "public function xlayouts() {\n\t\t$templates = $this->getModel ( 'layout' );\n\t\t$templates->getAll ( 'appliesto = \"Global\"' );\n\t\t/* set last view into session */\n\t\t$this->session->returnto ( $this->getView () );\n\t\t\n\t\t$this->setView ( 'layouts' );\n\t}", "public function layoutAction(){\n \t$far = 100;\n \t$sxnById = array();\n \t$request = $this->getRequest();\n \t$template_id = $request->getParam('template_id');\n \t$page_id = $request->getParam('page_id');\n \t$title = $request->getParam('title');\n \t$task = $request->getParam('task', null);\n \t$table = $this->_getParam('table');\n\n \tif($template_id){\n\t \tswitch($task){\n\t \t\tcase 'savelayout':{\n\t \t\t\t$this->saveLayout();\n\t \t\t\tbreak;\n\t \t\t}\n\n\t \t\tcase 'resetlayout':{\n\t \t\t\t$this->resetLayout();\n\t \t\t\tbreak;\n\t \t\t}\n\t \t}\n \t}\n\t\t \n\t\t$pageLayout = Rhema_Model_Service::factory('page_layout');\t\t\n \t$res = $pageLayout->getPageLayout($page_id, $template_id, $table); \n \t\n \t$items \t = $this->_editor->getCached()->getItems(); \t\n \t$templateData = $this->_editor->getCached()->getTemplateDetails($template_id);\n \t$items = array_merge($items, $templateData);\n \t \n \t$this->view->title = $title;\n \t//$this->view->sections \t= $templateData['sections'];\n \t$this->view->layout \t= $res['layout']; \n \t \n \t$formUrl['action']\t\t= 'layout';\n \t$formUrl['controller'] = 'design';\n \t$formUrl['module'] = 'cms';\n\n \t$formUrl['page_id'] = $page_id ;\n \t$formUrl['template_id'] = $template_id;\n \t$formUrl['title'] = $title;\n \t$formUrl['table'] = $table ;\n\n \t$this->view->formAction = $this->view->url($formUrl, ADMIN_ROUTE); \n\t\t$this->view->items = $items;\n\n \t$output['form'] = $this->view->render('design/layout.phtml');\n \t\n \t$this->_utility->setAjaxData(Zend_Json::encode($output));\n }", "public function layout( $layout ) {\n\t\t$this->_layout = $layout;\n\t}", "public function __construct() {\n /* Set Default layout for all the actions */\n $this->layout('layout/adminlayout');\n }", "protected function setAuthenticatedPageLayout() {\n if (!$this->app->router->isWsCall) {\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::HeaderTemplate;\n// require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::HeaderTemplate;\n }\n\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::ContenTemplate;\n\n if (!$this->app->router->isWsCall) {\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::FooterTemplate;\n }\n }" ]
[ "0.8553451", "0.84254813", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.8405223", "0.84048456", "0.84005386", "0.83907384", "0.83857745", "0.83833826", "0.83541435", "0.8336855", "0.8336855", "0.8336855", "0.8336855", "0.8336855", "0.8336481", "0.833281", "0.8325082", "0.8325082", "0.83179915", "0.82970107", "0.82922304", "0.82854337", "0.82757044", "0.82757044", "0.8266584", "0.82347053", "0.8208045", "0.8041135", "0.796342", "0.7914265", "0.7818655", "0.7738082", "0.7695111", "0.766428", "0.7563319", "0.7557611", "0.7544866", "0.73630226", "0.73520166", "0.71694666", "0.7159378", "0.714776", "0.71242243", "0.7069888", "0.70276934", "0.6999313", "0.6982902", "0.6973959", "0.69618136", "0.69003177", "0.68828195", "0.681248", "0.67625064", "0.66913784", "0.66766125", "0.66741884", "0.6628796", "0.66223437", "0.6618393", "0.6616046", "0.6594734", "0.659179", "0.65892786", "0.6588799", "0.65766925", "0.6546249", "0.6519206", "0.65091693", "0.64934117", "0.64859736", "0.6418164", "0.6394708", "0.63658154", "0.6363068" ]
0.8155176
53
Create a new controller instance.
public function __construct() { $this->middleware('guest'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Get a validator for an incoming registration request.
protected function validator(array $data) { return Validator::make($data, [ 'token'=>['nullable','string'], 'firstname' => ['required', 'string', 'max:255'], 'lastname' => ['required', 'string', 'max:255'], 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 'password' => ['required', 'string', 'min:8', 'confirmed'], ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValidator() {}", "public function getValidator();", "public function getValidator();", "public function getValidator()\n {\n return $this->validator;\n }", "public function getValidator()\n {\n return $this->validator;\n }", "public function getValidator()\n {\n return $this->validator;\n }", "protected function getValidatorInstance()\n {\n return app(ValidationFactory::class);\n }", "protected function createValidator() {\n return $this->validator;\n }", "public static function getValidatorInstance()\n {\n if (static::$validator === null)\n {\n static::$validator = new Validator();\n }\n\n return static::$validator;\n }", "private function getValidator()\n {\n return Validation::createValidatorBuilder()->enableAnnotationMapping()->getValidator();\n }", "public function getValidator()\n\t{\n\t\treturn $this->validation->validator->validator;\n\t}", "protected function get9c2345652e8ae3f87ba009d0f8fedee27bb751398014908e9ab2fb6d5bf1300f(): \\Viserio\\Component\\Validation\\Validator\n {\n return $this->services[\\Viserio\\Contract\\Validation\\Validator::class] = new \\Viserio\\Component\\Validation\\Validator();\n }", "public function getValidator()\n\t{\n\t\tif (!is_object($this->_validator)) {\n\t\t\t$validatorClass = $this->xpdo->loadClass('validation.xPDOValidator', XPDO_CORE_PATH, true, true);\n\t\t\tif ($derivedClass = $this->getOption(xPDO::OPT_VALIDATOR_CLASS, null, '')) {\n\t\t\t\tif ($derivedClass = $this->xpdo->loadClass($derivedClass, '', false, true)) {\n\t\t\t\t\t$validatorClass = $derivedClass;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($profitClass = $this->getOption('mlmsystem_handler_class_profit_validator', null, '')) {\n\t\t\t\tif ($profitClass = $this->xpdo->loadClass($profitClass, $this->getOption('mlmsystem_core_path', null, MODX_CORE_PATH . 'components/mlmsystem/') . 'handlers/validations/', false, true)) {\n\t\t\t\t\t$validatorClass = $profitClass;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($validatorClass) {\n\t\t\t\t$this->_validator = new $validatorClass($this);\n\t\t\t}\n\t\t}\n\t\treturn $this->_validator;\n\t}", "public function getValidator() {\n return $this->__validator;\n }", "public function getValidator() \n {//--------------->> getValidator()\n return $this->_validator;\n }", "protected function getValidatorInstance()\n {\n $factory = $this->container->make('Illuminate\\Validation\\Factory');\n if (method_exists($this, 'validator')) {\n return $this->container->call([$this, 'validator'], compact('factory'));\n }\n\n $rules = $this->container->call([$this, 'rules']);\n $attributes = $this->attributes();\n $messages = [];\n\n $translationsAttributesKey = $this->getTranslationsAttributesKey();\n\n foreach ($this->requiredLocales() as $localeKey => $locale) {\n $this->localeKey = $localeKey;\n foreach ($this->container->call([$this, 'translationRules']) as $attribute => $rule) {\n $key = $localeKey . '.' . $attribute;\n $rules[$key] = $rule;\n $attributes[$key] = trans($translationsAttributesKey . $attribute);\n }\n\n foreach ($this->container->call([$this, 'translationMessages']) as $attributeAndRule => $message) {\n $messages[$localeKey . '.' . $attributeAndRule] = $message;\n }\n }\n\n return $factory->make(\n $this->all(),\n $rules,\n array_merge($this->messages(), $messages),\n $attributes\n );\n }", "public function validator()\n {\n return $this->validator;\n }", "protected function getValidatorInstance()\n {\n // cause comes json, we need to change it to array to validate it\n $this->request->set('postHashtag', json_decode($this->input()['postHashtag'], true));\n $this->request->set('activeLocales', json_decode($this->input()['activeLocales'], true));\n // clean alias from unnecessary symbols\n $this->request->set('postAlias', Helpers::cleanToOnlyLettersNumbers($this->input()['postAlias']));\n\n\n return parent::getValidatorInstance();\n }", "public function getValidatorService();", "private function getValidator()\n {\n $v = new Validator();\n $v->addRules([\n ['label', 'Label', 'required'],\n ['num_value', 'Number', 'exists type=number'],\n ['comment', 'Comment', 'exists'],\n ]);\n return $v;\n }", "protected function getValidationFactory()\n {\n return app('validator');\n }", "public function getValidator($name = 'default') {\n\t\t\t//\n\t\t\tif ($name == 'default') { return new Validator();}\n\t\t\trequire (VALIDATORS . $name . '_validator.php');\n\t\t\t$name = $name . '_Validator';\n\t\t\treturn new $name();\n\t\t}", "protected function getValidator($request)\n {\n $rules = [\n 'page_title' => 'required',\n 'status' => 'required|integer|between:0,1'\n ];\n \n $customMessages = [\n 'page_title.required' => __('admin.pages.field_validation.title_field_required_msg'),\n 'status.required' => __('admin.pages.field_validation.status_field_required_msg')\n ];\n\n return Validator::make($request->all(), $rules, $customMessages);\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Atezate\\\\Validator\\Cubos')) {\n\n $this->setValidator(new \\Atezate\\Validator\\Cubos);\n }\n }\n\n return $this->_validator;\n }", "protected function getValidatorService()\n {\n return $this->services['validator'] = $this->get('validator.builder')->getValidator();\n }", "public function createValidator()\n {\n $validator = Validation::createValidatorBuilder()\n ->setMetadataFactory(new ClassMetadataFactory(new StaticMethodLoader()))\n ->setConstraintValidatorFactory(new ConstraintValidatorFactory($this->app))\n ->setTranslator($this->getTranslator())\n ->setApiVersion(Validation::API_VERSION_2_5)\n ->getValidator();\n\n return $validator;\n }", "public function getValidatorService()\n {\n return $this->validatorService;\n }", "public function getCreateTaskValidator()\n : Validators\\ValidatorInterface\n {\n return $this->app->make(\n Validators\\CreateTaskValidator::class\n );\n }", "protected function getValidator()\n {\n if ($form = $this->owner->getForm()) {\n \n if (($validator = $form->getValidator()) && $validator instanceof Validator) {\n return $validator;\n }\n \n }\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Klikasi\\\\Validator\\Newsletter')) {\n\n $this->setValidator(new \\Klikasi\\Validator\\Newsletter);\n }\n }\n\n return $this->_validator;\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Klikasi\\\\Validator\\Kanpaina')) {\n\n $this->setValidator(new \\Klikasi\\Validator\\Kanpaina);\n }\n }\n\n return $this->_validator;\n }", "function getCMSValidator()\n {\n return $this->getValidator();\n }", "function validator() {\n if ($this->validator) return $this->validator;\n $options = array();\n foreach ($this->fields_options as $field => $field_options) {\n if (!@$field_options['validation']) continue;\n $options[$field] = $field_options['validation'];\n }\n return $this->validator = new xValidatorStore($options, $_REQUEST);\n }", "function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}", "function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}", "function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}", "protected function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n\n $validator->sometimes('family_member_id.*', 'distinct', function($input)\n {\n return $input->family_member == 1;\n });\n\n $validator->sometimes('family_member_id.*', 'not_in:'. $this->request->get('patriarch'), function($input)\n {\n return $input->family_member == 1;\n });\n\n return $validator;\n }", "public function getDelegatedValidator()\n {\n return $this->validator;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n return UserValidator::class;\n }", "public function createValidator();", "protected function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n $validator->setAttributeNames(trans('mconsole::personal.form'));\n\n return $validator;\n }", "public function getValidator($validator)\n {\n $instance = null;\n\n if (strpos($validator, 'iPhorm_Validator_') === false) {\n $validator = 'iPhorm_Validator_' . ucfirst($validator);\n }\n\n $validators = $this->getValidators();\n if (array_key_exists($validator, $validators)) {\n $instance = $validators[$validator];\n }\n\n return $instance;\n }", "public function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n\n\n $validator->after(\n function () use ($validator) {\n $input = $this->all();\n }\n );\n\n return $validator;\n }", "public function get($codename) {\n\t\treturn $this->validators[$codename];\n\t}", "protected function getValidatorInstance()\n {\n // cause comes json, we need to change it to array to validate it\n $this->request->set('categories_names', json_decode($this->input()['categories_names'], true));\n // clean alias from unnecessary symbols\n $this->request->set('category_alias', Helpers::cleanToOnlyLettersNumbers($this->input()['category_alias']));\n\n return parent::getValidatorInstance();\n }", "public static function getValidator($name, array $options = []);", "protected function validator($request)\n {\n $data = $request->all();\n $vcode = $request->session()->get('p'.$data['phone']);\n return Validator::make($data, [\n 'name' => 'required|max:255|unique:users,name',\n 'phone' => 'required|phone|max:255|unique:users,phone',\n 'email' => 'required|email|max:255|unique:users,email',\n 'phonecode' => 'required|regex:/' . $vcode['verifycode'] . '/',\n 'password' => 'required|confirmed|min:6|max:20',\n ]);\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Atezate\\\\Validator\\Mensajes')) {\n\n $this->setValidator(new \\Atezate\\Validator\\Mensajes);\n }\n }\n\n return $this->_validator;\n }", "public function getValidator()\n {\n if (!isset($this->customValidator)) {\n throw new CertaintyException('Custom class not defined');\n }\n return $this->customValidator;\n }", "public function createFooResponseValidator(): ResponseValidatorInterface\n {\n return new AcmeFooResponseValidator();\n }", "private function createValidator()\n {\n // add custom validation rules\n \\Validator::extend('contains_caps',\n function($field, $value, $params)\n {\n return preg_match('#[A-Z]#', $value);\n }\n );\n\n \\Validator::extend('contains_digit',\n function($field, $value, $params)\n {\n return preg_match('#[0-9]#', $value);\n }\n );\n\n // set array of messages for custom rules\n $messages = array(\n 'contains_caps' => ':attribute must contain at least one capital letter.',\n 'contains_digit' => ':attribute must contain at least one numeric digit.'\n );\n\n // set array of rules to use for validation (many are Laravel's built-ins)\n $rules = array(\n 'email' => 'required|email|max:255',\n 'password' => 'required|between:8,50|contains_caps|contains_digit', // password has some \"strength\" requirements\n 'first_name' => 'required|max:50',\n 'last_name' => 'required|max:50',\n 'city' => 'required|max:100',\n 'state' => 'required|max:2',\n 'zip' => 'required|max:20',\n 'biography' => 'required',\n );\n\n $validator = \\Validator::make(\\Input::all(), $rules, $messages);\n\n return $validator;\n }", "protected function getAjaxValidationFactory()\n {\n return app()->make('validator');\n }", "public function withContext(mixed $context): ValidatorInterface;", "public function getValidatorInstance() {\n $validator = parent::getValidatorInstance();\n\n $validator->after(function() use ($validator) {\n\n // Does the event exist?\n if( !$this->checkEventExists()){\n $validator->errors()->add('event.Exists', 'This event does not longer exist.');\n } else {\n\n // Does the booker is not the creator?\n if( !$this->checkEventNotBookedByCreator()){\n $validator->errors()->add('event.BookedCreator', 'You can\\'t unbook this event because since you are the owner.'); \n }\n\n // Does the event is not already finished/has begun?\n if( !$this->checkEventDateNotDue()){\n $validator->errors()->add('event.DateDue', 'You can\\'t unbook this event because it\\'s already begun or is terminated.'); \n }\n }\n\n });\n\n return $validator;\n }", "protected function getValidator(): void\n {\n // TODO: Implement getValidator() method.\n }", "protected function getValidationFactory()\n {\n return app('Illuminate\\Contracts\\Validation\\Factory');\n }", "protected function makeValidator()\n {\n $rules = $this->expandUniqueRules($this->rules);\n\n $validator = static::$validator->make($this->getAttributes(), $rules);\n\n event(new ModelValidator($this, $validator));\n\n return $validator;\n }", "public function validator()\n {\n\n return ConfigValidator::class;\n }", "public function validator()\n {\n\n return FormInfoValidator::class;\n }", "public function getValidator(): ?ValidatorInterface\n {\n return new CompoundValidator(\n new CzechIbanValidator($this->accountNumber, $this->bankCode),\n new GenericIbanValidator($this)\n );\n }", "public function validator()\n {\n\n return ProvidersValidator::class;\n }", "protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }", "protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }", "protected function getForm_TypeGuesser_ValidatorService()\n {\n return $this->services['form.type_guesser.validator'] = new \\Symfony\\Component\\Form\\Extension\\Validator\\ValidatorTypeGuesser($this->get('validator'));\n }", "protected function validator(array $data)\n {\n return self::getValidator($data);\n }", "protected static function validator() {\n\t\tif (empty(self::$validate)) {\n\t\t\tself::$validate = new MpoValidator();\n\t\t}\n\t\treturn self::$validate;\n\t}", "public function makeValidator()\r\n {\r\n if (10 == $this->countDigits($this->string)) {\r\n return new Validator10($this->string);\r\n }\r\n\r\n if (13 == $this->countDigits($this->string)) {\r\n return new Validator13($this->string);\r\n } \r\n }", "public function initValidator()\n {\n if (!is_null($this->_validator)) {\n return $this->_validator;\n }\n $this->_validator = new SurveyManager_Entity_Validator_Survey($this);\n \n return $this->_validator;\n }", "public function make($validator)\n\t{\n\t\tif ($validator instanceof Closure)\n\t\t{\n\t\t\t$validator = new ClosureValidator($validator, $this->request, $this->validatorFactory, $this->router);\n\n\t\t\treturn array($validator->getInput(), $validator->getRules(), $validator->getFailedMessages());\n\t\t}\n\n\t\tif (is_string($validator) AND ! isset($this->validators[$validator]))\n\t\t{\n\t\t\t$this->validators[$validator] = $validator;\n\t\t}\n\n\t\tif (isset($this->validators[$validator]))\n\t\t{\n\t\t\tif ($this->validators[$validator] instanceof Closure)\n\t\t\t{\n\t\t\t\treturn new ClosureValidator($this->validators[$validator], $this->request, $this->validatorFactory);\n\t\t\t}\n\n\t\t\treturn new $this->validators[$validator]($this->request, $this->validatorFactory);\n\t\t}\n\n\t\tthrow new \\InvalidArgumentException('Invalid input validator.');\n\t}", "protected function validator(Request $request)\n\t{\n\t\treturn Validator::make($request->all(), [\n\t\t\t'title' => 'required',\n\t\t\t]);\n\t}", "protected function validator(Request $request)\n {\n return Validator::make($request, [\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => ['required', 'string', 'min:8', 'confirmed'],\n ]);\n }", "public function getContractValidator(): ?ContractValidator {\n\n return $this->contractValidator;\n\n }", "public function validator()\n {\n\n return DistribuidorValidator::class;\n }", "protected function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n // $validator->sometimes();\n\n $validator->after(function ($validator) {\n $this->request->remove('is_post');\n $this->request->remove('is_update');\n $this->request->remove('is_editing');\n $this->request->remove('is_delete');\n });\n return $validator;\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Atezate\\\\Validator\\Tipos')) {\n\n $this->setValidator(new \\Atezate\\Validator\\Tipos);\n }\n }\n\n return $this->_validator;\n }", "public function validator()\n {\n\n return BabyInfoValidator::class;\n }", "protected function getValidator(array $options = [])\n {\n $type = '\\\\marvin255\\\\serviform\\\\validators\\\\Regexp';\n\n return FactoryValidators::initElement($type, $options);\n }", "public function validator()\n {\n return ZhuanTiValidator::class;\n }", "public function validator()\n {\n\n return EmpreValidator::class;\n }", "public function validator()\n {\n\n return OccupationValidator::class;\n }", "public function validator()\n {\n\n return GrupoServicosValidator::class;\n }", "public function validator()\n {\n\n return ScheduleValidator::class;\n }", "protected function validator(Request $request)\n {\n return Validator::make($request, [\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'suburb' => 'required',\n 'zipcode' => 'required',\n\t\t\t\n ]);\n }", "public function validator()\n {\n return NotificationValidator::class;\n }", "public function validator()\n {\n $validator = $this->baseValidator([\n 'stripe_token' => 'required',\n 'vat_id' => 'nullable|max:50|vat_id',\n ]);\n\n if (Spark::collectsBillingAddress()) {\n $this->validateBillingAddress($validator);\n }\n\n return $validator;\n }", "public function validator()\n {\n\n return ProducerValidator::class;\n }", "protected function validator(Request $request)\n {\n return Validator::make($request->all(), [\n 'userid' => 'required|max:11',\n 'password' => 'required'\n ]);\n }", "protected function validation($request)\n {\n\n $validator = Validator::make($request->all(), [\n 'firstname' => 'required',\n 'lastname' => 'required',\n 'email' => 'required',\n 'pocketmoney' => 'required',\n 'password' => 'required',\n 'age' => 'required',\n 'city' => 'required',\n 'state' => 'required',\n 'zip' => 'required',\n 'country' => 'required',\n ]);\n\n return $validator;\n }", "public function getValidator(?string $code) : ?Validator {\n if ($code === null || strlen($code) < 2) { // ensure we can extract the code\n return null;\n }\n\n $key = substr($code, 0, 2);\n\n return $this->validators[$key] ?? null;\n }", "public function validator()\n {\n $validator = validator($this->all(), [\n 'name' => 'required|max:255',\n 'server_provider_id' => ['required', Rule::exists('server_providers', 'id')->where(function ($query) {\n $query->where('user_id', $this->user()->id);\n })],\n 'region' => 'required|string',\n 'source_provider_id' => ['required', Rule::exists('source_providers', 'id')->where(function ($query) {\n $query->where('user_id', $this->user()->id);\n })],\n 'repository' => [\n 'required',\n 'string',\n new ValidRepository(SourceProvider::find($this->source_provider_id))\n ],\n 'database' => 'string|alpha_dash|max:255',\n 'database_size' => 'string',\n ]);\n\n return $this->validateRegionAndSize($validator);\n }", "public function validator()\n {\n return LeaveRequestValidator::class;\n }", "private function validator(Request $request)\n {\n //validate the form...\n }", "protected function createUserValidator($request) {\n \treturn Validator::make($request,[\n 'first_name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'last_name' => 'required',\n 'password' => 'required|min:6',\n 'status' => 'required'\n ]);\n \t}", "public function validator()\n {\n\n return PescariaValidator::class;\n }", "protected function parseRulesFromValidator()\n {\n // First we call needed method with needed container\n $factory = app()->make(ValidationFactory::class);\n $validator = app()->call([$this->getFormRequestInstance(), 'validator'], [$factory]);\n\n // After that we get initialRules property (since plain `rules` prop doesn't contain array rules)\n // and make it public so that later we can get it's value\n $property = (new ReflectionClass($validator))->getProperty('initialRules');\n $property->setAccessible(true);\n\n return $property->getValue($validator);\n }", "protected function validator(Request $request)\n {\n return Validator::make($request->all(), [\n 'userid' => 'required|max:11',\n 'page' => ''\n ]);\n }" ]
[ "0.7217253", "0.71017957", "0.71017957", "0.7048845", "0.7048845", "0.7048845", "0.6924129", "0.69168675", "0.6899657", "0.68542325", "0.684801", "0.68128955", "0.68007755", "0.6797457", "0.67463154", "0.66977936", "0.6687648", "0.6645321", "0.6593937", "0.6564549", "0.6506735", "0.6500423", "0.64936745", "0.6428733", "0.640632", "0.64031655", "0.6393014", "0.6366359", "0.6347438", "0.63437617", "0.6282892", "0.6252371", "0.62332886", "0.62275493", "0.62275493", "0.62275493", "0.6213424", "0.6203102", "0.61237746", "0.61237746", "0.61237746", "0.61237746", "0.61237746", "0.610553", "0.60834324", "0.6066394", "0.60355836", "0.59944713", "0.59814906", "0.59801394", "0.59744567", "0.5939118", "0.59275067", "0.59039265", "0.58902186", "0.5890007", "0.58719885", "0.586906", "0.5865833", "0.5862728", "0.58234406", "0.58158123", "0.5815437", "0.5784297", "0.5780951", "0.5768072", "0.5748842", "0.5748842", "0.5748371", "0.57390654", "0.5723674", "0.5717639", "0.57142323", "0.5711796", "0.5675113", "0.56740963", "0.5673833", "0.56687135", "0.5667633", "0.56432956", "0.5637126", "0.5622988", "0.5614382", "0.56140053", "0.5581888", "0.55700976", "0.55691636", "0.55622005", "0.55596167", "0.555281", "0.55358255", "0.55254596", "0.55246574", "0.5520975", "0.5513461", "0.5510867", "0.5508561", "0.5503873", "0.55037427", "0.54932034", "0.54874235" ]
0.0
-1
Create a new user instance after a valid registration.
protected function create(array $data) { $user = User::create([ 'email' => $data['email'], 'password' => Hash::make($data['password']), ]); if($user){ $profile = Profile::create([ 'user_id'=>$user->id, 'firstname'=>$data['firstname'], 'lastname'=>$data['lastname'] ]); if($profile){ $team = Team::create(['owner_id'=>$user->id]); if($team){ $user->teams()->attach($team->id); if(isset($data['token']) && $data['token'] != NULL){ $invite = Invite::where('token','=',$data['token'])->first(); if($invite) { if ($data['email'] == $invite->email) { $team = Team::find($invite->team_id); $team->users()->attach([$user->id]); // TODO: Make this shit work properly. Now it duplicates this fuckers. $invite->destroy($invite->id); } } } return $user; } }else{ User::destroy($user->id); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _createUser()\n {\n $data = [\n 'email' => '[email protected]',\n 'password' => 'test',\n ];\n\n $user = $this->Users->newEntity($data);\n\n $user->set('active', true);\n $user->set('role_id', 1);\n\n $this->Users->save($user);\n }", "public function createUser()\n {\n $this->user = factory(Easel\\Models\\User::class)->create();\n }", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }", "public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }", "public function createUser()\n {\n\n $userCurrent = $this->userValidator->validate();\n $userCurrent['password'] = Hash::make($userCurrent['password']);\n $userCurrent = $this->user::create($userCurrent);\n $userCurrent->roles()->attach(Role::where('name', 'user')->first());\n return $this->successResponse('user', $userCurrent, 201);\n }", "public function createUser()\n {\n return User::factory()->create();\n }", "public function create() {\n $username = Input::get('reg_username');\n $email = Input::get('email');\n $password = Input::get('reg_password');\n $confirm_password = Input::get('confirm_password');\n\n // Make sure that both passwords are identical\n if (strcmp($password, $confirm_password) == 0) {\n $hashed_password = Hash::make($password);\n try {\n $user = new User;\n $user -> username = $username;\n $user -> email = $email;\n $user -> password = $hashed_password;\n $user -> save();\n } catch (\\Illuminate\\Database\\QueryException $e) {\n return Redirect::route('register') -> with(array(\n 'alert-message' => 'Error: Failed to register user in database.',\n 'alert-class' => 'alert-danger'\n ));\n }\n\n // Login the new user automatically\n $user = User::where('username', '=', $username) -> first();\n Auth::login($user);\n\n return Redirect::route('home') -> with(array(\n 'alert-message' => 'Welcome! You have successfully created an account, and have been logged in.',\n 'alert-class' => 'alert-success'\n ));\n }\n\n return Redirect::route('register') -> with(array(\n 'alert-message' => 'The attempt to create an account was unsuccessful!',\n 'alert-class' => 'alert-danger'\n ));\n }", "private function newUser()\n {\n return factory(User::class)->create([\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'email_verified_at' => '2019-06-01 16:45:00',\n 'password' => Hash::make('test1234'),\n 'photo' => 'https://lorempixel.com/640/480/?65533',\n 'created_at' => '2019-06-01 16:45:00',\n 'updated_at' => '2019-06-01 16:45:00',\n 'deleted_at' => '2019-06-01 16:45:00',\n 'logged_in_at' => '2019-06-01 16:45:00',\n ]);\n }", "public function createAction()\r\n {\r\n $user = new User($_POST);\r\n\r\n if ($user->save()) {\r\n\t\t\t\r\n\t\t\tsession_regenerate_id(true);\r\n\r\n\t\t\t$_SESSION['user_id'] = User::getIdSavedUser($_POST['email']);\r\n\t\t\t\r\n\t\t\tIncome::saveDefaultIncomes($_SESSION['user_id']);\r\n\t\t\tExpense::saveDefaultExpenses($_SESSION['user_id']);\r\n\t\t\tPaymentMethod::saveDefaultPaymentMethods($_SESSION['user_id']);\r\n\t\t\t\r\n\t\t\t$user->sendActivationEmail();\r\n\r\n $this->redirect('/signup/success');\r\n\r\n } else {\r\n\r\n View::renderTemplate('Signup/new.html', [\r\n 'user' => $user\r\n ]);\r\n\r\n }\r\n }", "public function create() {\n\n //Create validator for User registration form with all data sended. Load from model\n $validator = Validator::make(Input::all(), User::$rules_validator);\n \n //Only if request is send by form (post) procces to create user\n if (Request::isMethod('post')) {\n \n //Check fields data sended\n if ($validator->fails()) {\n //Redirecto to form with error\n $messages = $validator->messages()->all(\"<li>:message</li>\");\n $error = \"<ul>\". implode(\"\", $messages).\"</ul>\";\n return Redirect::to('/user/register')->with('error', $error)->withInput(Input::all());\n }\n \n //Pass validator, proccess to create User\n if( $user = User::_save( Input::all() ) ){\n //Auto login user created, is same that attemd method\n Auth::login($user);\n //Redirecto to profile\n return Redirect::intended(action('UserController@profile', array('username' => Auth::user()->username )))->with('notice', trans(\"app.welcome_message\", array(\"user\"=>Auth::user()->username) ));\n }else{\n //Error to try create User, redirecto to Registration form\n return Redirect::to('/user/register')->with('error', trans(\"app.error_creating\"))->withInput(Input::all());\n }\n }\n \n //Return to view\n return View::make('user.register');\n }", "public function create()\n\t{\n\t\tif (!isset($_POST) || empty($_POST))\n\t\t{\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// TODO need to validate data\n\t\t$data = array('username' => $_POST['username'], 'password' => $_POST['password'], 'cpassword' => $_POST['cpassword'], 'email' => $_POST['email']);\n\t\t// validate the input data\n\t\t$errorArray = User::validates($data);\n\t\tif (count($errorArray))\n\t\t{\n\t\t\t// store errors in session and redirect\n\t\t\t$_SESSION['user'] = $data;\n\t\t\t$_SESSION['user']['errors'] = $errorArray;\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// create a new user, assume all new users are not staff\n\t\t$values = array('username'=>$_POST['username'],'password'=>$_POST['password'],'email'=>$_POST['email'],'user_type'=>'1');\n\t\t$id = User::createUser($values);\n\t\t// log the user in\n\t\t$_SESSION['user']['id'] = $id;\n\t\t$_SESSION['user']['name'] = $_POST['username'];\n\t\t$_SESSION['user']['type'] = '1';\n\t\techo \"id = \" . $id;\n\t\theader(\"Location: /myrecipe/users/\" . $id);\n\t\texit;\n\t}", "public function registerNewUser()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('register', Input::all());\n\n\t\t# if we successfully register a new user\n\t\tif(isset($response['success']))\n\t\t{\n\t\t\tUser::startSession($response['success']['data']['user']);\n\n\t\t\t# grab the data array from the response\n\t\t\tSession::flash('success', $response['success']['data']);\n\n\t\t\t# show the user profile screen\n\t\t\treturn Redirect::route('profile');\n\t\t}\n\t\t# there was a problem registering the user\n\t\telse \n\t\t{\n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('registration-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\n\t\t\t# ... and show the sign up form again\n\t\t\treturn Redirect::back();\n\t\t}\n\t}", "public function create(array $data)\n {\n $user = User::isCurrentUser($data);\n\n // If user doesn't exist, attempt to create.\n if (!$user) {\n $user = new User($data);\n\n $validator = $this->validation->make($user->toArray(), [\n 'phone' => 'unique:users',\n 'email' => 'unique:users',\n ]);\n\n if($validator->fails()) {\n throw new ValidationException($validator);\n }\n\n $user->country_code = get_country_code();\n $user->northstar_id = $this->northstar->register($user);\n\n $user->save();\n\n event(new UserRegistered($user));\n }\n\n return $user;\n }", "private function createUser()\n {\n $sl = $this->getServiceManager();\n $userService = $sl->get(\"zfcuser_user_service\");\n $randomness = \"mockuser_\".mt_rand();\n $data = array(\n \"username\" => \"{$randomness}\",\n \"password\" => \"password\",\n \"passwordVerify\" => \"password\",\n \"display_name\" => \"MOCKUSER\",\n \"email\" => \"{$randomness}@google.com\"\n );\n $user = $userService->register($data);\n\n return $user;\n }", "public function postCreate() {\n \t$validator = Validator::make(Input::all(), User::$rules);\n\n \t// i made a user with [email protected], goodbye\n \tif ($validator->passes()) {\n \t\t// validation has passed, save user in DB\n \t\t$user = new User;\n \t\t$user->first_name = Input::get('first_name');\n \t\t$user->last_name = Input::get('last_name');\n \t\t$user->email = Input::get('email');\n \t\t$user->password = Hash::make(Input::get('password'));\n \t\t$user->save();\n\n \t\treturn Redirect::to('users/login')->with('message', '<div class=\"alert alert-success\" role=\"alert\">Thanks for registering!</div>');\n \t}\n \telse {\n \t\t// validation has failed, display error messages\n \t\treturn Redirect::to('users/register')->with('message', '<div class=\"alert alert-warning\" role=\"alert\">The following errors occurred</div>')->withErrors($validator)->withInput();\n \t}\n }", "public function create()\n {\n return $this->userService->create();\n }", "public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }", "public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }", "function register_new_user()\n{\n // alidate the data submited by our user\n $result = _validation([\n 'name' => 'required|string|max:255',\n 'email' => 'required|string|email|unique:users',\n 'password' => 'required|string|equals:password_confirmation'\n ]);\n\n // Get the validated data.\n $validated = $result['validated'];\n\n // _dump(bcrypt_hasher_make($validated['password']), true);\n\n // Create the user\n $user = create_new_user(\n $validated['name'],\n $validated['email'],\n bcrypt_hasher_make($validated['password']) // Always hash your users password\n );\n\n // Redirect back if the user was not created.\n _redirect_back_if($user === false, ['errors' => [\n 'Unable to register user at the moment.'\n ]]);\n\n // log the user in\n login_user($user);\n}", "public function newRegistration() {\n $this->registerModel->getUserRegistrationInput();\n $this->registerView->setUsernameValue($this->registerView->getUsername());\n $this->registerModel->validateRegisterInputIfSubmitted();\n if ($this->registerModel->isValidationOk()) {\n $this->registerModel->hashPassword();\n $this->registerModel->saveUserToDatabase();\n $this->loginView->setUsernameValue($this->registerView->getUsername());\n $this->loginView->setLoginMessage(\"Registered new user.\");\n $this->layoutView->render(false, $this->loginView);\n } else {\n $this->layoutView->render(false, $this->registerView);\n }\n \n }", "public function create()\n {\n $request = (object) $this->request->getPost();\n\n if (! $this->validate(static::rules())) {\n return redirect()->back()->withInput()->with('errors', $this->validator->getErrors());\n }\n\n $user = static::createUser($request);\n\n Auth::login($user);\n\n // Automatic trigger send verify email if user\n // instanceof VerifyEmailInterface.\n if ($user instanceof VerifyEmailInterface) {\n Events::trigger(VerifyEmailInterface::class, $user->email);\n }\n\n return redirect(config('Auth')->home);\n }", "public function createUser()\n {\n }", "private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }", "static private function createNewUserFromPost() {\r\n\t\t$errors = array();\r\n\r\n\t\t$activationHash = (System::isAtLocalhost()) ? '' : self::getRandomHash();\r\n\t\t$newAccountId = DB::getInstance()->insert('account',\r\n\t\t\t\tarray('username', 'name', 'mail', 'password', 'registerdate', 'activation_hash'),\r\n\t\t\t\tarray($_POST['new_username'], $_POST['name'], $_POST['email'], self::passwordToHash($_POST['password']), time(), $activationHash));\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = true;\r\n\t\tself::$NEW_REGISTERED_ID = $newAccountId;\r\n\r\n\t\tif ($newAccountId === false)\r\n\t\t\t$errors[] = __('There went something wrong. Please contact the administrator.');\r\n\t\telse {\r\n\t\t\tself::importEmptyValuesFor($newAccountId);\r\n\t\t\tself::setSpecialConfigValuesFor($newAccountId);\r\n\r\n\t\t\tif ($activationHash != '')\r\n\t\t\t\tself::setAndSendActivationKeyFor($newAccountId, $errors);\r\n\t\t}\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = false;\r\n\t\tself::$NEW_REGISTERED_ID = -1;\r\n\r\n\t\treturn $errors;\r\n\t}", "protected function create(array $data)\n {\n $user = $this->userService->createUser($data);\n if(!$user) \n return redirect()->back()->with([\"status\" => \"error\", \"msg\"=>\"An Error Occured While Creating a user\"]);\n $this->capsuleService->createParty(PartyDto::fromUser($user)); // create a party on capsule crm for representing registered user\n $this->capsuleService->notifySalesHeadOfNewUserSignup($user); // Send a notification to app sales head on user signup\n return $user;\n }", "protected function create(array $data)\n {\n $user = new User();\n $reference = str_random(30).time();\n// $user->generateReference();\n\n $user = $user->create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'phone' => $data['phone'],\n 'gender' => $data['gender'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'activation_code' => $reference\n// 'avatar' => 'public/defaults/avatars/default.png'\n ]);\n\n $user->notify((new sendUserActivation($user))->delay(now()->addSeconds(2)));\n Session::flash('message', 'Welcome. Please complete your profile to continue');\n return $user;\n }", "public function createUser()\n {\n $class = $this->userClass;\n $user = new $class;\n return $user;\n }", "function new_user($firstName,$lastName,$email,$password){\t\n $salt = generate_salt();\n $encPassword = encrypt_password($password,$salt);\n\n //$user = create_user_object($firstName,$lastName,$email,$encPassword,$salt,$userType);\n save_user_info($firstName,$lastName,$email,$encPassword,$salt);\n \n return true;\n}", "private function register(): void\n {\n $user = User::factory()->create();\n $this->actingAs($user);\n }", "protected function createUser ()\n {\n /* Method of the UserFactory class */\n $this->_objUser = UserFactory::createUser(ucfirst($_SESSION[\"userType\"])); \n $this->_objUser->setFirstName($_SESSION[\"emailID\"]);\n }", "public function createUserAction() {\n $this->authService->createUser();\n die();\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'uuid' => Uuid::generate(5,$data['email'], Uuid::NS_DNS),\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ]);\n\n $userObj = User::find($user->id);\n\n if(Event::fire(new WelcomeUser($userObj)))\n {\n return $user;\n }else\n {\n //Redirect to error page and log in the incident\n }\n\n }", "public function register() {\n\t\tif ($this->Session->check('Auth.User')) {\n\t\t\t$this->redirect('/');\n\t\t}\n\t\t\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$data = $this->request->data;\n\t\t\tif ($this->User->save($data)) {\n\t\t\t\t$this->Session->setFlash(\"User has been created.\", 'default', array(), 'register');\n\t\t\t\t$this->redirect('/login');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(\"This user couldn't created. Please try again.\");\n\t\t\t}\n\t\t} else\n\t\t\t$this->Session->delete('Message.register');\n\t}", "protected function create(array $data)\n {\n\n // incase the user does not enter the password and exits, then \n // we give give them to re register into the website, so \n // a new email is sent for verification and the old token is regenerated\n if($user = User::where('email', '=', $data['email'])->first()){\n\n $user->verification_token = str_random(30);\n $user->status = User::NOT_VERIFIED;\n $user->save();\n\n return $user;\n }\n\n return User::create([\n 'email' => $data['email'],\n 'name' => $data['name'],\n 'verification_token' => str_random(30)\n ]);\n }", "public function handle_create(RegisterRequest $request)\n {\n $request->validated();\n\n $user = new User;\n\n $user->fullname = $request->fullname;\n $user->username = $request->username;\n $user->email = $request->email;\n\n $user->phone = $request->phone;\n $user->address = $request->address;\n $user->password = Hash::make($request->password);\n\n\n if (\n isset($request->file_img)\n &&\n ($request->file_img->getMimeType() == 'image/png' ||\n $request->file_img->getMimeType() == 'image/jpeg' ||\n $request->file_img->getMimeType() == 'image/jpg')\n && $request->file_img->getSize() <= 5120\n ) {\n $extension = $request->file('file_img')->guessClientExtension();\n $new_name_img = time() . '-' . $request->username . '.' . $extension;\n\n // move image to public images folder\n $request->file_img->move(public_path('images', $new_name_img));\n\n $user->image = $new_name_img;\n }\n $user->create_by = Auth::guard('admin')->user()->username;\n\n $save = $user->save();\n if ($save) {\n return redirect()->route('admin.showuser');\n } else {\n return back()->with('fail', 'an error occurred!');\n }\n }", "public function user_signup_new(Request $request)\n {\n $request->validate([\n 'first_name' => 'required',\n 'email' => 'required|string|unique:users',\n 'other_mobile_number' => 'required|integer|unique:users',\n 'selectType' => 'required',\n 'agree_check' => 'required|boolean',\n 'password' => 'required|string|confirmed'\n ]);\n\n $token = getenv(\"TWILIO_AUTH_TOKEN\");\n $twilio_sid = getenv(\"TWILIO_SID\");\n $twilio_verify_sid = getenv(\"TWILIO_VERIFY_SID\");\n $twilio = new Client($twilio_sid, $token);\n $twilio->verify->v2->services($twilio_verify_sid)\n ->verifications\n ->create(\"+91\".$request->other_mobile_number, \"sms\");\n\n $user = new User([\n 'name' => $request->first_name,\n 'last_name' => $request->last_name,\n 'email' => $request->email,\n 'usertype' => 3,\n 'userSelect_type' => $request->selectType,\n 'other_mobile_number' => $request->other_mobile_number,\n 'password' => bcrypt($request->password)\n ]);\n\n $user->save();\n eventtracker::create(['symbol_code' => '1', 'event' => $request->email.' created a new account as a User']);\n\n return response()->json([\n 'data' => $user,\n 'message' => 'Successfully created user!'\n ], 201);\n }", "public static function create() {\n\t\tif (empty(Validator::$errors)) {\n\t\t\tself::insert(self::$tablename, array(\"email\"=>self::$email, \"password_hash\"=>self::$password_hash));\n\t\t\tSession::setFlash(\"alert-success\",\"You have successfully signed up!\");\n\t\t} else {\n\t\t\tSession::setFlash(\"alert-danger\", self::display(Validator::$errors));\n\t\t\tValidator::$errors = [];\n\t\t}\n\t}", "public function register() {\n\t\tif ($this -> Auth -> loggedIn()) {\n\t\t\t$this -> Session -> setFlash('You are already registered.');\n\t\t\t$this -> redirect($this -> referer());\n\t\t}\n\t\tif ($this -> request -> is('post')) {\n\t\t\t$this -> User -> create();\n\t\t\t$data = $this -> request -> data;\n\t\t\t$data['User']['public_key'] = uniqid();\n\t\t\t$data['User']['role'] = \"user\";\n\t\t\t$data['User']['api_key'] = md5(microtime().rand());\n\t\t\tif ($this -> User -> save($data)) {\n\t\t\t\t$this -> Session -> setFlash(__('You have succesfully registered. Now you can login.'));\n\t\t\t\t$this -> redirect('/users/login');\n\t\t\t} else {\n\t\t\t\t$this -> Session -> setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t}\n\n\t\t$this -> set('title_for_layout', 'User Registration');\n\t}", "protected function create()\n {\n// dd(request());\n // create new user in database\n $newUser = User::create([\n 'name' => \\request('name'),\n 'email' => \\request('email'),\n 'student_id' => \\request('student_id'),\n 'phone' => \\request('phone'),\n 'password' => bcrypt(\\request('password')),\n 'remember_token' => \\request('_token'),\n ]);\n\n\n //login the new user\n\n auth()->login($newUser);\n\n }", "private static function register() {\n if ( !self::validatePost() ) {\n return;\n }\n\n if ( !self::validEmail($_POST['email']) ) {\n self::setError('E-Mail Adresse ist nicht g&uuml;ltig!<br>');\n return;\n }\n \n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $verified = md5($_POST['email'].$password.microtime(true));\n \n $result = Database::createUser($_POST['email'],$password,$verified);\n \n if ( $result === false || !is_numeric($result) ) {\n return;\n }\n \n $_SESSION['user']['id'] = $result;\n $_SESSION['user']['email'] = $_POST['email'];\n $_SESSION['user']['verified'] = $verified;\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n \n self::registerMail($verified);\n }", "public function store()\n {\n // Validate form\n $validator = User::registrationValidation();\n $this->validate(request(), $validator);\n\n // Register user\n $registrationParams = User::registrationParams();\n $user = User::create(request($registrationParams));\n\n // Log in user\n User::loginUser($user);\n\n // Redirect to home page\n return redirect('/');\n }", "function createUser()\n{\n $userCheck = UsersQuery::create()->findOneByUsername($_POST['username']);\n if ($userCheck == \"\") {\n // next add user to db\n $user = new Users();\n $user->setUsername($_POST['username']);\n $user->setPassword($_POST['password']);\n $user->setName($_POST['name']);\n $user->setEmail($_POST['email']);\n $user->setStatus(\"active\");\n $user->setPicture(\"none\");\n $user->setCreated(time());\n $user->setModified(time());\n\n $user->save();\n\n if ($user != null) {\n echo \"user added successfully\";\n }\n } else {\n echo \"user already registered\";\n }\n}", "public function create(array $input)\n {\n Validator::make($input, [\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => $this->passwordRules(),\n 'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['required', 'accepted'] : '',\n ])->validate();\n\n $user = User::create([\n 'name' => $input['name'],\n 'email' => $input['email'],\n 'password' => Hash::make($input['password']),\n 'timezone_id'=> Timezone::getTimezoneId($input['timezone'] ?? null),\n 'role_id'=> $input['role_id'] ?? Role::getDefaultRoleId()\n ]);\n\n $user->notify(new MyAccountRegistration);\n\n // todo: will require a change on role implementation\n User::where('id', '!=', $user->id)->get()->map(function ($admin) use ($user) {\n $admin->notify(new NewUserRegistration($user));\n });\n\n return $user;\n }", "private function createNewUser():User\n {\n $entityManager = $this->getDoctrine()->getManager();\n\n //create user\n $user = new User();\n $user->setEmail($this->request->request->get('email'));\n $user->setPassword('');\n $entityManager->persist($user);\n $entityManager->flush();\n //create user\n\n //encode user password\n $user->setPassword($user->encodePassword($this->request->request->get('password')));\n $entityManager->persist($user);\n $entityManager->flush();\n //encode user password\n return $user;\n }", "private function create()\n {\n return $this->db->putUser($this->getDefaultAttributes());\n }", "public function newUser($request)\r\n {\r\n /*\r\n * As before we set $params1 'Username'. We need this to check if user exist in database beacuse we don't allow\r\n * two user in database with the same username.\r\n */\r\n $params1 = [\r\n 'Username' => $request['username']\r\n ];\r\n if ($this->existUser($params1) == True) {\r\n /*\r\n * If in the database exits user with the same username then you return false (user must change username)\r\n */\r\n\r\n return False;\r\n } else {\r\n\r\n /*\r\n * Next step is creating a valid activation hash code. We need this for security (in URL you dont want to show UserID\r\n * beacuse in this case attacker has more information about your database)\r\n * Each of users in database has unique activation hash code. Activation hash code we need for activation account and\r\n * reseting password.\r\n *\r\n * Now,follow algorithm for creating unique activation hash code.\r\n */\r\n while (True) {\r\n $params2 = [\r\n 'Activation' => password_hash(rand(), PASSWORD_DEFAULT)\r\n ];\r\n\r\n if ($this->existUser($params2) != True) {\r\n break;\r\n }\r\n }\r\n\r\n /*\r\n * Next step is set params which need to create new user into database.\r\n */\r\n\r\n $params3 = [\r\n 'Username' => $request['username'],\r\n 'Email' => $request['email'],\r\n 'Password' => password_hash($request['password'], PASSWORD_DEFAULT),\r\n 'IsDeleted' => '0',\r\n 'Registration' => (new DateTime('now'))->format('Y-m-d h:s'),\r\n 'Activation' => $params2['Activation']\r\n ];\r\n\r\n $userID = $this->create();\r\n\r\n /*\r\n * Creating link which is send to user mail at registration for activating his account.\r\n */\r\n $link = \"http://www.mdtohtml.com/index.php?activation=\" . $params3['Activation'];\r\n\r\n /*\r\n * Inserting new user in database\r\n */\r\n $this->update($userID, $params3);\r\n\r\n /*\r\n * Now we have to prepare data to send activation mail to user (mail).\r\n */\r\n\r\n $data = [\r\n 'email' => $request['email'],\r\n 'title' => 'Registration support',\r\n 'body' => \"Hello!\\n\\nClick on below link to confirm your registration.\\n\\n$link\",\r\n 'subject' => 'Confirm password',\r\n 'user' => $request['username'],\r\n 'link' => $link,\r\n 'username' => '[email protected]',\r\n 'password' => 'preskok123'\r\n\r\n ];\r\n\r\n /*\r\n * At the end sending activating mail to user.\r\n */\r\n\r\n $this->send_mail($data);\r\n return True;\r\n }\r\n\r\n }", "public function registerUser()\n {\n $request = new Request();\n\n $email = $request->input('email');\n $password = $request->input('password');\n $password_repeat = $request->input('password_repeat');\n\n\n // Check email\n if (!$email) {\n $this->showRegisterForm(['Please enter email']);\n }\n // Check password\n if(!$password){\n $this->showRegisterForm(['Please enter password']);\n }\n if (!$password || !$password_repeat || $password != $password_repeat) {\n $this->showRegisterForm(['Passwords do not match']);\n }\n\n // Check user exist\n if ($this->getUser($email)) {\n $this->showRegisterForm(['User already isset']);\n }\n\n // Save user to DB\n $user = new User();\n $user->email = $email;\n $user->password = md5($password);\n $user->rights = 20;\n\n // Check save process\n if (!$user->save()) {\n $this->showRegisterForm(['Something goes wrong']);\n }\n\n // Redirect to endpoint\n header(\"Location: \" . self::ENDPOINTS['success_register']);\n }", "function createUser(){\n\t\t\tglobal $db;\n\t\t\tglobal $json;\n\t\t\t\n\t\t\t//Check if username meets minimum requirements\n\t\t\tif($this->username == \"\" || $this->username == null || strlen($this->username) < 6){\n\t\t\t\t$json->invalidMinimumRequirements(\"Username\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t//Check if username already exists\n\t\t\t\tif($db->query('SELECT * FROM user WHERE Username = \"'.$this->username.'\"')->rowCount() > 0){\n\t\t\t\t\t$json->exists(\"Username\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if password meets minimum requirements\n\t\t\tif($this->password == \"\" || $this->password == null || strlen($this->password) < 6){\n\t\t\t\t$json->invalidMinimumRequirements(\"Password\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$passHash = generatePassword($this->password);\n\t\t\t\t$this->password = $passHash;\n\t\t\t\t$apiHash = generateApiKey($this->username.\"\".date('Y-m-d'));\n\t\t\t}\n\t\t\t\n\t\t\t//Check if admin is empty or invalid, if so make user non-admin\n\t\t\tif($this->admin == \"\" || $this->admin == null || $this->admin < 0)\n\t\t\t\t$this->admin = 0;\n\t\t\t\n\t\t\tif($this->subject == \"\" || $this->subject == null || $this->subject < 0)\n\t\t\t\t$this->subject = 0;\n\t\t\t\t\n\t\t\t$insert = $db->prepare('INSERT INTO user VALUES (DEFAULT, :username, :password, :subject, :admin, :api)');\n\t\t\t$insert->bindParam(':username', $this->username);\n\t\t\t$insert->bindParam(':password', $this->password);\n\t\t\t$insert->bindParam(':subject', $this->subject);\n\t\t\t$insert->bindParam(':admin', $this->admin);\n\t\t\t$insert->bindParam(':api', $apiHash);\n\t\t\t\n\t\t\tif($insert->execute()){\n\t\t\t\t$json->created(\"User\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$json->server();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "protected function create(array $data)\n {\n $user = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'verifyToken' => Str::random(40)\n ]);\n\n $thisUser = User::findorFail($user->id);\n $this->sendEmail($thisUser);\n \n Session::flash('status','Registered! but verify your email to active your account');\n\n return $user;\n\n }", "public function newUser() {\n $this->checkValidUser();\n\n $this->db->sql = 'INSERT INTO '.$this->db->dbTbl['users'].' (username, salt, hash) VALUES (:username, :salt, :hash)';\n\n $salt = $this->getNewSalt();\n\n $res = $this->db->execute(array(\n ':username' => $this->getData('username'),\n ':salt' => $salt,\n ':hash' => md5($salt . $this->getData('password'))\n ));\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'xxT5r'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'dU4r5'\n );\n }\n\n $this->renderOutput();\n }", "public function createUser () {\n syslog( LOG_INFO, 'Create a Lineberty User \\n' );\n\n $url = '/users';\n\n return $this->runRequest($url, 'POST', null);\n }", "public function test_user_created()\n {\n $this->wrongCredentials = false;\n $credentials = self::DEFAULT_CREDENTIALS;\n $user = $this->registerService->registerUser($credentials);\n $this->assertInstanceOf(User::class, $user);\n $this->assertEquals($credentials['email'], $user->email);\n $this->assertEquals($credentials['name'], $user->name);\n\n }", "public function create_user()\n\t{\n\t\tif (!$this->ion_auth->logged_in())\n\t\t{\n\t\t\t// redirect them to the login page\n\t\t\tredirect('/admin/login', 'refresh');\n\t\t}\n\t\t$this->data['title'] = $this->lang->line('create_user_heading');\n\n\t\t//See the ion_auth config to check if allow_user_registration is TRUE\n\t\tif( ! $this->config->item('allow_user_registration', 'ion_auth')){\n\n\t\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n\t\t\t{\n\t\t\t\tredirect('/admin', 'refresh');\n\t\t\t}\n\n\t\t}\n\n\n\t\t$tables = $this->config->item('tables', 'ion_auth');\n\t\t$identity_column = $this->config->item('identity', 'ion_auth');\n\t\t$this->data['identity_column'] = $identity_column;\n\n\t\t// validate form input\n\t\t$this->form_validation->set_rules('first_name', $this->lang->line('create_user_validation_fname_label'), 'trim|required');\n\t\t$this->form_validation->set_rules('last_name', $this->lang->line('create_user_validation_lname_label'), 'trim|required');\n\t\tif ($identity_column !== 'email')\n\t\t{\n\t\t\t$this->form_validation->set_rules('identity', $this->lang->line('create_user_validation_identity_label'), 'trim|required|is_unique[' . $tables['users'] . '.' . $identity_column . ']');\n\t\t\t$this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'trim|required|valid_email');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'trim|required|valid_email|is_unique[' . $tables['users'] . '.email]');\n\t\t}\n\t\t$this->form_validation->set_rules('phone', $this->lang->line('create_user_validation_phone_label'), 'trim');\n\t\t$this->form_validation->set_rules('company', $this->lang->line('create_user_validation_company_label'), 'trim');\n\t\t$this->form_validation->set_rules('password', $this->lang->line('create_user_validation_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[password_confirm]');\n\t\t$this->form_validation->set_rules('password_confirm', $this->lang->line('create_user_validation_password_confirm_label'), 'required');\n\n\t\tif ($this->form_validation->run() === TRUE)\n\t\t{\n\t\t\t$email = strtolower($this->input->post('email'));\n\t\t\t$identity = ($identity_column === 'email') ? $email : $this->input->post('identity');\n\t\t\t$password = $this->input->post('password');\n\n\t\t\t$additional_data = array(\n\t\t\t\t'first_name' => $this->input->post('first_name'),\n\t\t\t\t'last_name' => $this->input->post('last_name'),\n\t\t\t\t'company' => $this->input->post('company'),\n\t\t\t\t'phone' => $this->input->post('phone'),\n\t\t\t);\n\t\t}\n\t\tif ($this->form_validation->run() === TRUE && $this->ion_auth->register($identity, $password, $email, $additional_data))\n\t\t{\n\t\t\t// check to see if we are creating the user\n\t\t\t// redirect them back to the admin page\n\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\t\tredirect(\"auth\", 'refresh');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// display the create user form\n\t\t\t// set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n\t\t\t$this->data['first_name'] = array(\n\t\t\t\t'name' => 'first_name',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'first_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('first_name'),\n\t\t\t);\n\t\t\t$this->data['last_name'] = array(\n\t\t\t\t'name' => 'last_name',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'last_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('last_name'),\n\t\t\t);\n\t\t\t$this->data['identity'] = array(\n\t\t\t\t'name' => 'identity',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'identity',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('identity'),\n\t\t\t);\n\t\t\t$this->data['email'] = array(\n\t\t\t\t'name' => 'email',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'email',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('email'),\n\t\t\t);\n\t\t\t$this->data['company'] = array(\n\t\t\t\t'name' => 'company',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'company',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('company'),\n\t\t\t);\n\t\t\t$this->data['phone'] = array(\n\t\t\t\t'name' => 'phone',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'phone',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('phone'),\n\t\t\t);\n\t\t\t$this->data['password'] = array(\n\t\t\t\t'name' => 'password',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'password',\n\t\t\t\t'type' => 'password',\n\t\t\t\t'value' => $this->form_validation->set_value('password'),\n\t\t\t);\n\t\t\t$this->data['password_confirm'] = array(\n\t\t\t\t'name' => 'password_confirm',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'password_confirm',\n\t\t\t\t'type' => 'password',\n\t\t\t\t'value' => $this->form_validation->set_value('password_confirm'),\n\t\t\t);\n\n\n\t\t\t$this->load->view('templates/header',$this->data);\n\t\t\t$this->load->view('/admin/create_user');\n\t\t\t$this->load->view('templates/footer');\n\t\t}\n\t}", "public function signupUser()\n { \n $user = User::findByUserEmail($this->email);\n if($user == null) { \n $user = new User();\n $user->user_full_name = $this->username;\n if(!empty($this->phone)) {\n $user->phone_number = $this->phone;\n }\n if(!empty($this->email)) { \n $user->email = $this->email;\n }\n $user->password_hash = md5($this->password);\n $user->login_method = 'email';\n $user->save();\n } \n return $user;\n }", "protected function _createUser() {\n\t\t$user = System_Locator_TableLocator::getInstance()->get('User')->createRow();\n\t\t$user->username = $this->getUsername();\n\t\t$user->setPassword($this->getPassword());\n\t\t$user->email = $this->getEmail();\n\t\t$user->countryCode = $this->getCountryCode();\n\t\t$user->createdAt = date(DATE_ISO8601); \n\t\treturn $user;\n\t}", "public function registration(UserCreateRequest $request)\n {\n $credentials = request()->all(['phone', 'password']);\n\n if ($token = auth()->attempt($credentials)) {\n return $this->respondWithToken($token);\n }\n if (User::where('phone', $credentials['phone'])->count() > 0) {\n return response()->json([\n 'errors' => [\n 'wrong' => 'Already exist'\n ]\n ], 401);\n }\n\n $user = User::store($request->all());\n auth()->login($user);\n\n $token = auth()->attempt($credentials);\n return $this->respondWithToken($token);\n }", "public function postRegister()\n\t{\n\t\t$user = new \\User;\n\n\t\t$user->email = \\Input::get( 'email' );\n\t\t$user->password = \\Input::get( 'password' );\n\n\t\t// The password confirmation will be removed from model\n\t\t// before saving. This field will be used in Ardent's\n\t\t// auto validation.\n\t\t$user->password_confirmation = \\Input::get( 'password_confirmation' );\n\n\t\t// Save if valid. Password field will be hashed before save\n\t\t$user->save();\n\n\t\tif ( $user->id )\n\t\t{\n\t\t\t//Assign the company role to this person\n\t\t\t$roleId = \\Role::where('name', '=', 'Company')->first()->id;\n\t\t\t$user->attachRole($roleId);\n\n\t\t\t// Redirect with success message, You may replace \"Lang::get(...\" for your custom message.\n\t\t\treturn \\Redirect::action('controllers\\company\\AuthController@getLogin')\n\t\t\t\t->with( 'notice', \\Lang::get('confide::confide.alerts.account_created') );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Get validation errors (see Ardent package)\n\t\t\t$error = $user->errors()->all(':message');\n\n\t\t\treturn \\Redirect::action('controllers\\company\\AuthController@getRegister')\n\t\t\t\t->withInput(\\Input::except('password'))\n\t\t\t\t->with( 'error', $error );\n\n\t\t}\n\n\t}", "public function create()\n {\n $this->validate($this->request, User::createRules());\n\n $user = new User;\n $user->name = $this->request->name;\n $user->phone = $this->request->phone;\n $user->dob = $this->request->dob;\n $user->image = $this->request->image_path;\n $plainPassword = $this->request->password;\n $user->password = app('hash')->make($plainPassword);\n\n $user->save();\n\n //return successful response\n return $this->response(201,\"User\", $user);\n }", "public function store()\n {\n $attributes = request()->validate([\n 'name' => 'required|max:255',\n 'username' => 'required|unique:users,username',\n 'email' => 'required|email|max:255|unique:users,email',\n 'password' => 'required',\n ]);\n $user = User::create($attributes);\n\n // Auth facades\n auth()->login($user);\n }", "public function create()\n {\n // TODO: Algún parámetro para no permitir el registro.\n \n // Es ya un usuario?\n if (Core::isUser())\n {\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('') . '\\';');\n return;\n }\n \n // Tenemos datos?\n if ($this->request->is('email'))\n {\n // Validamos los datos\n $form = Core::getLib('form.validator');\n $form->setRules(Core::getService('account.signup')->getValidation());\n \n // Si no hay errores procedemos a capturar los datos.\n if ($form->validate())\n {\n // Agregamos usuario\n if (Core::getService('account.process')->add($this->request->getRequest()))\n {\n if (Core::getParam('user.verify_email_at_signup'))\n {\n // Vamos a que verifique su email\n Core::getLib('session')->set('email', $this->request->get('email'));\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.verify') . '\\';');\n }\n else\n {\n // Iniciamos sesión\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.login') . '\\';');\n }\n \n return;\n }\n }\n }\n \n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.signup') . '\\';');\n }", "public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'username'=> 'required|alpha_dash|min:3|unique:users,username',\n\t\t\t'display_name'=> 'required',\n\t\t\t'email'=>'email',\n\t\t\t'password'=> 'required',\n\t\t\t'repeat_password'=> 'required|same:password'\n\t\t);\t\n\n\t\t$validation= Validator::make(Input::all(), $rules);\n\n\t\tif ($validation ->fails()) {\n\t\t\treturn Redirect::to('register')\n\t\t\t\t->withErrors($validation)\n\t\t\t\t->withInput(Input::all());\n\t\t}\n\n\t\t$user = new User;\n\t\t$user->username = Input::get('username');\n\t\t$user->password = Hash::make(Input::get('password'));\n\t\t$user->display_name = Input::get('display_name');\n\t\t$user->email = Input::get('email');\n\t\t$user->role = 'user';\n\t\t$user->token = sha1(uniqid());\n\t\t$user->status = 'pending';\n\t\t$user->save();\n\n\t\treturn Redirect::to('/')\n\t\t\t->with('message','User Created, Waiting for Approval');\n\t}", "public function writeNewUser () {\n if (! $this->Writeable()){\n throw new Exception('User object is not writeable, cannot write to DB');\n }\n\n if ($this->exists($this->loginId)) {\n throw new Exception('User already exists, cannot be created');\n }\n\n $i = new folksoDBinteract($this->dbc);\n if ($i->db_error()) {\n throw new Exception('DB connect error: ' . $i->error_info());\n }\n\n $i->sp_query(\n sprintf(\"call create_user(\"\n .\"'%s', '%s', '%s', '%s', '', %d, '%s', '%s', '%s')\",\n $i->dbescape($this->nick),\n $i->dbescape($this->firstName),\n $i->dbescape($this->lastName),\n $i->dbescape($this->email),\n $i->dbescape($this->loginId),\n $i->dbescape($this->institution),\n $i->dbescape($this->pays),\n $i->dbescape($this->fonction)));\n\n if ($i->result_status == 'DBERR') {\n throw new Exception('DB query error on create FB user: ' . $i->error_info());\n }\n }", "public function register()\n {\n if ($this->getIsNewRecord() == false) {\n throw new \\RuntimeException('Calling \"' . __CLASS__ . '::' . __METHOD__ . '\" on existing user');\n }\n\n if ($this->module->enableConfirmation == false) {\n $this->confirmed_at = time();\n }\n\n if ($this->module->enableGeneratingPassword) {\n $this->password = Password::generate(8);\n }\n\n $this->trigger(self::USER_REGISTER_INIT);\n\n if ($this->save(false)) {\n Yii::getLogger()->log($this->getErrors(), Logger::LEVEL_INFO);\n $this->trigger(self::USER_REGISTER_DONE);\n if ($this->module->enableConfirmation) {\n $token = \\Yii::createObject([\n 'class' => \\dektrium\\user\\models\\Token::className(),\n 'type' => \\dektrium\\user\\models\\Token::TYPE_CONFIRMATION,\n ]);\n $token->link('user', $this);\n $this->mailer->sendConfirmationMessage($this, $token);\n } else {\n \\Yii::$app->user->login($this);\n }\n if ($this->module->enableGeneratingPassword) {\n $this->mailer->sendWelcomeMessage($this);\n }\n \\Yii::$app->session->setFlash('info', $this->getFlashMessage());\n \\Yii::getLogger()->log('User has been registered', Logger::LEVEL_INFO);\n return true;\n }\n\n \\Yii::getLogger()->log('An error occurred while registering user account', Logger::LEVEL_ERROR);\n\n return false;\n }", "public function store(UserCreateRequest $request)\n {\n\t\t\t$user = User::create([\n\t\t\t\t'name' \t\t\t\t=> $request->input('name'),\n\t\t\t\t'lastname' \t\t=> $request->input('lastname'),\n\t\t\t\t'idNumber'\t\t=> $request->input('idNumber'),\n\t\t\t\t'email' \t\t\t=> $request->input('email'),\n\t\t\t\t'phone' \t\t\t=> $request->input('phone'),\n\t\t\t\t'address' \t\t=> $request->input('address'),\n\t\t\t\t'birthdate' \t=> $request->input('birthdate'),\n\t\t\t\t'category_id' => $request->input('category_id'),\n\t\t\t\t'password'\t\t=> 'password', // I NEED TO ADD LOGIN FUNCTIONALITY\n\t\t\t\t'is_admin'\t\t=> 0,\n\t\t\t\t'status' \t\t\t=> 'non live' // As default in the db?\n\t\t\t]);\n\n\t\t\treturn redirect('/users')->with('success', 'User Registered');\n }", "public function register()\n {\n $create_from = $this->request->get_body_params();\n\n $input = (object) array_intersect_key( $create_from,\n array_fill_keys(['username', 'password', 'email'], false)\n );\n\n $update = [\n 'first_name',\n 'last_name',\n ];\n\n /** @var \\WP_Error|integer $user */\n $user_id = \\wp_create_user($input->username, $input->password, $input->email);\n\n if (\\is_wp_error($user_id)) {\n throw new UnauthorizedException($user_id->get_error_message());\n }\n\n /** @var \\WP_User $user */\n $user = \\get_userdata($user_id);\n\n foreach ($update as $att) {\n $user->$att = $create_from[$att];\n }\n\n \\wp_update_user($user);\n\n return $this->response->ok([\n 'message' => sprintf(__('Hello %s', PMLD_TD), $user->nickname),\n 'user' => User::make($user),\n ]);\n\n }", "public function create(){\n\n $user = User::create($this->_cleaned);\n return $this->respond($user);\n }", "public function register() {\n \n $this->form_validation->set_rules('email', 'Email', 'required|valid_email');\n $this->form_validation->set_rules('password', 'Passwort', 'required');\n $this->form_validation->set_rules('dataprotection', 'Datenschutz', 'required');\n \n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n if (strtolower($this->input->post('dataprotection')) == 'true') {\n \t// TODO: save acceptance or acceptance date to db, i.e. hand over to model\n } else {\n \t$this->error(404, 'Dataprotection error');\n } \n \n $this->user_model->setValue('email', $this->input->post('email'));\n $this->user_model->setValue(\n \t'hashed_password', \n \tpassword_hash($this->input->post('password'), PASSWORD_DEFAULT));\n\n if (! $this->user_model->newUser()) {\n\t\t\t$this->error(409, 'Duplicate');\n }\n\n\t\t$this->sendConfirmationMail($this->input->post('email'));\n\t\t$data['msg'] = $this->input->post('email') . ' registered.';\n\t\t$this->responseWithCode(201, $data);\n }", "protected function create(array $data)\n {\n $company = Company::create([\n 'name' => $data['company'],\n 'referrer_id' => Session::pull(self::REFERRER_KEY),\n ]);\n\n $user = new User([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ]);\n\n $user->company()->associate($company);\n\n if (!$user->save()) {\n abort(500, 'User registration failure.');\n }\n\n return $user;\n }", "public function register( CreateUserRequest $request ) {\n // store the user in the database\n $credentials = $request->only( 'name', 'email', 'password');\n $credentials[ 'password' ] = bcrypt( $credentials[ 'password' ] );\n $user = User::create($credentials);\n\n // now wire up the provider account (e.g. facebook) to the user, if provided.\n if ( isset( $request['provider'] ) && isset( $request['provider_id'] ) && isset( $request['provider_token'] ) ) {\n $user->accounts()->save( new Account( [\n 'provider' => $request['provider'],\n 'provider_id' => $request['provider_id'],\n 'access_token' => $request['provider_token'],\n ] ) );\n }\n\n // return the JWT to the user\n $token = JWTAuth::fromUser( $user );\n return response( compact( 'token' ), 200 );\n }", "public function store() \n\t{\n\t\t$input = Input::all();\n\t\t$validation = $this->validator->on('create')->with($input);\n\n\t\tif ($validation->fails())\n\t\t{\n\t\t\treturn Redirect::to(handles(\"orchestra::users/create\"))\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->withErrors($validation);\n\t\t}\n\n\t\t$user = App::make('orchestra.user');\n\t\t$user->status = User::UNVERIFIED;\n\t\t$user->password = $input['password'];\n\n\t\t$this->saving($user, $input, 'create');\n\n\t\treturn Redirect::to(handles('orchestra::users'));\n\t}", "public function createUser(){\n $post = $this->_app->request->post();\n \n // Load the request schema\n $requestSchema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/user-create.json\");\n \n // Get the alert message stream\n $ms = $this->_app->alerts; \n \n // Access-controlled resource\n if (!$this->_app->user->checkAccess('create_account')){\n $ms->addMessageTranslated(\"danger\", \"ACCESS_DENIED\");\n $this->_app->halt(403);\n }\n\n // Set up Fortress to process the request\n $rf = new \\Fortress\\HTTPRequestFortress($ms, $requestSchema, $post); \n \n // Sanitize data\n $rf->sanitize();\n \n // Validate, and halt on validation errors.\n $error = !$rf->validate(true);\n \n // Get the filtered data\n $data = $rf->data(); \n \n // Remove csrf_token, password confirmation from object data\n $rf->removeFields(['csrf_token, passwordc']);\n \n // Perform desired data transformations on required fields. Is this a feature we could add to Fortress?\n $data['user_name'] = strtolower(trim($data['user_name']));\n $data['display_name'] = trim($data['display_name']);\n $data['email'] = strtolower(trim($data['email']));\n $data['active'] = 1;\n \n // Check if username or email already exists\n if (UserLoader::exists($data['user_name'], 'user_name')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_USERNAME_IN_USE\", $data);\n $error = true;\n }\n\n if (UserLoader::exists($data['email'], 'email')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_EMAIL_IN_USE\", $data);\n $error = true;\n }\n \n // Halt on any validation errors\n if ($error) {\n $this->_app->halt(400);\n }\n \n // Get default primary group (is_default = GROUP_DEFAULT_PRIMARY)\n $primaryGroup = GroupLoader::fetch(GROUP_DEFAULT_PRIMARY, \"is_default\");\n \n // Set default values if not specified or not authorized\n if (!isset($data['locale']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"locale\"]))\n $data['locale'] = $this->_app->site->default_locale;\n \n if (!isset($data['title']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"title\"])) {\n // Set default title for new users\n $data['title'] = $primaryGroup->new_user_title;\n }\n \n if (!isset($data['primary_group_id']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"primary_group_id\"])) {\n $data['primary_group_id'] = $primaryGroup->id;\n }\n \n // Set groups to default groups if not specified or not authorized to set groups\n if (!isset($data['groups']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"groups\"])) {\n $default_groups = GroupLoader::fetchAll(GROUP_DEFAULT, \"is_default\");\n $data['groups'] = [];\n foreach ($default_groups as $group_id => $group){\n $data['groups'][$group_id] = \"1\";\n }\n }\n \n // Hash password\n $data['password'] = Authentication::hashPassword($data['password']);\n \n // Create the user\n $user = new User($data);\n\n // Add user to groups, including selected primary group\n $user->addGroup($data['primary_group_id']);\n foreach ($data['groups'] as $group_id => $is_member) {\n if ($is_member == \"1\"){ \n $user->addGroup($group_id); \n }\n }\n \n // Store new user to database\n $user->store(); \n \n // Success message\n $ms->addMessageTranslated(\"success\", \"ACCOUNT_CREATION_COMPLETE\", $data);\n }", "private function generateUser()\n {\n \t$user=new User();\n \t$user->scenario = 'registration';\n \t$user->username=$this->user_name_prefix . '_' . time() . ++$this->userNameCounter;\n \t$user->email=time() . ++$this->emailCounter . $this->faker->unique()->email;\n \t$user->language = Yii::$app->language;\n \t$user->status = User::STATUS_ENABLED;\n \t$this->userId = $user->save(false) ? $user->id:false;\n \t$this->data[] = ['id'=>$user->id,'type'=>'user'];\n \treturn true;\n }", "private function registerNewUser()\n {\n if (empty($_POST['user_name'])) {\n $this->errors[] = \"Empty Username\";\n } elseif (empty($_POST['user_password_new']) || empty($_POST['user_password_repeat'])) {\n $this->errors[] = \"Empty Password\";\n } elseif ($_POST['user_password_new'] !== $_POST['user_password_repeat']) {\n $this->errors[] = \"Password and password repeat are not the same\";\n } elseif (strlen($_POST['user_password_new']) < 6) {\n $this->errors[] = \"Password has a minimum length of 6 characters\";\n } elseif (strlen($_POST['user_name']) > 64 || strlen($_POST['user_name']) < 2) {\n $this->errors[] = \"Username cannot be shorter than 2 or longer than 64 characters\";\n } elseif (!preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])) {\n $this->errors[] = \"Username does not fit the name scheme: only a-Z and numbers are allowed, 2 to 64 characters\";\n } elseif (empty($_POST['user_email'])) {\n $this->errors[] = \"Email cannot be empty\";\n } elseif (strlen($_POST['user_email']) > 64) {\n $this->errors[] = \"Email cannot be longer than 64 characters\";\n } elseif (!filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)) {\n $this->errors[] = \"Your email address is not in a valid email format\";\n } elseif (!empty($_POST['user_name'])\n && strlen($_POST['user_name']) <= 64\n && strlen($_POST['user_name']) >= 2\n && preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])\n && !empty($_POST['user_email'])\n && strlen($_POST['user_email']) <= 64\n && filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)\n && !empty($_POST['user_password_new'])\n && !empty($_POST['user_password_repeat'])\n && ($_POST['user_password_new'] === $_POST['user_password_repeat'])\n ) {\n // create a database connection\n $this->db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // change character set to utf8 and check it\n if (!$this->db_connection->set_charset(\"utf8\")) {\n $this->errors[] = $this->db_connection->error;\n }\n\n // if no connection errors (= working database connection)\n if (!$this->db_connection->connect_errno) {\n\n // escaping, additionally removing everything that could be (html/javascript-) code\n $user_name = $this->db_connection->real_escape_string(strip_tags($_POST['user_name'], ENT_QUOTES));\n $user_last = $this->db_connection->real_escape_string(strip_tags($_POST['user_last'], ENT_QUOTES));\n $user_email = $this->db_connection->real_escape_string(strip_tags($_POST['user_email'], ENT_QUOTES));\n\n $user_password = $_POST['user_password_new'];\n\n // crypt the user's password with PHP 5.5's password_hash() function, results in a 60 character\n // hash string. the PASSWORD_DEFAULT constant is defined by the PHP 5.5, or if you are using\n // PHP 5.3/5.4, by the password hashing compatibility library\n $user_password_hash = password_hash($user_password, PASSWORD_DEFAULT);\n\n // check if user or email address already exists\n $sql = \"SELECT * FROM users WHERE user_email = '\" . $user_email . \"';\";\n $query_check_user_name = $this->db_connection->query($sql);\n\n if ($query_check_user_name->num_rows == 1) {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, that username / email address is already taken. </div>\";\n } else {\n // write new user's data into database\n $sql = \"INSERT INTO users (user_name, user_last, user_password_hash, user_email)\n VALUES('\" . $user_name . \"', '\" . $user_last . \"', '\" . $user_password_hash . \"', '\" . $user_email . \"');\";\n $query_new_user_insert = $this->db_connection->query($sql);\n\n // if user has been added successfully\n if ($query_new_user_insert) {\n $this->messages[] = \"<div class='alert alert-success center' role='alert'> Your account has been created successfully. Please check your emails.</div>\";\n\n // Load username and datejoined for verifcation via email hashing\n $sql=\"SELECT `user_id`, `user_name`, `user_date_joined` FROM `users` WHERE `user_email` = '\" . $user_email . \"';\";\n $query_load_hash_verify = $this->db_connection->query($sql);\n\n // if loaded then include send email and display message\n if ( $query_load_hash_verify) {\n $result_row = $query_load_hash_verify -> fetch_object();\n $codeid = $result_row->user_id;\n $code2 = md5($result_row->user_name);\n $code3 = md5($result_row->user_date_joined);\n\n // created a hash of when the user joined split it into two parts\n $cuthashtime = substr($code3, 0, 4);\n $endhashtime = substr($code3, -4); \n\n $hashedname = $code2;\n $middlehashname = substr($hashedname, 0, 4);\n\n include 'Email.php';\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, but we couldn't send your email. Please contact support.</div>\";\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, your registration failed. Please go back and try again. </div>\";\n }\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, no database connection. </div>\";\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> An unknown error occurred. </div>\";\n }\n }", "public function registerViaRequest()\n {\n return User::create(array_merge([\n 'password' => bcrypt(input('password')),\n ], only('email', 'name', 'is_public')));\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'email' => $data['email'],\n 'role_id' => '3',\n 'status' => '0',\n 'territory' => $data['territory'],\n 'password' => bcrypt($data['password']),\n ]);\n $user->assignRole('client');\n try {\n EmailHelper::emailConfigChanges('user');\n Mail::send('emails.confirm-email', ['user' => $user, 'password' => false], function ($message) use ($user) {\n $message->from(config('mail.from.address'), config('mail.from.name'));\n $message->to($user->email);\n $message->bcc(config('site.bcc_users'));\n $message->subject(config('mail.from.name') . ': Verify your online account.');\n });\n } catch (\\Exception $e) {\n Log::info($e);\n }\n return $user;\n }", "public function store(CreateUserRequest $request)\n {\n\n // Try creating new user\n $newUser = User::createUserWithProfile($request->all());\n\n // Event new registered user\n event(new Registered($newUser));\n // Send user registered notification\n $newUser->sendUserRegisteredNotification();\n\n // Check if user need to verify email if not app will try to login the new user\n if (config('access.users.verify_email')) {\n // Send Email for Verification\n $newUser->sendEmailVerificationNotification();\n }\n\n return $newUser->sendResponse();\n }", "protected function create(array $data)\n {\n\n $user = User::create([\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'user_type' => $data['user_type'],\n 'active' => true,\n 'confirmed' => true,\n 'confirmation_code' => md5(uniqid(mt_rand(), true)),\n ]);\n\n // See if adding any additional permissions\n // if (! isset($data['permissions']) || ! count($data['permissions'])) {\n // $data['permissions'] = [];\n // }\n\n if ($user) {\n // User must have at least one role\n // if (! count($data['roles'])) {\n // throw new GeneralException(__('This User Needs atleast One Role'));\n // }\n\n // Add selected roles/permissions\n // $user->syncRoles($data['roles']);\n // $user->syncPermissions($data['permissions']);\n $user->assignRole('Organisation Superadmin');\n $user ->givePermissionTo('View Backend');\n\n //Send confirmation email if requested and account approval is off\n // if (isset($data['confirmation_email']) && $user->confirmed == 0 && ! config('access.users.requires_approval')) {\n // $user->notify(new UserNeedsConfirmation($user->confirmation_code));\n // }\n\n // event(new UserCreated($user));\n\n return $user;\n }\n\n }", "protected function create(array $data)\n {\n return User::create([\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'gender'=>$data['gender'],\n 'tel_mobile'=>$data['tel_mobile'],\n 'country_code'=>$data['country_code'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'activated' => !config('settings.send_activation_email')\n ]);\n }", "protected function createUser()\n {\n $this->question('Enter your details for the admin user.');\n\n $user = \\App\\User::create([\n 'name' => $this->ask('Name', 'Admin'),\n 'email' => $this->ask('Email address', 'noreply@'.str_replace(['http://', 'https://'], '', config('app.url'))),\n 'password' => Hash::make($this->ask('Password')),\n ]);\n \n $this->info(\"Admin user created successfully. You can log in with username {$user->email}\");\n }", "public function createBlankUser()\r\n {\r\n $user = CrugeFactory::get()->getICrugeStoredUserNewModel();\r\n if ($user != null) {\r\n // asegura que no falle al validar por terminos y condiciones\r\n $user->terminosYCondiciones = true;\r\n // asegura que no falle al validar por captcha\r\n //\tcruge\\models\\data\\CrugeStoredUser.php (bypassCaptcha y _getCaptchaRule)\r\n $user->bypassCaptcha = true;\r\n return $user;\r\n } else {\r\n return null;\r\n }\r\n }", "public function newUser($user)\n\t{\n\t\t$input = $user;\n\t\t$rules = array(\n\t\t\t'username' => 'required|alpha_num|max:25|unique:users',\n\t\t\t'password' => 'required|min:8|max:25|confirmed',\n\t\t\t'dob' => 'required|before:'.date('Y-m-d', strtotime('-13 years')),\n\t\t\t'gender' => 'required|in:M,F',\n\t\t\t'email' => 'required|email|unique:users',\n\t\t\t'location' => 'regex:/[a-zA-Z0-9 \\-_]*/',\n\t\t\t'wug_api' => 'required_with:location|alpha_num'\n\t\t);\n\n\t\t$validation = Validator::make($input, $rules);\n\n\t\tif ($validation->fails())\n\t\t{\n\t\t return $validation->messages();\n\t\t}\n\n\t\t$api = new Api();\n\t\t$key = $api->randomString(40);\n\n\t\t$loc_id = NULL;\n\n\t\tif(!empty($input['location'])) {\n\t\t\t$loc = new Location();\n\t\t\t$loc_id = $loc->insertGetId(array(\n\t\t\t\t'location' => $input['location'],\n\t\t\t\t'wug_api' => $input['wug_api'],\n\t\t\t));\n\t\t}\n\n\t\t$user = new User();\n\t\t$user->api_key = $key;\n\t\t$user->username = $input['username'];\n\t\t$user->password = Hash::make($input['password']);\n\t\t$user->dob = $input['dob'];\n\t\t$user->gender = $input['gender'];\n\t\t$user->location_id = $loc_id;\n\t\t$user->email = $input['email'];\n\n\t\t$user->save();\n\n\t\treturn true;\n\t}", "function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level', 16 => 'store_owner');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel, 16 => 1);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n }", "public function newAppUser()\n {\n $email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\n $name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n $role = filter_input(INPUT_POST, 'role', FILTER_SANITIZE_STRING);\n $status = filter_input(INPUT_POST, 'status', FILTER_SANITIZE_NUMBER_INT);\n\n $errorList = [];\n if (empty($email)) {\n $errorList[] = 'Vous devez saisir un email';\n }\n if (empty($name)) {\n $errorList[] = 'Vous devez saisir un nom';\n }\n if (empty($password)) {\n $errorList[] = 'Vous devez saisir un mot de passe';\n }\n if (empty($role)) {\n $errorList[] = 'Vous devez saisir un rôle';\n }\n\n if (empty($errorList)) {\n $user = new AppUser();\n $user->setEmail($email);\n $user->setName($name);\n $user->setPassword($password);\n $user->setRole($role);\n $user->setStatus($status);\n\n $inserted = $user->create();\n\n if ($inserted) {\n global $router;\n header('Location: ' . $router->generate('appusers-list'));\n return;\n } else {\n $errorList[] = 'L\\'insertion des données s\\'est mal passée';\n }\n }\n\n if (!empty($errorList)) {\n $user = new AppUser();\n $user->setEmail($email);\n $user->setName($name);\n $user->setPassword($password);\n $user->setRole($role);\n $user->setStatus($status);\n\n $this->show('users/add', [\n 'errorList' => $errorList,\n 'user' => $user\n ]);\n }\n }", "public function create(UserCreateRequest $request): User\n {\n // TODO: Implement create() method.\n }", "public function execute(array $data) : User\n {\n $data['password'] = Hash::make($data['password']);\n\n //We will create activation code to be used for Email Confirmation\n $data['activation_token'] = QioskApp::createToken('email');\n\n //Now we create the user by adding it to our database\n $user = $this->User::create($data);\n\n //throws an exception if user hasnt yet created\n if (!$user) {\n throw new CustomException('Registration falied!', 500);\n }\n\n //dispatch an event to send confirmation email and log user creation\n event(new $this->signedUpEvent($user));\n\n return $user;\n }", "public function createRegister(){\n\t\t$userRepo = new UserRepository(App::getInstance());\n\n\t\t//check if user exists first. Search user by email.\n\t\t$user = $userRepo->getUserByEmail($_POST['email']);\n\t\tif($user!=null){\n\t\t\t//Error Message\n\t\t\treturn view('newRegForm')->with('error', true);\n\t\t}\n\n\t\telse{\n\t\t\t//Creates a new user and then returns ALL the registers to the view\n\t\t\t$user = new User($_POST);\n\t\t\t$user = $userRepo->create($user);\n\t\t\t$user = $userRepo->selectAll();\n\n\t\t\treturn view('viewRegisters')->with(['users'=>$user,'error'=>false]);\n\t\t}\n\t}", "public function registerAction(Request $request){\n //for the view\n $params = array(\"title\" => _(\"Sign up\"), \"errors\" => array());\n\n $params['username'] = \"\";\n $params['email'] = \"\";\n\n //handle register form\n if ($request->isMethod('post')){\n\n $username = $request->input('username');\n $params['username'] = $username;\n $email = $request->input('email');\n $params['email'] = $email;\n $password = $request->input('password');\n $password_bis = $request->input('password_bis');\n\n //validation\n $validator = new CustomValidator();\n\n $validator->validateUsername($username);\n $validator->validateUniqueUsername($username);\n $validator->validateEmail($email);\n $validator->validateUniqueEmail($email);\n $validator->validatePassword($password);\n $validator->validatePasswordBis($password_bis, $password);\n\n if ($validator->isValid()){\n //hydrate user obj\n $securityHelper = new SH();\n $user = new User();\n \n $user->setNewUuid();\n $user->setUsername( $username );\n $user->setEmail( $email );\n $user->setEmailValidated(false);\n $user->setRole( \"user\" );\n $user->setSalt( SH::randomString() );\n $user->setToken( SH::randomString() );\n $user->setSiteLanguage( 'en' );\n $user->setActive( true );\n\n $hashedPassword = $securityHelper->hashPassword( $password, $user->getSalt() );\n \n $user->setPassword( $hashedPassword );\n// $user->setIpAtRegistration( $_SERVER['REMOTE_ADDR'] );\n $user->setIpAtRegistration($request->ip());\n $user->setDateCreated( time() );\n $user->setDateModified( time() );\n\n //save it\n $userManager = new UserManager();\n $userManager->save($user);\n// @TODO: MAILER\n// send email confirmation message\n// $mailer = new Mailer();\n//\n// $mailerResult = $mailer->sendRegistrationConfirmation($user);\n\n //log user in right now (will redirect home)\n $this->logUser($request, $user);\n// $this->logUser($request, $user);\n $json = new JsonResponse();\n $json->setData(array(\"redirectTo\" => Route('graph')));\n $json->send();\n }\n //not valid\n else {\n $errors = $validator->getErrors();\n $params[\"errors\"] = $errors;\n return response()->json([\n 'error' => $errors\n ],400);\n }\n\n }\n return view('auth.register',['params'=> $params]);\n// $view = new View(\"register.php\", $params);\n// $view->setLayout(\"../View/layouts/modal.php\");\n// $view->send(true);\n }", "public function signup()\n {\n if ($this->validate()) {\n $user = new User();\n $user->username = $this->username;\n $user->first_name = $this->firstName;\n $user->last_name = $this->lastName;\n $user->email = $this->email;\n $user->setPassword($this->password);\n $user->generateAuthKey();\n $user->ip = Yii::$app->request->getUserIP();\n $user->ua = Yii::$app->request->getUserAgent();\n if ($user->save()) {\n $this->user = $user;\n $this->sendMail();\n return $user;\n }\n }\n\n return false;\n }", "protected function create(array $data)\n {\n $userData = Request::all();\n $confirmationCode = str_random(30);\n\n $fields = [\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ];\n if (config('auth.providers.users.field', 'email') === 'username' && isset($data['username'])) {\n $fields['username'] = $data['username'];\n }\n\n //return User::create($fields);\n //create user with role and permisssion\n $user = new User;\n $user->name = $userData['name'];\n $user->email = $userData['email'];\n $user->password = Hash::make($userData['password']);\n $user->confirmation_code = $confirmationCode;\n $user->save();\n\n //adding roles to a user\n $user->assignRole('user');\n //adding permissions to a user\n $user->givePermissionTo('edit not allowed');\n //user id $user->id\n //save userlocation info\n $this->SaveUserMeta($user->id, \"182.185.148.11\");\n //send verification email.\n $this->SendActivationEmail($confirmationCode);\n\n return $user;\n\n }", "public function creating(User $user)\n {\n if (empty($user->login)) {\n $user->login = $user->email;\n }\n\n if (null === $user->my_id || empty($user->my_id)) {\n $user->my_id = generateMyId();\n }\n }", "public function registerUser() {\n $this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[5]|max_length[12]|is_unique[user.username]',\n array('min_length' => 'Username length has to be between 5 & 12 characters.',\n 'max_length' => 'Username length has to be between 5 & 12 characters.',\n 'is_unique' => 'Username is already in use.'));\n $this->form_validation->set_rules('password', 'Password', 'required|min_length[8]|max_length[16]|matches[confirmPassword]',\n array('min_length' => 'Password length has to be between 8 & 16 characters.',\n 'max_length' => 'Password length has to be between 8 & 16 characters.',\n 'matches' => 'Passwords do not match.'));\n $this->form_validation->set_rules('confirmPassword', 'Password Confirmation', 'required');\n $this->form_validation->set_rules('emailAddress', 'Email Address', 'trim|required|valid_email|is_unique[user.userEmail]',\n array('valid_email' => 'Email is not valid.',\n 'is_unique' => 'Email is already in use.'));\n\n if ($this->form_validation->run() == FALSE) {\n $this->registration();\n\n } else {\n $formUsername = $this->input->post('username');\n $formPassword = $this->input->post('password');\n $formEmailAddress = $this->input->post('emailAddress');\n $this->UserManager->registerUser($formUsername, $formPassword, $formEmailAddress);\n $this->login();\n }\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'email' => $data['registerEmail'],\n 'password' => bcrypt($data['registerPassword']),\n 'status' => 'active'\n ]);\n\n $user->profile()->create($data['profile']);\n $user->travelInformation()->create($data['travel']);\n\n return $user;\n }", "public function createUser()\n {\n $c = $this->getConnectionWithConfig('default');\n\n // First we create the record that we need to update\n $create = 'CREATE (u:User {name: $name, email: $email, username: $username})';\n // The bindings structure is a little weird, I know\n // but this is how they are collected internally\n // so bare with it =)\n $createCypher = $c->getCypherQuery($create, array(\n 'name' => $this->user['name'],\n 'email' => $this->user['email'],\n 'username' => $this->user['username'],\n ));\n\n return $this->client->run($createCypher['statement'], $createCypher['parameters']);\n }", "public function save(CreateUserRequest $request)\n {\n $this->authorize('create', User::class);\n\n $pass = $this->get_password($request);\n $user = User::create([\n 'name' => $request->input('name'),\n 'phone_number' => $request->input('phone_number'),\n 'email' => $request->input('email'),\n 'password' => bcrypt($pass),\n 'role_id' => $request->input('role_id', 3)\n ]);\n\n $user->notify(new AdminUserCreated($user, $pass));\n\n return redirect()->route('active_user', $user->id);\n }", "public function create(CreateUserRequest $request) {\n $user = $request->commit();\n\n //Trigger user edited event\n event(new UserCreated($user));\n\n //Reloads page\n return redirect()->action('Platform\\UserController@edit', $user)->with('alert', [\n 'type' => 'success',\n 'message' => 'User created'\n ]);\n }", "function register_user() {\n\t\tglobal $ID, $lang, $conf, $auth, $yubikey_associations;\n\n\t\tif(!$auth->canDo('addUser')) return false;\n\n\t\t$_POST['login'] = $_POST['nickname'];\n\n\t\t// clean username\n\t\t$_POST['login'] = preg_replace('/.*:/','',$_POST['login']);\n\t\t$_POST['login'] = cleanID($_POST['login']);\n\t\t// clean fullname and email\n\t\t$_POST['fullname'] = trim(preg_replace('/[\\x00-\\x1f:<>&%,;]+/','',$_POST['fullname']));\n\t\t$_POST['email'] = trim(preg_replace('/[\\x00-\\x1f:<>&%,;]+/','',$_POST['email']));\n\n\t\tif (empty($_POST['login']) || empty($_POST['fullname']) || empty($_POST['email'])) {\n\t\t\tmsg($lang['regmissing'], -1);\n\t\t\treturn false;\n\t\t} else if (!mail_isvalid($_POST['email'])) {\n\t\t\tmsg($lang['regbadmail'], -1);\n\t\t\treturn false;\n\t\t}\n\n\t\t// okay try to create the user\n\t\tif (!$auth->createUser($_POST['login'], auth_pwgen(), $_POST['fullname'], $_POST['email'])) {\n\t\t\tmsg($lang['reguexists'], -1);\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = $_POST['login'];\n\t\t$yubikey = $_SERVER['REMOTE_USER'];\n\n\t\t// if our yubikey id is based on a non-registered user, we need to chunk off the \"yubikey:\"\n\t\t// part of it\n\t\tif (preg_match('!^yubikey:!', $yubikey)) {\n\t\t\t$yubikey = substr($yubikey, 8);\n\t\t}\n\n\t\t// we update the YubiKey associations array\n\t\t$this->register_yubikey_association($user, $yubikey);\n\n\t\t$this->update_session($user);\n\n\t\t// account created, everything OK\n\t\t$this->_redirect(wl($ID));\n\t}", "public function store(UserCreateRequest $request): UserResource\n {\n /* Convert request to array */\n $data = $request->all();\n\n /* Hashing password */\n $data['password'] = bcrypt($request->input('password'));\n\n /* Store data to database */\n $user = User::create($data);\n\n /* Send Register email to the user */\n event(new Registered($user));\n\n activity(\"Admin\")\n ->on($user)\n ->withProperties([\n ['IP' => $request->ip()],\n ['user_data' => $request->all()],\n ])\n ->log('Store a user');\n\n return new UserResource($user->loadMissing('plans'));\n }" ]
[ "0.7750602", "0.7489929", "0.7474633", "0.7474633", "0.7474633", "0.7474633", "0.7418831", "0.7418831", "0.7361687", "0.73091877", "0.7290402", "0.7170887", "0.7153413", "0.71367514", "0.7130723", "0.7116712", "0.7107231", "0.7092155", "0.70859027", "0.7084165", "0.706826", "0.706826", "0.70554525", "0.7055291", "0.7033631", "0.7026784", "0.70149404", "0.70132315", "0.69851196", "0.6964616", "0.695086", "0.6941911", "0.6941205", "0.69300467", "0.6901686", "0.68745273", "0.6854613", "0.6849693", "0.68476766", "0.6847447", "0.6837731", "0.682097", "0.6814089", "0.6806235", "0.67993814", "0.67931235", "0.6783314", "0.6782719", "0.678171", "0.6778698", "0.67755586", "0.67709005", "0.67694837", "0.6768079", "0.6756934", "0.67446995", "0.67405665", "0.6738445", "0.673286", "0.67255026", "0.67174953", "0.671197", "0.66984844", "0.66933024", "0.6691878", "0.6691874", "0.669181", "0.66914505", "0.66904813", "0.66883856", "0.6682501", "0.66823685", "0.6680357", "0.66773355", "0.66739744", "0.6673674", "0.6671424", "0.6666521", "0.66582483", "0.6656376", "0.6650788", "0.66468096", "0.6645676", "0.66385514", "0.6634876", "0.6629156", "0.66243297", "0.66243136", "0.66239494", "0.66212934", "0.66176444", "0.6614809", "0.6607175", "0.6601911", "0.66013247", "0.65973485", "0.6595453", "0.65950507", "0.65944815", "0.6586079", "0.65689844" ]
0.0
-1
Creates the test suite object.
protected function createTestSuite($name) { return new PHPUnit_Framework_TestSuite($name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function suite()\n {\n return new \\PHPUnit_Framework_TestSuite( __CLASS__ );\n }", "public static function suite()\n {\n return new \\PHPUnit_Framework_TestSuite( __CLASS__ );\n }", "public static function suite()\n {\n $suite = new PHPUnit_Framework_TestSuite('UNL_UCBCN_Manager tests');\n /** Add testsuites, if there is. */\n $suite->addTestSuite('UNL_UCBCN_ManagerTest');\n $suite->addTestSuite('UNL_UCBCN_Manager_CreateEventTest');\n $suite->addTestSuite('UNL_UCBCN_Manager_EventActionsTest');\n return $suite;\n }", "static public function suite()\n {\n // Create an instance of a test suite\n $suite = new \\PHPUnit\\Framework\\TestSuite('Ztal');\n\n $suite->addTestSuite('Ztal\\Tests\\AutoloaderTests');\n $suite->addTestSuite('Ztal\\Tests\\Table\\Paginator\\PaginatorFirstPageOneTests');\n $suite->addTestSuite('Ztal\\Tests\\Table\\Paginator\\PaginatorFirstPageZeroTests');\n\n return $suite;\n }", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All PdfGenerator Tests');\n\n\t\t$path = App::pluginPath('PdfGenerator') . 'Test' . DS . 'Case' . DS;\n\t\t$suite->addTestDirectoryRecursive($path);\n\t\treturn $suite;\n\t}", "public static function suite() {\n\t\t$Suite = new CakeTestSuite('All Tools tests');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Lib');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Lib' . DS . 'Utility');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Lib' . DS . 'Misc');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'View');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'View' . DS . 'Helper');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Model');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Model' . DS . 'Behavior');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Model' . DS . 'Datasource');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Console' . DS . 'Command');\n\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Controller' . DS . 'Component');\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Controller' . DS . 'Component' . DS . 'Auth');\n\n\t\t//$path = dirname(__FILE__);\n\t\t//$Suite->addTestDirectory($path . DS . 'Controller');\n\n\t\t//$path = CakePlugin::path('Tools') . 'Test' . DS . 'Case' . DS;\n\t\t//$Suite->addTestDirectoryRecursive($path);\n\t\treturn $Suite;\n\t}", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All ArraySort Tests');\n\n\t\t$path = App::pluginPath('ArraySort') . 'Test' . DS . 'Case' . DS;\n\t\t$suite->addTestDirectoryRecursive($path);\n\t\treturn $suite;\n\t}", "public static function suite() {\n\t\t$Suite = new CakeTestSuite('All Model tests');\n\t\t$path = dirname(__FILE__);\n\t\t$Suite->addTestDirectory($path . DS . 'Model');\n\t\treturn $Suite;\n\t}", "public static function suite() {\n\t\t$suite = new CakeTestSuite('Feed Plugin All Tests');\n\n\t\t$path = dirname(__FILE__) . DS;\n\n\t\t$suite->addTestFile($path . 'FeedAllModelTest.php');\n\t\treturn $suite;\n\t}", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All Attempt Plugin Tests');\n\n\t\t$basePath = CakePlugin::path('Attempt') . 'Test' . DS . 'Case' . DS;\n\t\t// controllers\n\t\t$suite->addTestFile($basePath . 'Controller' . DS . 'Component' . DS . 'AttemptComponentTest.php');\n\t\t// models\n\t\t$suite->addTestFile($basePath . 'Model' . DS . 'AttemptTest.php');\n\n\t\treturn $suite;\n\t}", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All Indicadores Tests');\n\t\t$suite->addTestDirectoryRecursive(App::pluginPath('Indicadores') . 'Test' . DS . 'Case' . DS);\n\n\t\treturn $suite;\n\t}", "public static function suite() {\n\t\t$suite = new PHPUnit_Framework_TestSuite('All Users Plugin Tests');\n\n\t\t$basePath = CakePlugin::path('Users') . DS . 'Test' . DS . 'Case' . DS;\n\t\t// controllers\n\t\t$suite->addTestFile($basePath . 'Controller' . DS . 'UserDetailsControllerTest.php');\n\t\t$suite->addTestFile($basePath . 'Controller' . DS . 'UsersControllerTest.php');\n\n\t\t// models\n\t\t$suite->addTestFile($basePath . 'Model' . DS . 'UserDetailTest.php');\n\t\t$suite->addTestFile($basePath . 'Model' . DS . 'UserTest.php');\n\n\t\treturn $suite;\n\t}", "public static function suite() {\n\t\t$suite = new PHPUnit_Framework_TestSuite('All Postmark Plugin Tests');\n\n\t\t$basePath = CakePlugin::path('Postmark') . DS . 'Test' . DS . 'Case' . DS;\n\n\t\t$suite->addTestFile($basePath . 'Network' . DS . 'Email' . DS . 'PostmarkTransportTest.php');\n\t\t$suite->addTestFile($basePath . 'Controller' . DS . 'PostmarkAppControllerTest.php');\n\n\t\treturn $suite;\n\t}", "public function testCreateTestSuite()\n {\n Artisan::call('migrate');\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->visit('/library')\n ->seePageIs('/library')\n ->click('#newSuite')\n ->seePageIs('/library/testsuite/create')\n ->type('TestSuite1', 'name')\n ->type('someDescription', 'description')\n ->type('someGoals', 'goals')\n ->press('submit');\n\n $this->seeInDatabase('TestSuite', [\n 'Name' => 'TestSuite1',\n 'TestSuiteDocumentation' => 'someDescription',\n 'TestSuiteGoals' => 'someGoals'\n ]);\n }", "public static function suite() {\n\t\t$suite = new PHPUnit_Framework_TestSuite('MongoDB Plugin tests');\n $casePath = CakePlugin::path('Mongodb') . DS . 'Test' . DS . 'Case';\n\t\t$suite->addTestFile($casePath . DS . 'Behavior' . DS . 'SqlCompatibleTest.php');\n\t\t$suite->addTestFile($casePath . DS . 'Behavior' . DS . 'SubCollectionValidatorBehaviorTest.php');\n\t\t$suite->addTestFile($casePath . DS . 'Datasource' . DS . 'MongodbSourceTest.php');\n\t\t$suite->addTestFile($casePath . DS . 'Model' . DS . 'MongodbAssociationsTest.php');\n\t\t$suite->addTestFile($casePath . DS . 'Model' . DS . 'MongodbInheritanceModelTest.php');\n\t\treturn $suite;\n\t}", "private function initSuite(): void\n {\n $suiteNodes = $this->xml->xpath('/testsuites/testsuite/testsuite');\n $this->isSingle = count($suiteNodes) === 0;\n\n $node = $this->xml->xpath('/testsuites/testsuite');\n $node = current($node);\n\n if ($node !== false) {\n $this->suites[] = new TestSuite(\n (string) $node['name'],\n (int) $node['tests'],\n (int) $node['assertions'],\n (int) $node['failures'],\n (int) $node['errors'],\n (int) $node['warnings'],\n (int) $node['skipped'],\n (float) $node['time'],\n (string) $node['file']\n );\n } else {\n $this->suites[] = TestSuite::empty();\n }\n }", "public static function suite()\n {\n $suite = new PHPUnit_Framework_TestSuite('Module Tests');\n\n P4Cms_Module::setCoreModulesPath(APPLICATION_PATH);\n P4Cms_Module::addPackagesPath(MODULE_PATH);\n\n // save working directory.\n $cwd = getcwd();\n\n foreach (P4Cms_Module::fetchAll() as $module) {\n // detect and load phpunit.xml file.\n $configFile = $module->getPath() . '/tests/phpunit.xml';\n if (file_exists($configFile)) {\n chdir(dirname($configFile));\n $config = PHPUnit_Util_Configuration::getInstance($configFile);\n $config->handlePHPConfiguration();\n $suite->addTest($config->getTestSuiteConfiguration());\n continue;\n }\n \n // fallback - detect and load AllTests.php file.\n $suiteFile = $module->getPath() . '/tests/AllTests.php';\n if (file_exists($suiteFile)) {\n P4Cms_Loader::addPackagePath($module->getName(), $module->getPath());\n $testClassName = $module->getName().'_Test_AllTests';\n $suite->addTest($testClassName::suite());\n }\n\n }\n\n // restore working directory.\n chdir($cwd);\n\n return $suite;\n }", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All MultiColumnUniqueness tests');\n\n\t\t$path = dirname(__FILE__);\n\t\t$suite->addTestDirectory($path . DS . 'Model' . DS . 'Behavior');\n\n\t\treturn $suite;\n\t}", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All Plugin plugins test');\n\t\t$plugins = App::objects('plugin', APP . 'Plugin', false);\n\t\tforeach ($plugins as $plugin) {\n\t\t\tif (CakePlugin::loaded($plugin)) {\n\t\t\t\t$file = CakePlugin::path($plugin) . 'Test' . DS . 'Case' . DS . 'All' . $plugin . 'TestsTest.php';\n\t\t\t\tif (file_exists($file)) {\n\t\t\t\t\t$suite->addTestFile($file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $suite;\n\t}", "public static function suite() {\n\n\t\t$suite = new PHPUnit_Framework_TestSuite('All Collectionable plugin tests');\n\n\t\t$basePath = App::pluginPath('Collectionable') . 'Test' . DS . 'Case' . DS;\n\t\t$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basePath));\n\n\t\twhile ($it->valid()) {\n\n\t\t\tif (!$it->isDot()) {\n\t\t\t\t$file = $it->key();\n\t\t\t\tif (preg_match('|Test\\.php$|', $file) && $file !== __FILE__) {\n\t\t\t\t\t$suite->addTestFile($file);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$it->next();\n\t\t}\n\n\t\treturn $suite;\n\n\t}", "public function __construct() {\n\t\t$this->setName ( 'PHPUnitFixturesUnitSuite' );\n\t\t\n\t\t$this->addTestSuite ( 'DevelopmentHandlerTest' );\n\t\t$this->addTestSuite ( 'FixturesManagerTest' );\n\t\t$this->addTestSuite ( 'FixtureTest' );\n\t\t$this->addTestSuite ( 'PHPUnitFixturesDynamicDBTest' );\n\t\t$this->addTestSuite ( 'FixtureDBTest' );\n\t\t$this->addTestSuite ( 'ZendConfigSettingsTest' );\n\t}", "protected function createTests() :void\n {\n $directory = app_path('tests');\n\n Storage::makeDirectory($directory, true);\n PhpUnit::create('phpunit', app_path());\n }", "function suite($title, $fn=null) {\n $desc = new TestSuite($title, $fn);\n if (!$fn) {\n Util::set_default_filename_and_lineno($desc, debug_backtrace());\n }\n $desc->set_parent(Preview::$world->current());\n Preview::$world->push($desc);\n $desc->setup();\n Preview::$world->pop();\n return new TestAPI($desc);\n}", "public static function suite() {\n $suite = new xPDOTestHarness('xPDOHarness');\n $suite->addTest(xPDOSuite_AllTests::suite());\n\n return $suite;\n }", "public static function suite()\n {\n $suite = new PHPUnit_Framework_TestSuite('PHP CodeSniffer Standards');\n $baseDir = pathinfo(getcwd().\"/Ongr\", PATHINFO_DIRNAME);\n\n \\PHP_CodeSniffer::setConfigData('installed_paths', $baseDir);\n $path = pathinfo(\\PHP_CodeSniffer::getInstalledStandardPath('Ongr'), PATHINFO_DIRNAME);\n $testsDir = $path . DIRECTORY_SEPARATOR . 'Tests' . DIRECTORY_SEPARATOR . 'Unit';\n\n $directoryIterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($testsDir));\n\n /** @var \\SplFileInfo $fileinfo */\n foreach ($directoryIterator as $file) {\n // Skip hidden and extension must be php.\n if ($file->getFilename()[0] === '.' || pathinfo($file, PATHINFO_EXTENSION) !== 'php') {\n continue;\n }\n\n $className = str_replace(\n [$baseDir . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR],\n ['', '\\\\'],\n substr($file, 0, -4)\n );\n\n $suite->addTest(new $className('getErrorList'));\n }\n\n return $suite;\n }", "public static function suite()\n {\n $GLOBALS['PHP_CODESNIFFER_STANDARD_DIRS'] = [];\n $GLOBALS['PHP_CODESNIFFER_TEST_DIRS'] = [];\n\n // Use a special PHP_CodeSniffer test suite so that we can\n // unset our autoload function after the run.\n $suite = new TestSuite('Mito Coding Standards');\n\n $suite->addTest(AllSniffs::suite());\n\n return $suite;\n\n }", "public function __construct()\n\t{\n\t\t$this->setName('AllTests');\n\t\t\n\t\t// Tests for util package\n\t\t$this->addTestSuite('VarProfileTest');\n\t\t\n\t\t// Tests for shop package\n\t\t$this->addTestSuite('ProductTest');\n\t\t$this->addTestSuite('ProductEntryTest');\n\t\t$this->addTestSuite('ShoppingCartTest');\n\t}", "public static function suite()\n {\n // Catch strict standards\n error_reporting(E_ALL);\n\n // Set up autoload\n $basedir = dirname(__FILE__);\n $GLOBALS['__autoloader']->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix('/^Ingo(?:$|_)/', $basedir . '/../'));\n\n $suite = new PHPUnit_Framework_TestSuite('Ingo');\n $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');\n\n foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {\n if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {\n $pathname = $file->getPathname();\n require $pathname;\n\n $class = str_replace(DIRECTORY_SEPARATOR, '_',\n preg_replace(\"/^$baseregexp(.*)\\.php/\", '\\\\1', $pathname));\n $suite->addTestSuite('Ingo_' . $class);\n }\n }\n\n return $suite;\n }", "public static function suite()\n {\n // Use a special PHP_CodeSniffer test suite so that we can\n // unset our autoload function after the run.\n $suite = new TestSuite('PHP CodeSniffer');\n $suite->addTest(AllSniffs::suite());\n // Unregister this here because the PEAR tester loads\n // all package suites before running then, so our autoloader\n // will cause problems for the packages included after us.\n spl_autoload_unregister(['PHP_CodeSniffer', 'autoload']);\n\n return $suite;\n }", "protected function createTests()\n {\n $name = $this->getNameInput();\n\n $this->call('make:test', [\n 'name' => \"Api/{$name}/Store{$name}Test\",\n '--model' => $name,\n '--type' => 'store',\n ]);\n\n $this->call('make:test', [\n 'name' => \"Api/{$name}/Update{$name}Test\",\n '--model' => $name,\n '--type' => 'update',\n ]);\n\n $this->call('make:test', [\n 'name' => \"Api/{$name}/View{$name}Test\",\n '--model' => $name,\n '--type' => 'view',\n ]);\n\n $this->call('make:test', [\n 'name' => \"Api/{$name}/Delete{$name}Test\",\n '--model' => $name,\n '--type' => 'delete',\n ]);\n }", "public static function suite()\n {\n $suite = new PHPUnit_Framework_TestSuite('NP - NP_Service_Gravatar');\n\n $suite->addTest(NP_Service_Gravatar_Profiles_AllTests::suite());\n $suite->addTestSuite(NP_Service_Gravatar_Profiles_XmlRpcTest);\n\n return $suite;\n }", "public function __construct ()\n {\n $this->setName(__CLASS__);\n $this->addTestSuite('Auth_ManualTest');\n $this->addTestSuite('Auth_DBTest');\n }", "static public function suite() {\n return Dev_Unit::load_with_prefix('Test.Templates.HTML.Forms.', 'Case');\n }", "public function buildEnvironment(Suite $suite);", "public function __construct ()\n {\n $this->setName(__CLASS__);\n $this->addTestSuite('Q\\DB_MySQL_SQLSplitterTest');\n $this->addTestSuite('Q\\DB_MySQL_BasicTest');\n $this->addTestSuite('Q\\DB_MySQL_AdvancedTest');\n }", "function addTestSuite(&$tsuiteMgr,&$argsObj,$container,&$hash)\r\n{\r\n $new_order = null;\r\n\r\n // compute order\r\n //\r\n // $nt2exclude=array('testplan' => 'exclude_me','requirement_spec'=> 'exclude_me','requirement'=> 'exclude_me');\r\n // $siblings = $tsuiteMgr->tree_manager->get_children($argsObj->containerID,$nt2exclude);\r\n // if( !is_null($siblings) )\r\n //{\r\n // $dummy = end($siblings);\r\n // $new_order = $dummy['node_order']+1;\r\n //}\r\n $ret = $tsuiteMgr->create($argsObj->containerID,$container['container_name'],\r\n $container['details'],\r\n $new_order,config_get('check_names_for_duplicates'),'block');\r\n \r\n $op['messages']= array('msg' => $ret['msg'], 'user_feedback' => '');\r\n $op['status']=$ret['status_ok'];\r\n\r\n if($ret['status_ok'])\r\n {\r\n $op['messages']['user_feedback'] = lang_get('testsuite_created');\r\n if($op['messages']['msg'] != 'ok')\r\n {\r\n $op['messages']['user_feedback'] = $op['messages']['msg'];\r\n }\r\n\r\n if(trim($argsObj->assigned_keyword_list) != \"\")\r\n {\r\n $tsuiteMgr->addKeywords($ret['id'],explode(\",\",$argsObj->assigned_keyword_list));\r\n }\r\n writeCustomFieldsToDB($tsuiteMgr->db,$argsObj->tprojectID,$ret['id'],$hash);\r\n }\r\n return $op;\r\n}", "public function startTestSuite(\\PHPUnit_Framework_TestSuite $suite)\n\t{\n\t\t\n\t}", "static function main() {\n $suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n PHPUnit_TextUI_TestRunner::run( $suite);\n }", "static function main() {\n $suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n PHPUnit_TextUI_TestRunner::run( $suite);\n }", "public function setSuite()\n {\n $this->_suite = true;\n }", "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite(__CLASS__);\n\t\t$result = PHPUnit_TextUI_TestRunner::run($suite);\n\t}", "public static function suite() : TestSuite {\n\t\t$GLOBALS['PHP_CODESNIFFER_SNIFF_CODES'] = [];\n\t\t$GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES'] = [];\n\t\t$GLOBALS['PHP_CODESNIFFER_SNIFF_CASE_FILES'] = [];\n\n\t\t$suite = new TestSuite( static::STANDARD . ' Standards' );\n\n\t\t$standards_dir = dirname( __DIR__, 2 ) . '/src';\n\t\t$all_details = Standards::getInstalledStandardDetails( false, $standards_dir );\n\t\t$details = $all_details[ static::STANDARD ];\n\n\t\tAutoload::addSearchPath( $details['path'], $details['namespace'] );\n\t\tAutoload::addSearchPath( $details['path'], $details['namespace'] );\n\n\t\t$test_dir = __DIR__ . '/tests/' . static::STANDARD . '/Tests/';\n\t\tif ( false === is_dir( $test_dir ) ) {\n\t\t\t// No tests for this standard.\n\t\t\treturn $suite;\n\t\t}\n\n\t\t$di = new RecursiveIteratorIterator(\n\t\t\tnew RecursiveDirectoryIterator( $test_dir, FilesystemIterator::SKIP_DOTS )\n\t\t);\n\n\t\tforeach ( $di as $file ) {\n\t\t\t$filename = $file->getFilename();\n\n\t\t\t// Skip hidden files.\n\t\t\tif ( 0 === strpos( $filename, '.' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Tests must end with \"Test.php\".\n\t\t\tif ( substr( $filename, - 1 * strlen( static::TEST_SUFFIX ) ) !== static::TEST_SUFFIX ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$className = Autoload::loadFile( $file->getPathname() );\n\t\t\t$GLOBALS['PHP_CODESNIFFER_STANDARD_DIRS'][ $className ] = $details['path'];\n\t\t\t$GLOBALS['PHP_CODESNIFFER_TEST_DIRS'][ $className ] = $test_dir;\n\t\t\t$suite->addTestSuite( $className );\n\t\t}\n\n\t\treturn $suite;\n\t}", "function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite(__CLASS__);\n\t\t$result = PHPUnit_TextUI_TestRunner::run($suite);\n\t}", "public function setUp() {\n $this->temp= new Folder(\\lang\\System::tempDir());\n $this->spec= new GlueSpec();\n }", "protected function createFeatureTest()\n {\n $model_name = Str::studly(class_basename($this->argument('name')));\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:test', [\n 'name' => \"{$model_name}Test\",\n ]);\n\n $path = base_path() . \"/tests/Feature/{$model_name}Test.php\";\n $this->cleanupDummy($path, $name);\n }", "public function run()\n {\n $projectNum = Project::count();\n $faker = Faker::create();\n $project_limit=require('Config.php');\n for($i=1;$i<=$projectNum;$i++)\n {\n if($i%200 ==0)\n $this->command->info('Test Suite Seed :'.$i.' out of: '.$projectNum);\n $TestsTestArch = DB::table('project_assignments')->select('user_id','role_id')->\n where([['project_id','=',$i]])->\n whereIn('role_id',[7,8,9])->get();\n //let's say Tester, Test Lead and Test Architect together create around 20-40 folder per projects\n $numberOfTestSuites = rand($project_limit['projects']['min_test_suite'],$project_limit['projects']['max_test_suite']);\n for($j=0;$j<$numberOfTestSuites;++$j)\n {\n TestSuite::create(array(\n 'project_id'=>$i,\n 'name'=>$faker->sentence(4),\n //let's say only 90% of Test Suite have description\n 'description'=>rand(0,100)<80?$faker->paragraph(6):null,\n 'creator_id'=>$faker->randomElement($TestsTestArch)->user_id\n ));\n }\n }\n }", "function junit_init()\n{\n global $workerID;\n $JUNIT = getenv('TEST_PHP_JUNIT');\n if (empty($JUNIT)) {\n $GLOBALS['JUNIT'] = false;\n return;\n }\n if ($workerID) {\n $fp = null;\n } else if (!$fp = fopen($JUNIT, 'w')) {\n error(\"Failed to open $JUNIT for writing.\");\n }\n $GLOBALS['JUNIT'] = array(\n 'fp' => $fp,\n 'name' => 'PHP',\n 'test_total' => 0,\n 'test_pass' => 0,\n 'test_fail' => 0,\n 'test_error' => 0,\n 'test_skip' => 0,\n 'test_warn' => 0,\n 'execution_time' => 0,\n 'suites' => array(),\n 'files' => array()\n );\n}", "public static function main() {\n\t\tTestRunner::run( self::suite() );\n\t}", "protected function _initTest(){\n }", "protected function setUp(): void {\n require_once '../report.php';\n $this->object = new app();\n }", "abstract protected function constructTestHelper();", "public function setUp()\n {\n $this->CT = new CommandTester();\n $this->CT->add(new UtilityTask);\n }", "public static function setUpBeforeClass(){\n printf(\"*********** TESTING CREATE SWAPP SERVICE **********\");\n }", "protected function setUp()\n {\n $this->object = new SmartyWrapper(new UnitTestPWECore());\n $this->object->addTemplateDir('.');\n }", "public static function main()\n {\n $suite = new TestSuite(__CLASS__);\n $result = (new resources_Runner())->run($suite);\n }", "public static function main()\n {\n $suite = new TestSuite(\"Zend_Form_Decorator_ViewHelperTest\");\n $result = (new resources_Runner())->run($suite);\n }", "public static function main()\n\t{\n\t\trequire_once \"PHPUnit/TextUI/TestRunner.php\";\n\n\t\t$suite = new PHPUnit_Framework_TestSuite(\"EssentialsTest\");\n\t\t$result = PHPUnit_TextUI_TestRunner::run($suite);\n\t}", "function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// i18n needs to be set to the defaults or tests fail\n\t\ti18n::set_locale(i18n::default_locale());\n\t\ti18n::set_date_format(null);\n\t\ti18n::set_time_format(null);\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\t\t\n\t\tif(class_exists('RootURLController')) RootURLController::reset();\n\t\tif(class_exists('Translatable')) Translatable::reset();\n\t\tVersioned::reset();\n\t\tDataObject::reset();\n\t\tif(class_exists('SiteTree')) SiteTree::reset();\n\t\tHierarchy::reset();\n\t\tif(Controller::has_curr()) Controller::curr()->setSession(new Session(array()));\n\t\t\n\t\t$this->originalTheme = SSViewer::current_theme();\n\t\t\n\t\tif(class_exists('SiteTree')) {\n\t\t\t// Save nested_urls state, so we can restore it later\n\t\t\t$this->originalNestedURLsState = SiteTree::nested_urls();\n\t\t}\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\n\t\t// Set up fixture\n\t\tif($fixtureFile || $this->usesDatabase || !self::using_temp_db()) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(), 0, strlen($prefix) + 5) != strtolower(sprintf('%stmpdb', $prefix))) {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\tsingleton('DataObject')->flushCache();\n\t\t\t\n\t\t\tself::empty_temp_db();\n\t\t\t\n\t\t\tforeach($this->requireDefaultRecordsFrom as $className) {\n\t\t\t\t$instance = singleton($className);\n\t\t\t\tif (method_exists($instance, 'requireDefaultRecords')) $instance->requireDefaultRecords();\n\t\t\t\tif (method_exists($instance, 'augmentDefaultRecords')) $instance->augmentDefaultRecords();\n\t\t\t}\n\n\t\t\tif($fixtureFile) {\n\t\t\t\t$pathForClass = $this->getCurrentAbsolutePath();\n\t\t\t\t$fixtureFiles = (is_array($fixtureFile)) ? $fixtureFile : array($fixtureFile);\n\n\t\t\t\t$i = 0;\n\t\t\t\tforeach($fixtureFiles as $fixtureFilePath) {\n\t\t\t\t\t// Support fixture paths relative to the test class, rather than relative to webroot\n\t\t\t\t\t// String checking is faster than file_exists() calls.\n\t\t\t\t\t$isRelativeToFile = (strpos('/', $fixtureFilePath) === false || preg_match('/^\\.\\./', $fixtureFilePath));\n\t\t\t\t\tif($isRelativeToFile) {\n\t\t\t\t\t\t$resolvedPath = realpath($pathForClass . '/' . $fixtureFilePath);\n\t\t\t\t\t\tif($resolvedPath) $fixtureFilePath = $resolvedPath;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$fixture = new YamlFixture($fixtureFilePath);\n\t\t\t\t\t$fixture->saveIntoDatabase();\n\t\t\t\t\t$this->fixtures[] = $fixture;\n\n\t\t\t\t\t// backwards compatibility: Load first fixture into $this->fixture\n\t\t\t\t\tif($i == 0) $this->fixture = $fixture;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->logInWithPermission(\"ADMIN\");\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t\tEmail::send_all_emails_to(null);\n\t\t\n\t\t// Preserve memory settings\n\t\t$this->originalMemoryLimit = ini_get('memory_limit');\n\t}", "static function setup() {\n\n $zfRoot = realpath(dirname(basename(__FILE__)) . '/../lib/');\n \n $compassRoot = realpath(dirname(basename(__FILE__)) . '/..');\n\n TestConfiguration::$compassRoot = $compassRoot;\n TestConfiguration::$zfRoot = $zfRoot;\n \n require_once 'PHPUnit/Framework.php';\n require_once 'PHPUnit/Framework/TestSuite.php';\n require_once 'PHPUnit/TextUI/TestRunner.php';\n \n error_reporting( E_ALL | E_STRICT );\n \n set_include_path($compassRoot . '/application/models/'\n . PATH_SEPARATOR . $zfRoot\n . PATH_SEPARATOR . get_include_path()\n );\n \n include 'Zend/Loader.php';\n Zend_Loader::registerAutoload();\n \n // load configuration\n $section = 'test';\n $config = new Zend_Config_Ini($compassRoot .'/application/config.ini', $section);\n Zend_Registry::set('config', $config);\n \n date_default_timezone_set($config->date_default_timezone);\n \n // set up database\n $db = Zend_Db::factory($config->database);\n Zend_Db_Table::setDefaultAdapter($db);\n Zend_Registry::set('db', $db); \n }", "public static function main()\n {\n $suite = new PHPUnit_Framework_TestSuite('Tine 2.0 ActiveSync Backend SyncState Tests');\n PHPUnit_TextUI_TestRunner::run($suite);\n }", "public function suite($name, callable $configureSuite = null) {\n $suite = new GenericTestSuite($name, $this->getName(), new \\Exception());\n\n if ($configureSuite) {\n $configureSuite($suite);\n }\n return $this->add($suite);\n }", "protected function setUp() {\n\t\tob_start ();\n\t\t$this->object = new groupe_forks ( false, 'TESTS groupe_forks' );\n\t\t$this->object->setListeOptions($this->getListeOption());\n\t/********************************************/\n\t\t/* CLASS IMPOSSIBLE EN TESTS UNITAIRES */\n\t/********************************************/\n\t}", "protected function createDefaultTests() :void\n {\n $target = app_path('Resources/Default/Tests');\n $directory = app_path('tests/Default');\n\n Storage::makeDirectory($directory, true);\n ResourceTest::create('Default', $directory, ['response' => '$this->app->version()'])->link($target);\n }", "public function setUp()\n {\n $this->dependencies = [\n ['dbengine' => 'sqlite', 'path' => ':memory:']\n ];\n\n $this->reflection = new ReflectionClass(DatabaseService::class);\n $this->testObject = $this->reflection->newInstanceArgs($this->dependencies);\n }", "function __construct() {\r\n\t\tparent::__construct();\r\n\t\tmakeTestDB('temp1');\r\n\t}", "protected function newDatabaseTester()\n {\n return new Enlight_Components_Test_Database_DefaultTester();\n }", "public function setUp()\n {\n\n $this->XMLtools = GeneralUtility::makeInstance(XmlTools::class);\n }", "public static function run() {\n\t\t$dispatcher = new HHVMTestSuiteDispatcher();\n\t\t$dispatcher->dispatch();\n\t}", "protected function setUp()\n\t{\n\t\t$this->instance = new GteCompare('flower', 'sakura');\n\t}", "protected function createRealTestdir() {}", "public static function main()\n {\n PHPUnit_TextUI_TestRunner::run(self::suite());\n }", "public static function main()\n {\n PHPUnit_TextUI_TestRunner::run(self::suite());\n }", "public static function main()\n {\n PHPUnit_TextUI_TestRunner::run(self::suite());\n }", "public function setUp() :void{\n\n \tparent::setUp();\n\n \t$this->thread = factory(\\App\\Thread::class)->create();\n }", "protected function setUp()\n {\n $this->object = new sejour(1, 'Classe de mer', 170, '2016-05-02', 10);\n }", "public static function main() {\n PHPUnit_TextUI_TestRunner::run(new PHPUnit_Framework_TestSuite(__CLASS__));\n }", "public static function main() {\n PHPUnit_TextUI_TestRunner::run(new PHPUnit_Framework_TestSuite(__CLASS__));\n }", "protected function setUp() {\n $this->installer = new HomeNet_Installer;\n }", "public function testCreateTestSuiteWithoutName()\n {\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->visit('/library')\n ->seePageIs('/library')\n ->click('#newSuite')\n ->seePageIs('/library/testsuite/create')\n ->type('someFailDescription', 'description')\n ->type('someFailGoals', 'goals')\n ->press('submit');\n\n $this->dontSeeInDatabase('TestSuite', [\n 'TestSuiteDocumentation' => 'someFailDescription',\n 'TestSuiteGoals' => 'someFailGoals'\n ]);\n }", "public static function main()\n {\n\n PHPUnit_TextUI_TestRunner::run(self::suite());\n }", "protected function setUp()\n {\n $this->object = new SqlGroup();\n }", "protected function setUp()\n {\n \tob_start ();\n \t\n \t$this->object = new slurm ();\n \t$this->object->setListeOptions ( $this->getListeOption () );\n }", "public function createInstance()\n {\n $mock = $this->getMockBuilder(static::TEST_SUBJECT_CLASSNAME)\n ->setMethods(\n [\n 'setup',\n 'run',\n ]\n )\n ->getMockForAbstractClass();\n\n return $mock;\n }", "public function __construct()\n\t{\n\t\t$this->type = 'html';\n\t\t\n\t\t$docTitle = 'PHP RUN-TEST RESULTS';\n\t\t\n\t\t// dom\n\t\t$imp = new DOMImplementation();\n\t\t$dtd = $imp->createDocumentType(\"html\", \"-//W3C//DTD XHTML 1.0 Transitional//EN\", \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\");\n \t$this->dom = $imp->createDocument(\"\", \"\", $dtd);\n\n \t// html\n \t$htmlNode = $this->dom->createElement('html');\n \t$this->dom->appendChild($htmlNode);\n \t\n \t// head\n \t$headNode = $this->dom->createElement('head');\n \t$htmlNode->appendChild($headNode);\n \t$headNode->appendChild($this->dom->createElement('title', $docTitle));\n \t\n \t// body\n \t$bodyNode = $this->dom->createElement('body');\n \t$htmlNode->appendChild($bodyNode);\n \t\n \t// stage\n \t$this->stage = $this->dom->createElement('div');\n \t$this->stage->setAttribute('id', 'stage');\n \t$bodyNode->appendChild($this->stage);\n \t\n \t$this->stage->appendChild($this->dom->createElement('h1', $docTitle));\n\t}", "private function init(): void\n {\n $this->initSuite();\n $cases = $this->getCaseNodes();\n foreach ($cases as $file => $nodeArray) {\n $this->initSuiteFromCases($nodeArray);\n }\n }", "public function test(array $suiteNames): CollectionBuilder {\n return $this->getTaskPhpunitRun($suiteNames);\n }", "public static function main()\n {\n PHPUnit_TextUI_TestRunner::run(new PHPUnit_Framework_TestSuite(__CLASS__));\n }", "public static function main()\r\n {\r\n\t\t$suite = new PHPUnit_Framework_TestSuite('Tine 2.0 Calendar WebDAV MacOSX Event Tests');\r\n PHPUnit_TextUI_TestRunner::run($suite);\r\n\t}", "protected function setUp()\n {\n $configurationFactory = new \\Yana\\ConfigurationFactory();\n $configuration = $configurationFactory->loadConfiguration(CWD . 'resources/system.config.xml');\n $configuration->configdrive = YANA_INSTALL_DIR . 'config/system.drive.xml';\n $configuration['default']['user_requirements'] = array('level' => '1');\n $this->container = new \\Yana\\Core\\Dependencies\\Container($configuration);\n $schemaFactory = new \\Yana\\Db\\SchemaFactory();\n $this->schema = $schemaFactory->createSchema('check');\n $this->form = $this->_buildForm($this->schema);\n $this->object = new \\Yana\\Forms\\Setups\\Builder($this->form, $this->container);\n }", "public function setUp()\n {\n $this->_standardLib = new \\App\\OOProgramming\\StandardLibrary;\n $this->_daughter = new \\App\\OOProgramming\\Daughter;\n }", "public function build(TestSuite $testSuite): array\n {\n if ($this->description === null) {\n throw ShouldNotHappen::fromMessage('Description can not be empty.');\n }\n\n $chains = $this->chains;\n $proxies = $this->proxies;\n $factoryTest = $this->test;\n\n /**\n * @return mixed\n */\n $test = function () use ($chains, $proxies, $factoryTest) {\n $proxies->proxy($this);\n $chains->chain($this);\n\n return call_user_func(Closure::bind($factoryTest, $this, get_class($this)), ...func_get_args());\n };\n\n $className = $this->makeClassFromFilename($this->filename);\n\n $createTest = function ($description, $data) use ($className, $test) {\n $testCase = new $className($test, $description, $data);\n\n $this->factoryProxies->proxy($testCase);\n\n return $testCase;\n };\n\n $datasets = Datasets::resolve($this->description, $this->dataset);\n\n return array_map($createTest, array_keys($datasets), $datasets);\n }", "public static function main()\n {\n require_once \"PHPUnit/TextUI/TestRunner.php\";\n\n $suite = new PHPUnit_Framework_TestSuite(\"Zend_Form_Element_CheckboxTest\");\n $result = PHPUnit_TextUI_TestRunner::run($suite);\n }", "protected function setUp()\r\n {\r\n $this->object = new Json;\r\n mkdir('data/tests');\r\n file_put_contents('data/tests/test.json', json_encode(\\MockObject\\FileDataStub::getData()));\r\n }", "public function setUp()\n {\n $this->set('\\Gustavus\\Resources\\JSMin', 'stagingDir', '/cis/lib/Gustavus/Resources/Test/files/staging/');\n if (!file_exists('/cis/lib/Gustavus/Resources/Test/files/staging/')) {\n mkdir('/cis/lib/Gustavus/Resources/Test/files/staging/');\n }\n if (!file_exists(JSMin::$minifiedFolder)) {\n mkdir(JSMin::$minifiedFolder);\n }\n if (!file_exists(CSSMin::$minifiedFolder)) {\n mkdir(CSSMin::$minifiedFolder);\n }\n }" ]
[ "0.76022124", "0.76022124", "0.7453121", "0.74319714", "0.73686236", "0.7240385", "0.7208456", "0.719502", "0.7156883", "0.7111634", "0.7046327", "0.7021433", "0.6985345", "0.6919313", "0.6904246", "0.6822352", "0.67674017", "0.6751777", "0.6742017", "0.66289556", "0.6618121", "0.65364814", "0.65276146", "0.6467195", "0.6463831", "0.64329225", "0.6341102", "0.6292341", "0.6279966", "0.6264148", "0.62176937", "0.62115574", "0.62087435", "0.61074305", "0.6091183", "0.60212", "0.60115653", "0.60018784", "0.60018784", "0.59820586", "0.59820235", "0.59820235", "0.59820235", "0.59820235", "0.59820235", "0.59820235", "0.5947995", "0.589188", "0.58627343", "0.583597", "0.58105356", "0.5796122", "0.5786222", "0.5706641", "0.56490475", "0.5648718", "0.56451243", "0.5611866", "0.56043506", "0.5598966", "0.5596981", "0.5592202", "0.5588065", "0.55739266", "0.5546096", "0.5534149", "0.54667324", "0.54364157", "0.5414555", "0.5414082", "0.5404908", "0.540229", "0.5390856", "0.5390787", "0.53889006", "0.53888166", "0.5385869", "0.5385869", "0.5385869", "0.53851515", "0.5382685", "0.53802586", "0.53802586", "0.53777164", "0.53769064", "0.53729624", "0.53708255", "0.5368794", "0.5368573", "0.5367971", "0.53668743", "0.5366374", "0.5359471", "0.5351706", "0.5342743", "0.5342016", "0.5341212", "0.53386396", "0.5337842", "0.5334183" ]
0.6494211
23
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\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 create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { //using mass assignment to store data MyClass::create($request->all()); session()->flash('notif','You Have Successfully created a new Course'); return back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.7286258", "0.71454436", "0.7132821", "0.6640289", "0.6621105", "0.6566493", "0.65255576", "0.65087926", "0.6448317", "0.63752604", "0.63736314", "0.6365631", "0.6365631", "0.6365631", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($myclass_id) { $classes = MyClass::where('active',1)->find($myclass_id); return view('layout.update',compact('classes')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($myclass_id) { MyClass::find($myclass_id)->delete(); return back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
the interesting thing is that this could fail if the lock was created in the meantime..
private function createLock($key) { // but we'll ignore that out of convenience @apc_add ( $key . '.lock', '', 5 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function trylock() {}", "public function lock() {}", "abstract protected function lock(): void;", "public function acquireExclusiveLock() {}", "public function trylock_read() {}", "public function acquireSharedLock() {}", "public function lock(): void {}", "public function lock(): void {}", "public function lock(): void {}", "public function lock(): void {}", "public function lock(): void {}", "public function lock(): void;", "function lock()\n{\n}", "protected function hashLockClause() {}", "public function lockToNormal() {}", "protected function get__locked()\n\t{\n\t\treturn NULL;\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 }", "public function lock_read() {}", "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 }", "public function testLockReleaseFailsNotLockedAnymore() {\n\n\t\t\t$lockName = uniqid();\n\n\t\t\tSharedLock::lock($lockName, 0, 10);\n\n\t\t\t// simulate that the database lock was not hold\n\t\t\tif ($this->sqlExecute('DELETE FROM ' . SharedLock::getTable() . ' WHERE name = :name', [':name' => $lockName])->rowCount() != 1) {\n\t\t\t\t$this->fail('Test-Scenario-Error: Simulating lock deleted failed');\n\t\t\t}\n\n\t\t\t$this->setExpectedException(SharedLockReleaseException::class);\n\n\t\t\tSharedLock::unlock($lockName);\n\t\t}", "public function testAcquire() {\n\n\t\t\t$lockName = uniqid();\n\n\t\t\t// simply try to lock\n\t\t\tSharedLock::lock($lockName, 5, 10);\n\t\t}", "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}", "public function testParallelLockExpired(): void\n {\n $testLifeTime = 2;\n \\Closure::bind(function (Cache $class) use ($testLifeTime) {\n $class->defaultLifetime = $testLifeTime;\n }, null, $this->cacheInstance1)($this->cacheInstance1);\n\n $identifier1 = \\uniqid('lock_name_1_', true);\n\n $this->assertTrue($this->cacheInstance1->lock($identifier1, 0));\n $this->assertTrue($this->cacheInstance2->lock($identifier1, $testLifeTime + 1));\n\n $this->cacheInstance2->unlock($identifier1);\n }", "public function lock()\n {\n $this->locked = true;\n }", "public function lock()\n {\n $this->isLocked = true;\n }", "protected function _lock($key) {\n\t\treturn apc_add($key, 1);\n\t}", "private function createLock($key) {\n // but we'll ignore that out of convenience\n @apc_add($key . '.lock', '', 5);\n }", "private function lockConcurrentExecution()\n\t{\n\t\t$tag = $this->getLockTag();\n\t\t$app = \\Bitrix\\Main\\Application::getInstance();\n\t\t$managedCache = $app->getManagedCache();\n\t\t$managedCache->clean($tag);\n\t\t$managedCache->read(self::LOCK_TTL, $tag);\n\t\t$managedCache->setImmediate($tag, true);\n\t}", "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 }", "public function isLocked() {}", "public function testParallelLock(): void\n {\n $identifier1 = \\uniqid('lock_name_1_', true);\n\n $this->assertTrue($this->cacheInstance1->lock($identifier1));\n\n $this->assertFalse($this->cacheInstance1->lock($identifier1, 0));\n $this->assertFalse($this->cacheInstance2->lock($identifier1, 0));\n }", "public function lock()\n {\n $this->lock = true;\n }", "public function lockShared($lock_waiting_option = null) {}", "function lockCacheObject ()\n {\n return copy($this->cacheObjectId, $this->cacheObjectId.'.lock');\n }", "function _get_cron_lock()\n {\n }", "public function lock()\n\t{\n\t\t$this->immutable = true;\n\t}", "function cacheObjectLocked ()\n {\n return is_file($this->cacheObjectId.'.lock');\n }", "private function lock() {\n\t\tif (file_exists($this -> lockfile)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn file_put_contents($this -> lockfile, 'I am locked!') !== false;\n\t}", "function create_lock(string $key): bool\n{\n if (is_lock($key)) {\n return false;\n }\n $logger = \\Logger::getLogger(\"files.lock\");\n $lockfn = get_lock_filename($key);\n $logger->debug(\"Lock filename: '$lockfn'\");\n if (file_exists($lockfn)) {\n unlink($lockfn);\n }\n touch($lockfn);\n $exists = file_exists($lockfn);\n if (!$exists) {\n $logger->error(\"Could not create lock file - $lockfn\");\n return false;\n }\n return true;\n}", "public function is_locked(): bool {\n\t\t// TODO: Implement this.\n\t\treturn true;\n\t}", "public function testLockedMethod() {\n $lockedOperation = new LockedOperation(self::$lockHandler);\n $lockable = new MyLockable();\n $foo = new Foo();\n\n $result = FALSE;\n\n try {\n $result = $lockedOperation->execute(array($foo, 'bar'), $lockable);\n }\n catch (Exception $ex) {\n // this shouldn't happen.\n }\n\n $this->assertTrue($result);\n $this->assertFalse(isset($ex));\n }", "function _lock_tree_table()\n\t{\n\t\tee()->db->query(\"LOCK TABLE \" .$this->tree_table . \" WRITE\");\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 lock($wait = -1) {}", "public function lock($wait = -1) {}", "abstract protected function acquireLock($name, $timeout = 0);", "public function lock()\n {\n if ( !($this->_state & self::LOADED) ) {\n $this->_memManager->load($this, $this->_id);\n $this->_state |= self::LOADED;\n }\n\n $this->_state |= self::LOCKED;\n\n /**\n * @todo\n * It's possible to set \"value\" container attribute to avoid modification tracing, while it's locked\n * Check, if it's more effective\n */\n }", "function lock(Sabre_DAV_Locks_LockInfo $lockInfo);", "public function lock()\n {\n $shmId = shmop_open($this->getIndexerId(), 'c', self::PERM, self::LEN);\n shmop_write($shmId, $this->_getMicrotimeString(), 0);\n shmop_close($shmId);\n $this->_isLocked = true;\n }", "public function testLockCleanDiedProcessesWhichDidNotHaveLock() {\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->assertDurationGreaterThan(6, function () use ($lockName) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSharedLock::lock($lockName, 10, 10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (SharedLockTimeoutException $ex) {\n\t\t\t\t\t\t\t$this->fail('Lock was not acquired but should be cleaned since holding process already should have died');\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, 8);\n\n\t\t\t\t\t// simulate that the database lock was not hold\n\t\t\t\t\tif ($this->sqlExecute('UPDATE ' . SharedLock::getTable() . ' SET lock_acquired = false WHERE name = :name', [':name' => $lockName])->rowCount() != 1) {\n\t\t\t\t\t\t$this->fail('Test-Scenario-Error: Simulating lock_acquired = false failed');\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->sendMessage('acquired', $sh);\n\n\t\t\t\t\tsleep(1);\n\t\t\t\t}\n\t\t\t);\n\t\t}", "public function lockAndBlock()\n {\n $this->lock();\n }", "protected function lockRecord()\n\t{\n\t\t//\tignore locking\n\t\treturn true;\n\t}", "public function readunlock() {}", "function lock_sqlite3_access() {\n\tglobal $DB;\n\n\tsem_acquire($DB['SEM_ID']);\n}", "public function wasLockTimeout() {\n\t\treturn false;\n\t}", "function cera_grimlock_single() {\n\t\tdo_action( 'grimlock_single' );\n\t}", "function trylock($obj) {\n\n\t\t$this->send(self::REQ_TRY_LOCK, $obj);\n\n\t\tlist($op, $p) = $this->receive();\n\n\t\tswitch ($op) {\n\t\t\tcase self::REP_LOCK_ACQUIRED:\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t\tcase self::REP_LOCK_WBLOCK:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new LockException($this->decode_reply($op) . \": \" . $p);\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function lockExclusive($lock_waiting_option = null) {}", "function lock_may_be_available($name) {\n $lock = db_query('SELECT expire, value FROM {semaphore} WHERE name = :name', array(':name' => $name))->fetchAssoc();\n if (!$lock) {\n return TRUE;\n }\n $expire = (float) $lock['expire'];\n $now = microtime(TRUE);\n if ($now > $expire) {\n // We check two conditions to prevent a race condition where another\n // request acquired the lock and set a new expire time. We add a small\n // number to $expire to avoid errors with float to string conversion.\n return (bool) db_delete('semaphore')\n ->condition('name', $name)\n ->condition('value', $lock['value'])\n ->condition('expire', 0.0001 + $expire, '<=')\n ->execute();\n }\n return FALSE;\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 wasDeadlock() {\n\t\treturn false;\n\t}", "public function stream_lock($operation) {\n return FALSE;\n }", "public function isLocked();", "public function isLocked();", "public function isLocked();", "public function testParallelUnlockNoExpiration(): void\n {\n $identifier1 = \\uniqid('lock_name_1_', true);\n $identifier2 = \\uniqid('lock_name_2_', true);\n\n $this->assertTrue($this->cacheInstance1->lock($identifier1, -1));\n $this->assertTrue($this->cacheInstance2->lock($identifier2, -1));\n\n $this->assertFalse($this->cacheInstance2->unlock($identifier1));\n $this->assertTrue($this->cacheInstance2->unlock($identifier2));\n\n $this->assertTrue($this->cacheInstance2->isLocked($identifier1));\n $this->assertFalse($this->cacheInstance2->isLocked($identifier2));\n }", "public function testLockExplicitRelease() {\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(5, function () use ($lockName) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSharedLock::lock($lockName, 5, 10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (SharedLockTimeoutException $ex) {\n\t\t\t\t\t\t\t$this->fail('Lock was not acquired but should be released by other process within timeout');\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\tsleep(3);\n\n\t\t\t\t\t// explicit release\n\t\t\t\t\tSharedLock::unlock($lockName);\n\n\t\t\t\t\tsleep(2);\n\t\t\t\t}\n\t\t\t);\n\t\t}", "public function writeunlock() {}", "public function acquire() {}", "protected function ipLockClause() {}", "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 }", "function _acquireLock ()\n {\n $this->_enterSection('_acquireLock');\n \n $a = strcspn ($this->_options['dsn'], ':');\n $proto = substr ($this->_options['dsn'], 0, $a);\n $path = substr ($this->_options['dsn'], $a + 3);\n\n if ($proto == 'file') {\n $f = sprintf($path, $this->_indexName);\n $this->_indexFileRes = fopen ($f,'w');\n flock ($this->_indexFileRes, LOCK_EX);\n }\n \n $this->_leaveSection('_acquireLock');\n }", "public function testAssertTTLFailsNotLockedAnymore() {\n\n\t\t\t$lockName = uniqid();\n\n\t\t\tSharedLock::lock($lockName, 0, 10);\n\n\t\t\t// simulate that the database lock was not hold\n\t\t\tif ($this->sqlExecute('DELETE FROM ' . SharedLock::getTable() . ' WHERE name = :name', [':name' => $lockName])->rowCount() != 1) {\n\t\t\t\t$this->fail('Test-Scenario-Error: Simulating lock deleted failed');\n\t\t\t}\n\n\t\t\t$this->setExpectedException(SharedLockRemainingTTLException::class);\n\n\t\t\tSharedLock::assertTTL($lockName, 1);\n\t\t}", "public function acquireLock(int $id): void;", "private function is_locked(){\n\t\t//return $batch_txt_file_object->exists();\n\t\treturn \"no\";\n\t\t\n\t}", "public function lockJob() {\n \t\t//structure id,jobId,serverId (job id is unique entry)\n\n \t}", "public function tree_lock() {\n global $db, $uid;\n\n if (($this->lock_user != false) && ($this->lock_user != $uid)) {\n // Baum ist bereits von einem anderen Benutzer gesperrt\n $lock_stamp = false;\n $this->error = \"ERR_ALREADY_LOCKED\";\n return false;\n } else if (($this->lock_user != false) && ($this->lock_user == $uid)) {\n // Eigene Sperre bereits aktiv\n $this->lock_stamp = time();\n $this->lock_expire = time() + 300;\n $result = $db->querynow(\"UPDATE `lock` SET STAMP_UPDATE='\".date('Y-m-d H:i:s', $this->lock_stamp).\"',\n STAMP_EXPIRE='\".date('Y-m-d H:i:s', $this->lock_expire).\"'\n WHERE FK_USER=\".$uid.\" AND IDENT='\".$this->table.$this->root.\"'\");\n if (!$result['str_error']) {\n $this->lock_user = $uid;\n return true;\n } else {\n $this->error = \"ERR_LOCK_FAILED\";\n $this->lock_stamp = 0;\n $this->lock_expire = 0;\n $this->lock_user = false;\n return false;\n }\n } else {\n // Baum nicht gesperrt, Sperre hinzu\n $this->lock_stamp = time();\n $this->lock_expire = time() + 300;\n $result = $db->querynow(\"INSERT INTO `lock` (FK_USER, IDENT, STAMP_UPDATE, STAMP_EXPIRE) VALUES\n (\".$uid.\",'\".$this->table.$this->root.\"', '\".date('Y-m-d H:i:s', $this->lock_stamp).\"', '\".\n date('Y-m-d H:i:s', $this->lock_expire).\"')\");\n if (!$result['str_error']) {\n $this->lock_user = $uid;\n return true;\n } else {\n $this->error = \"ERR_LOCK_FAILED\";\n $this->lock_user = false;\n return false;\n }\n }\n }", "public function testLockSsnFailsOnLock()\n\t{\n\t\t$this->store->lockSsn('123456789');\n\t\t$this->assertFalse($this->store->lockSsn('123456789'));\n\t}", "function claim_lock(string $key): void\n{\n $logger = \\Logger::getLogger(\"files.lock\");\n $lockfn = get_lock_filename($key);\n $logger->debug(\"Claim lock: '$lockfn'\");\n if (!file_exists($lockfn)) {\n $logger->error(\"Lock file missing: $lockfn\");\n die();\n }\n $pid = file_get_contents($lockfn);\n if ($pid) {\n $logger->error(\"Lock file already claimed: $lockfn $pid\");\n die();\n }\n file_put_contents($lockfn, getmypid());\n}", "public function writelock($wait = -1) {}", "public function testLockCleanDiedProcessesWhichHadLock() {\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(3, function () use ($lockName) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSharedLock::lock($lockName, 3, 10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (SharedLockTimeoutException $ex) {\n\t\t\t\t\t\t\t$this->fail('Lock was not acquired but should be cleaned since holding process already should have died');\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\tsleep(1);\n\t\t\t\t}\n\t\t\t);\n\t\t}", "protected function lock()\n {\n $this->isStateLocked = true;\n }", "public function testLockedOperation() {\n $lockedOperation = new LockedOperation(self::$lockHandler);\n $lockable = new MyLockable();\n $op = function() {\n return TRUE;\n };\n $result = $lockedOperation->execute($op, $lockable);\n\n $this->assertTrue(self::$lockHandler->canLock($lockable));\n $this->assertTrue($result);\n }", "public function walletlock()\n\t{\n\t\treturn $this->_get_error($this->connect('walletlock'));\n\t}", "public function lock()\n {\n if ($this->isLocked()) {\n throw new RuntimeException('Cannot lock: already locked');\n }\n\n $this->conn->set('lock:' . $this->name, $this->id);\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());\n if ($this->isLocked()) {\n // 5 seconds passed, assume the owning process died off and remove it\n $this->removeLock($key);\n }\n }", "function free_lock(string $key): void\n{\n $logger = \\Logger::getLogger(\"files.lock\");\n $lockfn = get_lock_filename($key);\n $logger->debug(\"Free lock '$key'\");\n if (!unlink($lockfn)) {\n $logger->error(\"Error unlocking $key\");\n }\n}", "public function enableLocked()\n\t{\n\t\t$this->_locked = true;\n\t}", "public function testParallelUnlock(): void\n {\n $identifier1 = \\uniqid('lock_name_1_', true);\n $identifier2 = \\uniqid('lock_name_2_', true);\n\n $this->assertTrue($this->cacheInstance1->lock($identifier1, 30));\n $this->assertTrue($this->cacheInstance2->lock($identifier2, 30));\n\n $this->assertFalse($this->cacheInstance2->unlock($identifier1));\n $this->assertTrue($this->cacheInstance2->unlock($identifier2));\n\n $this->assertTrue($this->cacheInstance2->isLocked($identifier1));\n $this->assertFalse($this->cacheInstance2->isLocked($identifier2));\n }", "public function testLockReleaseFailsConnectionLoss() {\n\n\t\t\t$lockName = uniqid();\n\n\t\t\tSharedLock::lock($lockName, 0, 10);\n\n\t\t\t// simulate that the database lock was not hold\n\t\t\ttry {\n\t\t\t\t$this->sqlExecute('KILL connection_id()');\n\t\t\t}\n\t\t\tcatch (\\PDOException $ex) {\n\t\t\t\tif ($ex->getCode() != 70100)\n\t\t\t\t\tthrow $ex;\n\t\t\t}\n\n\t\t\t$this->setExpectedException(SharedLockReleaseException::class);\n\n\t\t\tSharedLock::unlock($lockName);\n\t\t}", "public function testBlock() {\n\t\t$redis = $this->getConnection();\n\t\t$mutex1 = new ARedisMutex(\"TestMutex2:\".uniqid(),$redis);\n\t\t$mutex2 = new ARedisMutex($mutex1->name,$redis);\n\t\t$mutex1->expiresAfter = 2;\n\t\t$mutex2->expiresAfter = 2;\n\t\t$this->assertTrue($mutex1->lock());\n\t\t$count = 0;\n\t\t$mutex2->onAfterLock = function(CEvent $event) use (&$count) {\n\t\t\t$count++;\n\t\t\t$event->sender->unlock();\n\t\t};\n\t\t$mutex2->block();\n\t\t$this->assertEquals(1, $count);\n\t}", "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 _update_locked () {\n\t\t\n\t\t// How old do locks have to be to get unlocked?\n\t\t$minutes = 10;\n\t\t\n\t\t$time = gmdate(\"Y-m-d H:i:s\", (time() - ($minutes * 60)));\n\t\t\n\t\t$q = $this->db->query(\"UPDATE commentreports\n\t\t\t\t\t\tSET \tlocked = NULL,\n\t\t\t\t\t\t\t\tlockedby = 0\n\t\t\t\t\t\tWHERE\tlocked < '$time'\n\t\t\t\t\t\t\");\n\t\n\t}", "function action_lock($dsn, $action, $stamp) {\n\t$db =& MDB2::factory($dsn);\n\t\n\tif (DB::isError($db)) {\n\t\tdie ($db->getMessage());\n\t}\n\n\t$sql = \"SELECT COUNT(*) FROM action_lock WHERE action='\".addslashes($action).\"' AND stamp='\".$stamp.\"' ;\";\n\tsyslog( LOG_INFO, $sql );\n\t$action_lock = $db->queryOne($sql);\n\tif ( $action_lock > 0 ) {\n\t\t\treturn false;\n\t} else {\n\t // Otherwise, insert.\n\t $sql = \"INSERT INTO action_lock ( action, stamp ) VALUES ( '\".addslashes($action).\"', '\".addslashes($stamp).\"' ); \";\n\t syslog( LOG_INFO, $sql );\n\t $result = $db->query($sql);\n\n\t return true;\n }\n\n}", "protected static function defaultLockVersion()\n {\n return 1;\n }", "function lock(string $key): void;", "function set_cron_lock($name, $until, $ignorecurrent=false) {\n if (empty($name)) {\n debugging(\"Tried to get a cron lock for a null fieldname\");\n return false;\n }\n\n // remove lock by force == remove from config table\n if (is_null($until)) {\n set_config($name, null);\n return true;\n }\n\n if (!$ignorecurrent) {\n // read value from db - other processes might have changed it\n $value = get_field('config', 'value', 'name', $name);\n\n if ($value and $value > time()) {\n //lock active\n return false;\n }\n }\n\n set_config($name, $until);\n return true;\n}", "public function unlock(&$prevcount = 0) {}", "public function testLockCleanDiedProcessesWhichHadLockTimeout0() {\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\tsleep(1);\n\n\t\t\t\t\t$this->assertDurationLessThan(3, function () use ($lockName) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSharedLock::lock($lockName, 0, 10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (SharedLockTimeoutException $ex) {\n\t\t\t\t\t\t\t$this->fail('Lock was not acquired but should be cleaned since holding process already should have died');\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}\n\t\t\t);\n\t\t}", "function getLocks();" ]
[ "0.7857737", "0.7621196", "0.74377275", "0.73859954", "0.73724747", "0.7346972", "0.71721417", "0.71721417", "0.71721417", "0.71721417", "0.71721417", "0.7167884", "0.7094071", "0.7087743", "0.7026975", "0.700273", "0.6910189", "0.6896955", "0.6894566", "0.68778235", "0.6865753", "0.67991406", "0.67068887", "0.6684434", "0.66839963", "0.6651367", "0.66111517", "0.660396", "0.6594645", "0.6591996", "0.6553476", "0.6522627", "0.6516868", "0.65091825", "0.6494194", "0.6493497", "0.6451384", "0.6428737", "0.64189386", "0.6393765", "0.638985", "0.6385645", "0.6383948", "0.63790023", "0.63790023", "0.6375088", "0.637413", "0.6373207", "0.6360734", "0.6351578", "0.63445085", "0.63282454", "0.6309205", "0.6282673", "0.62824935", "0.6280806", "0.6279909", "0.6278156", "0.6271655", "0.6269535", "0.62684864", "0.62640274", "0.62436795", "0.62436795", "0.62436795", "0.62264603", "0.6223034", "0.6219429", "0.621895", "0.62167895", "0.6192056", "0.6178299", "0.61723983", "0.61653006", "0.61627936", "0.6158292", "0.6143967", "0.61303675", "0.61105037", "0.6074173", "0.6073144", "0.60694283", "0.60596025", "0.60529834", "0.604361", "0.60432035", "0.6033307", "0.6032054", "0.602202", "0.60194415", "0.6006672", "0.60060817", "0.59977347", "0.59877944", "0.59811044", "0.59699935", "0.59659916", "0.59464073", "0.5943223", "0.5941836" ]
0.64901435
36
suppress all warnings, if some other process removed it that's ok too
private function removeLock($key) { @apc_delete ( $key . '.lock' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setWarningsExist() {}", "private function suppressLibraryErrors()\n {\n $this->originalErrorReporting = ini_get('error_reporting');\n error_reporting(E_ERROR | E_PARSE);\n }", "public function showWarnings(): void\n {\n $this->executeLog('show warnings');\n }", "function clear_warning_message()\n {\n $this->_warning_message = \"\";\n }", "public function hasWarnings() {}", "protected static function removeDeprecationLogFile() {}", "protected function deactivateWarningLogger()\n {\n restore_error_handler();\n }", "protected function warning()\n\t{\n\t\t\\IPS\\Output::i()->output = \\IPS\\Theme::i()->getTemplate( 'store' )->productOptionsChanged(\n\t\t\tnew \\IPS\\Patterns\\ActiveRecordIterator(\n\t\t\t\t\\IPS\\Db::i()->select( '*', 'nexus_packages', \\IPS\\Db::i()->in( 'p_id', explode( ',', \\IPS\\Request::i()->ids ) ) ),\n\t\t\t\t'IPS\\nexus\\Package'\n\t\t\t)\n\t\t);\n\t}", "protected function restoreErrorReporting() {\n error_reporting(~E_NOTICE);\n }", "protected function warning()\n {\n return $this->warn(\"You have no commands to run !\");\n }", "function admin_critical_warnings_present() {\n global $SESSION;\n\n if (!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {\n return 0;\n }\n\n if (!isset($SESSION->admin_critical_warning)) {\n $SESSION->admin_critical_warning = 0;\n if (ini_get_bool('register_globals')) {\n $SESSION->admin_critical_warning = 1;\n } else if (is_dataroot_insecure(true) === INSECURE_DATAROOT_ERROR) {\n $SESSION->admin_critical_warning = 1;\n }\n }\n\n return $SESSION->admin_critical_warning;\n}", "public static function removeUselessCoreUpdateNagMessages() {\n if (!current_user_can('update_core')) {\n // @see wp-admin/includes/admin-filters.php\n remove_action('admin_notices', 'update_nag', 3);\n remove_action('admin_notices', 'maintenance_nag', 10);\n }\n }", "public function suppress_errors($suppress = \\true)\n {\n }", "public static function warningHandler()\n {\n }", "public function check_admin_notices()\n {\n if (! \\wpSPIO()->env()->is_screen_to_use)\n return; // suppress all when not our screen.\n\n $this->doFilePermNotice();\n $this->doAPINotices();\n $this->doCompatNotices();\n $this->doUnlistedNotices();\n $this->doQuotaNotices();\n\n $this->doIntegrationNotices();\n\n $this->doHelpOptInNotices();\n }", "function warning() {\n\t\t\n\t\t\tglobal $blog_id; //get the current blog id\n\t\t\t\n\t\t\tif ( ( is_multisite() && ( $blog_id != 1 || ! current_user_can( 'manage_network_options' ) ) ) || ! current_user_can( 'activate_plugins' ) ) { //only display to network admin if in multisite\n\t\t\t\treturn;\n\t\t\t}\n\t\t\n\t\t\t//if there is a warning to display\n\t\t\tif ( get_option( 'bwps_intrusion_warning' ) == 1 ) {\n\t\t\t\n\t\t\t\tif ( ! function_exists( 'bit51_filecheck_warning' ) ) {\n\t\t\t\n\t\t\t\t\tfunction bit51_filecheck_warning(){\n\t\t\t\t\n\t\t\t\t\t\tglobal $plugname;\n\t\t\t\t\t\tglobal $plughook;\n\t\t\t\t\t\tglobal $plugopts;\n\t\t\t\t\t\t$adminurl = is_multisite() ? admin_url() . 'network/' : admin_url();\n\t\t\t\t\t\n\t\t\t\t\t echo '<div class=\"error\">\n\t\t\t\t <p>' . __( 'Better WP Security has noticed a change to some files in your WordPress installation. Please review the logs to make sure your system has not been compromised.', $plughook ) . '</p> <p><input type=\"button\" class=\"button \" value=\"' . __( 'View Logs', $plughook ) . '\" onclick=\"document.location.href=\\'?bit51_view_logs=yes&_wpnonce=' . wp_create_nonce('bit51-nag') . '\\';\"> <input type=\"button\" class=\"button \" value=\"' . __('Dismiss Warning', $plughook) . '\" onclick=\"document.location.href=\\'' . $adminurl . 'admin.php?bit51_dismiss_warning=yes&_wpnonce=' . wp_create_nonce( 'bit51-nag' ) . '\\';\"></p>\n\t\t\t\t\t </div>';\n\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//put the warning in the right spot\n\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\tadd_action( 'network_admin_notices', 'bit51_filecheck_warning' ); //register notification\n\t\t\t\t} else {\n\t\t\t\t\tadd_action( 'admin_notices', 'bit51_filecheck_warning' ); //register notification\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//if they've clicked a button hide the notice\n\t\t\tif ( ( isset( $_GET['bit51_view_logs'] ) || isset( $_GET['bit51_dismiss_warning'] ) ) && wp_verify_nonce( $_REQUEST['_wpnonce'], 'bit51-nag' ) ) {\n\t\t\t\t\n\t\t\t\t//Get the options\n\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\t\n\t\t\t\t\tswitch_to_blog( 1 );\n\t\t\t\t\t\t\n\t\t\t\t\tdelete_option( 'bwps_intrusion_warning' );\n\t\t\t\t\t\t\n\t\t\t\t\trestore_current_blog();\n\t\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\tdelete_option( 'bwps_intrusion_warning' );\n\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//take them back to where they started\n\t\t\t\tif ( isset( $_GET['bit51_dismiss_warning'] ) ) {\t\t\t\t\n\t\t\t\t\twp_redirect( $_SERVER['HTTP_REFERER'], 302 );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//take them to the correct logs page\n\t\t\t\tif ( isset( $_GET['bit51_view_logs'] ) ) {\n\t\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\twp_redirect( admin_url() . 'network/admin.php?page=better-wp-security-logs#file-change', 302 );\n\t\t\t\t\t} else {\n\t\t\t\t\t\twp_redirect( admin_url() . 'admin.php?page=better-wp-security-logs#file-change', 302 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}", "static function warningHandler($errno, $errstr, $errfile, $errline, $errcontext) {\n\t if(error_reporting() == 0) return;\n\t\tif(self::$send_warnings_to) self::emailError(self::$send_warnings_to, $errno, $errstr, $errfile, $errline, $errcontext, \"Warning\");\n\t\tself::log_error_if_necessary( $errno, $errstr, $errfile, $errline, $errcontext, \"Warning\");\n\n\t\tif(Director::isDev()) {\n\t\t self::showError($errno, $errstr, $errfile, $errline, $errcontext, \"Warning\");\n\t\t}\n\t}", "public static function suppress($suppress = true) : void\n {\n }", "public static function warning()\n {\n static::returnCode(static::CODE_WARNING);\n }", "public static function suppressed(): bool\n {\n return @trigger_error('hello');\n }", "public static function hasWarnings() { return count(PNApplication::$warnings) > 0; }", "protected function downgradeErrorReporting() {\n error_reporting(~(E_NOTICE | E_WARNING));\n }", "public function maybe_disable_style_notice() {\n\n\t\tif ( get_option( 'yourfitness_compile_all_styles' ) && yourfitness_tt_is_compiler_dev_mode() )\n\t\t\techo '<br /><span>' . esc_html__( 'Styles are not compiled in development mode.', 'your-fitness' ) . '</span>';\n\n\t}", "public function importXcapWarning()\n {\n $screen = get_current_screen();\n $filter = (isset($_GET['filter_action'])) ? $_GET['filter_action'] : false;\n\n $optionsChecked = (get_field('import_warning', 'option') == true && get_field('xcap_daily_cron', 'option') == true) ? true : false;\n if ($screen->post_type != 'event' || $optionsChecked != true || $filter || ! current_user_can('administrator')) {\n return;\n }\n\n $latestPost = get_posts(\"post_type=event&numberposts=1&meta_key=import_client&meta_value=xcap&post_status=any\");\n if (empty($latestPost[0]) || strtotime($latestPost[0]->post_date) > strtotime('-1 week')) {\n return;\n }\n\n echo '<div class=\"notice notice-warning is-dismissible\"><p>';\n _e('XCAP have not imported any events for atleast 7 days. Please control the importer.', 'event-manager');\n echo '</p></div>';\n }", "public function quash_unused() {\n\t\t// Don't put any code in here.\n\t}", "private function _warning($text){\n echo '[# WARNING] ' . $text . PHP_EOL;\n }", "public function getIgnoreWarnings()\n {\n return $this->ignore_warnings;\n }", "public function unsetNoticeErrorLevel(){\n $errorlevel = error_reporting();\n if ($errorlevel > 0) {\n error_reporting($errorlevel & ~ E_NOTICE);\n } elseif ($errorlevel < 0) {\n error_reporting(E_ALL & ~ E_NOTICE);\n }\n }", "function warnings() {\n\t\t$Warnings = array();\n\t\tif (mysqli_warning_count($this->LinkID)) {\n\t\t\t$e = mysqli_get_warnings($this->LinkID);\n\t\t\tdo {\n\t\t\t\tif ($e->errno == 1592) {\n\t\t\t\t\t// 1592: Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$Warnings[] = 'Code ' . $e->errno . ': ' . display_str($e->message);\n\t\t\t} while ($e->next());\n\t\t}\n\t\t$this->Queries[count($this->Queries) - 1][2] = $Warnings;\n\t}", "public function testRollbarConfigInternalCheckIgnoredShouldSuppress(): void\n {\n $errorReporting = \\error_reporting();\n \\error_reporting(0);\n\n Rollbar::init([\n 'access_token' => $this->getTestAccessToken(),\n 'environment' => 'testing-php',\n 'verbose_logger' => $this->verboseLogger,\n ]);\n Rollbar::logger()->getConfig()->internalCheckIgnored(LogLevel::WARNING, \"Some message\");\n $this->assertVerboseLogContains(\n 'Ignoring \\(error reporting has been disabled in PHP config\\)',\n LogLevel::DEBUG,\n );\n\n \\error_reporting($errorReporting);\n }", "public function maybe_disable_scripts_notice() {\n\n\t\tif ( get_option( 'yourfitness_compile_all_scripts' ) && yourfitness_tt_is_compiler_dev_mode() )\n\t\t\techo '<br /><span>' . esc_html__( 'Scripts are not compiled in development mode.', 'your-fitness' ) . '</span>';\n\n\t}", "function hide_update_notice_to_all_but_admin() {\n if ( !current_user_can( 'update_core' ) ) {\n remove_action( 'admin_notices', 'update_nag', 3 );\n }\n}", "public function noWarningsTest( AcceptanceTester $I ) {\n\t\t$I->dontSeeInSource( 'Warning: ' );\n\t}", "public function debugWarnings()\n\t{\n\t\t$stmt = $this->_query('SHOW WARNINGS', true);\n\n\t\t$warnings = array();\n\t\twhile ($warning = $stmt->fetch_assoc())\n\t\t{\n\t\t\t$warnings[] = $warning;\n\t\t}\n\n\t\tforeach ($warnings as $warning)\n\t\t{\n\t\t\tatkwarning(\"MYSQL warning '{$warning['Level']}' (Code: {$warning['Code']}): {$warning['Message']}\");\n\t\t}\n\t}", "public function getWarningList()\n {\n return [];\n }", "public function getWarningList()\n {\n return [];\n }", "public function getWarningList()\n {\n return [];\n }", "public function getWarningList()\n {\n return [];\n }", "public function getWarningList()\n {\n return [];\n }", "public function setWarning(){\n $this->dbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n }", "public function hasWarnings()\n {\n return !empty(self::$warnings);\n }", "public function getWarningList() {\n\t\treturn array(\n\t\t\t88 => 1, // Whitelist comment deprecation warning.\n\t\t);\n\t}", "public function getWarningList() {\n\t\treturn array();\n\t}", "protected function activateWarningLogger()\n {\n $this->previousErrorHandler = set_error_handler(\n array($this, \"warningHandler\"),\n E_WARNING | E_USER_WARNING | E_NOTICE | E_USER_NOTICE\n );\n }", "public static function additionalCleaning() {\n \n }", "public function getWarningList() {\n\t\treturn [];\n\t}", "public function suppress_admin_output($request)\n\t{\n\t\treturn false;\n\t}", "public function importCbisWarning()\n {\n $screen = get_current_screen();\n $filter = (isset($_GET['filter_action'])) ? $_GET['filter_action'] : false;\n\n $optionsChecked = (get_field('import_warning', 'option') == true && get_field('cbis_daily_cron', 'option') == true) ? true : false;\n if ($screen->post_type != 'event' || $optionsChecked != true || $filter || ! current_user_can('administrator')) {\n return;\n }\n\n $latestPost = get_posts(\"post_type=event&numberposts=1&meta_key=import_client&meta_value=cbis&post_status=any\");\n if (empty($latestPost[0]) || strtotime($latestPost[0]->post_date) > strtotime('-1 week')) {\n return;\n }\n\n echo '<div class=\"notice notice-warning is-dismissible\"><p>';\n _e('CBIS have not imported any events for atleast 7 days. Please control the importer.', 'event-manager');\n echo '</p></div>';\n }", "protected function warn()\r\n {\r\n// header('Location: '.$this->warning_url);\r\n $this->send_header($this->warning_url);\r\n exit;\r\n }", "function raiseWarning ($message)\r\n{\r\n\ttrigger_error ($message, E_USER_WARNING);\r\n}", "function mediahub_no_upgrade_notice_processing() {\n\tif ( current_user_can( 'manage_options' ) && ( ! isset($_GET['mediahub_no_upgrade_notice'] ) || ! wp_verify_nonce( $_GET['mediahub_no_upgrade_notice'], 'mediahub_no_upgrade_notice' ) ) ) {\n\t\treturn;\n\t}\n\n\t// Hide the upgrade notice\n\tupdate_option( 'mediahub_no_upgrade_notice', true );\n}", "function exec_without_warnings(SQLite3Stmt $stmt) {\n $err_lvl = error_reporting(E_ERROR);\n $results = $stmt->execute();\n error_reporting($err_lvl);\n\n return $results;\n}", "private function disableEStrict() {\n $was = error_reporting();\n error_reporting($was & ~E_STRICT);\n return $was;\n }", "public function cleanRepair() {}", "protected function outputInstallToolNotEnabledMessageIfNeeded() {}", "protected function outputInstallToolNotEnabledMessageIfNeeded() {}", "function warning($message);", "public function displayWarningMessages_postProcess(array &$warnings) {\n $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['hwt_resubmission']);\n $openResubmissions = tx_hwtresubmission_sv1::getOpenResubmissions($GLOBALS[$BE_USER]->user['uid'], $extConf['resubmissionTime']);\n\n if($openResubmissions) {\n $warnings['hwtresubmission'] = '[EXT: hwt_resubmission] Open Resubmissions:<br />';\n foreach($openResubmissions as $value) {\n $warnings['hwtresubmission'] .= '- tt_content[' . $value['uid'] . '] ' . $value['header'] . '<br />';\n }\n $warnings['hwtresubmission'] .= '<a href=\"javascript:top.goToModule(\\'web_list\\',1)\">zum List-Modul</a>';\n }\n\t}", "function checkWarnings(){ \n $this->warnings = array();\n if ($this->feedwater->massFlow>0){\n if ($this->outletSteam->phase<>'Gas' and $this->outletSteam->quality<>1){\n $this->warnings[] = \"Outlet Steam Contains Condensate\";\n }\n if ($this->fuelEnergy<0){\n $this->warnings[] = \"Boiler Using Negative Energy\";\n }\n }\n if ($this->feedwater->massFlow<0){\n $this->warnings[] = \"Steam Flow Negative\";\n }\n return count($this->warnings);\n }", "public function allWarning() {\n return $this->warningMsg;\n }", "public function ignoreSSLErrors()\r\n {\r\n $this->commandLineOptions[] = '--ignore-ssl-errors=true';\r\n $this->commandLineOptions[] = '--ssl-protocol=tlsv1';\r\n }", "function warnings_script()\n{\n\tif (get_forum_type()!='ocf') warn_exit(do_lang_tempcode('NO_OCF')); else ocf_require_all_forum_stuff();\n\n\trequire_lang('ocf_warnings');\n\n\tif (!ocf_may_warn_members())\n\t\taccess_denied('SPECIFIC_PERMISSION','warn_members');\n\n\t$type=get_param('type');\n\n\tif ($type=='delete') // Delete a saved warning\n\t{\n\t\t$_title=post_param('title');\n\t\t$GLOBALS['FORUM_DB']->query_delete('f_saved_warnings',array('s_title'=>$_title),'',1);\n\t\t$content=paragraph(do_lang_tempcode('SUCCESS'));\n\t\t$echo=do_template('STYLED_HTML_WRAP',array('TITLE'=>do_lang_tempcode('DELETE_SAVED_WARNING'),'CONTENT'=>$content));\n\t\t$echo->evaluate_echo();\n\t\treturn;\n\t}\n\n\t// Show list of saved warnings\n\t// ---------------------------\n\n\t$content=new ocp_tempcode();\n\t$rows=$GLOBALS['FORUM_DB']->query_select('f_saved_warnings',array('*'),NULL,'ORDER BY s_title');\n\t$keep=symbol_tempcode('KEEP');\n\t$url=find_script('warnings').'?type=delete'.$keep->evaluate();\n\tforeach ($rows as $myrow)\n\t{\n\t\t$delete_link=hyperlink($url,do_lang_tempcode('DELETE'),false,false,'',NULL,form_input_hidden('title',$myrow['s_title']));\n\t\t$content->attach(do_template('OCF_SAVED_WARNING',array(\n\t\t\t'MESSAGE'=>$myrow['s_message'],\n\t\t\t'MESSAGE_HTML'=>comcode_to_tempcode($myrow['s_message'],$GLOBALS['FORUM_DRIVER']->get_guest_id()),\n\t\t\t'EXPLANATION'=>$myrow['s_explanation'],\n\t\t\t'TITLE'=>$myrow['s_title'],\n\t\t\t'DELETE_LINK'=>$delete_link,\n\t\t)));\n\t}\n\tif ($content->is_empty()) $content=paragraph(do_lang_tempcode('NO_ENTRIES'),'rfdsfsdf3t45');\n\n\t$echo=do_template('POPUP_HTML_WRAP',array('TITLE'=>do_lang_tempcode('CHOOSE_SAVED_WARNING'),'CONTENT'=>$content));\n\t$echo->evaluate_echo();\n}", "function finishWarnings() {\n\n if (!is_object($this->tpl)) \n return;\n\n // 3/11/2002 - Tim Gallagher added the next two lines\n // so the version and link could be put in and easily\n // changed as versions, and urls change.\n $this->tpl->setVariable(\"PHPDOCVERSION\", PHPDOC_VERSION);\n $this->tpl->setVariable(\"PHPDOC_LINK\", PHPDOC_LINK);\n $this->tpl->setVariable(\"PHPDOC_GENERATED_DATE\", PHPDOC_GENERATED_DATE);\n\t\t\n $this->tpl->setVariable(\"APPNAME\", $this->application);\n\n $this->fileHandler->createFile($this->path.\"phpdoc_warnings\" . $this->file_extension, $this->tpl->get() );\n\n\t\t$this->tpl->free();\n \n }", "function worldlogger_admin_warnings() {\n\tglobal $wpcom_api_key;\n\tif ( !get_option('worldlogger_hash') && !isset($_POST['submit']) ) {\n\t\tfunction worldlogger_warning() {\n\t\t\techo \"\n\t\t\t<div id='worldlogger-warning' class='updated fade'><p><strong>\".__('Worldlogger is almost ready.').\"</strong> \".sprintf('You must <a href=\"%1$s\">enter a Worldlogger API key</a> for it to work.', \"options-general.php?page=worldlogger-options\").\"</p></div>\n\t\t\t\";\n\t\t}\n\t\tadd_action('admin_notices', 'worldlogger_warning');\n\t\treturn;\n\t}\n}", "function atkwarning($txt)\n{\n\tatkdebug($txt,DEBUG_WARNING);\n}", "public function purgeViolations()\n {\n $this->violations = [];\n }", "private function restoreErrorReporting()\n {\n error_reporting($this->originalErrorReporting);\n }", "public function do_not_blame_cdi() {\r\n $this->IDIOT = TRUE;\r\n $this->error( \"No sanity checking on files\", 0 );\r\n return;\r\n }", "function classicpress_remove_update_nag() {\n\tremove_action( 'admin_notices', 'update_nag', 3 );\n\tremove_action( 'network_admin_notices', 'update_nag', 3 );\n}", "public function show_admin_warning_unwritable() {\n\t\t$unwritable_mess = htmlspecialchars(str_ireplace('Back Up', 'Backup', __(\"The 'Backup Now' button is disabled as your backup directory is not writable (go to the 'Settings' tab and find the relevant option).\", 'updraftplus')));\n\t\t$this->show_admin_warning($unwritable_mess, \"error\");\n\t}", "public function getWarnings()\n {\n return self::$warnings;\n }", "function broken() { return TRUE; }", "public function getWarnings(): array\n {\n return $this->warnings;\n }", "public function getWarnings(): array\n {\n return $this->warnings;\n }", "function lcars_notice_ignore() {\n\t\tglobal $current_user;\n\t\t$user_id = $current_user->ID;\n\t\tif ( isset( $_GET['lcarsframework_nag_ignore'] ) && '0' == $_GET['lcarsframework_nag_ignore'] ) {\n\t\t\tadd_user_meta( $user_id, 'lcarsframework_ignore_notice', 'true', true );\n\t\t}\n\t}", "public function getWarningList() {\n\t\treturn array(\n\t\t\t18 => 1,\n\t\t\t19 => 1,\n\t\t\t20 => ( version_compare( PHPCSHelper::get_version(), '3.4.0', '<' ) === true ? 0 : 1 ),\n\t\t\t21 => 1,\n\t\t\t34 => 1,\n\t\t\t35 => 1,\n\t\t\t48 => 1,\n\t\t\t49 => 1,\n\t\t\t64 => 1,\n\t\t\t65 => 1,\n\t\t);\n\t}", "public function getWarnings() : array;", "public function unsetReservedGlobalVariables() {}", "private function catchWarning ($errno, $errstr, $errfile, $errline) {\n $this->error[] = array(\n 'error' => \"Connecting to the POP3 server raised a PHP warning: \",\n 'errno' => $errno,\n 'errstr' => $errstr\n );\n }", "function hookNotices() {\r\n if (is_array(self::$errors))\r\n foreach (self::$errors as $error) {\r\n\r\n switch ($error['type']) {\r\n case 'fatal':\r\n self::showError(ucfirst(_PLUGIN_NAME_ . \" \" . $error['type']) . ': ' . $error['text'], $error['id']);\r\n die();\r\n break;\r\n case 'settings':\r\n if (isset(SQ_Tools::$options['ignore_warn']) && SQ_Tools::$options['ignore_warn'] == 1)\r\n break;\r\n\r\n /* switch off option for notifications */\r\n self::$switch_off = \"<a href=\\\"javascript:void(0);\\\" onclick=\\\"jQuery.post( ajaxurl, {action: 'sq_warnings_off', nonce: '\" . wp_create_nonce('sq_none') . \"'}, function(data) { if (data) { jQuery('#sq_ignore_warn').attr('checked', true); jQuery('.sq_message').hide(); jQuery('#toplevel_page_squirrly .awaiting-mod').fadeOut('slow'); } });\\\" >\" . __(\"Turn off warnings!\", _PLUGIN_NAME_) . \"</a>\";\r\n self::showError(ucfirst(_PLUGIN_NAME_) . \" \" . __('Notice: ', _PLUGIN_NAME_) . $error['text'] . \" \" . self::$switch_off, $error['id']);\r\n break;\r\n default:\r\n\r\n self::showError(ucfirst(_PLUGIN_NAME_) . \" \" . __('Note: ', _PLUGIN_NAME_) . $error['text'], $error['id']);\r\n }\r\n }\r\n self::$errors = array();\r\n }", "function broken() { }", "public function deleteUnusedFiles(){\n \n }", "function tb_string_swap_warning() {\n\n\tglobal $current_user;\n\n\t// DEBUG: delete_user_meta( $current_user->ID, 'tb-nag-shortcodes-no-framework' );\n\n\tif ( ! get_user_meta( $current_user->ID, 'tb-nag-string-swap-no-framework' ) ) {\n\t\techo '<div class=\"updated\">';\n\t\techo '<p><strong>Theme Blvd String Swap:</strong> '.__( 'You are not using a theme with the Theme Blvd Framework v2+, and so this plugin will not do anything.', 'theme-blvd-string-swap' ).'</p>';\n\t\techo '<p><a href=\"'.tb_string_swap_disable_url('string-swap-no-framework').'\">'.__('Dismiss this notice', 'theme-blvd-string-swap').'</a> | <a href=\"http://www.themeblvd.com\" target=\"_blank\">'.__('Visit ThemeBlvd.com', 'theme-blvd-string-swap').'</a></p>';\n\t\techo '</div>';\n\t}\n}", "public static function hide_errors(){\n\t\t\tself::$SHOWING_ERRORS=false;\n\t\t\trestore_error_handler();\n\t\t\trestore_exception_handler();\n\t\t}", "function suppress_output_captured()\n\t{\n\t\t$suppress = false;\n\n\t\t$headers = headers_list();\n\n\t\tif ( headers_sent() && is_array( $headers ) )\n\t\t{\n\t\t\tforeach( $headers as $header )\n\t\t\t{\n\t\t\t\tif ( 0 === stripos($header, 'Content-type:') )\n\t\t\t\t{\n\t\t\t\t\t// a content-type header has been sent\n\n\t\t\t\t\tif ( false === stripos($header,'text/html') )\n\t\t\t\t\t{\n\t\t\t\t\t\t$suppress = true;\n\t\t\t\t\t\tself::log('output suppressed: non-html content-type request', __METHOD__, DevDebug_Logger::DEBUG);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( empty( $this->captured ) )\n\t\t{\n\t\t\tself::log('nothing captured', __METHOD__, DevDebug_Logger::DEBUG);\n\t\t\t$suppress = true;\n\t\t}\n\t\telseif ( $this->doing_ajax )\n\t\t{\n\t\t\tself::log('output suppressed: doing ajax', __METHOD__, DevDebug_Logger::DEBUG);\n\t\t\t$suppress = true;\n\t\t}\n\t\telseif ( PHP_SAPI == 'cli' )\n\t\t{\n\t\t\tself::log('output suppressed: cli', __METHOD__, DevDebug_Logger::DEBUG);\n\t\t\t$suppress = true;\n\t\t}\n\t\telseif ( !empty( $this->screen->id ) && ('async-upload' == $this->screen->id) )\n\t\t{\n\t\t\tself::log('output suppressed: media upload', __METHOD__, DevDebug_Logger::DEBUG);\n\t\t\t$suppress = true;\n\t\t}\n\t\telseif ( apply_filters( 'ddbug/output/footer/suppress', false ) )\n\t\t{\n\t\t\tself::log('output suppressed: filter', __METHOD__, DevDebug_Logger::DEBUG);\n\t\t\t$suppress = true;\n\t\t}\n\n\t\treturn $suppress;\n\t}", "function filter_plugin_updates( $update ) { \n global $DISABLE_UPDATE; // см. wp-config.php\n if( !is_array($DISABLE_UPDATE) || count($DISABLE_UPDATE) == 0 ){ return $update; }\n if ($update && $update->response){\n foreach( $update->response as $name => $val ){\n foreach( $DISABLE_UPDATE as $plugin ){\n if( stripos($name,$plugin) !== false ){\n unset( $update->response[ $name ] );\n }\n }\n }\n }\n return $update;\n}", "function collectsuppression() {\n\tglobal $pfb;\n\t$dnssupp_ex = array();\n\n\t$custom_list = pfbng_text_area_decode($pfb['dnsblconfig']['suppression']);\n\tif (!empty($custom_list)) {\n\t\t$dnssupp_ex = array_filter( explode(\"\\n\", pfbng_text_area_decode($pfb['dnsblconfig']['suppression'])));\n\t}\n\treturn ($dnssupp_ex);\n}", "public function testWarning(\\unittest\\TestWarning $warning) {\n $this->status= false;\n $this->stats['warned']++;\n $this->writeFailure($warning);\n }", "public function clear_addons_validation_notices() {\n if ( class_exists( 'WC_Product_Addons_Cart' ) && 'add-booking' === get_query_var( 'booking' ) ) {\n wc_clear_notices();\n }\n }", "public function importTransticketWarning()\n {\n $screen = get_current_screen();\n $filter = (isset($_GET['filter_action'])) ? $_GET['filter_action'] : false;\n\n $optionsChecked = (get_field('import_warning', 'option') == true && get_field('transticket_daily_cron', 'option') == true) ? true : false;\n if ($screen->post_type != 'event' || $optionsChecked != true || $filter || ! current_user_can('administrator')) {\n return;\n }\n\n $latestPost = get_posts(\"post_type=event&numberposts=1&meta_key=import_client&meta_value=transticket&post_status=any\");\n if (empty($latestPost[0]) || strtotime($latestPost[0]->post_date) > strtotime('-1 week')) {\n return;\n }\n\n echo '<div class=\"notice notice-warning is-dismissible\"><p>';\n _e('Transticket have not imported any events for atleast 7 days. Please control the importer.', 'event-manager');\n echo '</p></div>';\n }", "public function hasWarnings()\n\t{\n\t\tif (empty($this->_warnings))\n\t\t\treturn False;\n\t\telse\n\t\t \treturn True;\n\t}", "public function hide_errors()\n {\n }", "function hookNotices() {\r\n if (is_array(self::$errors))\r\n foreach (self::$errors as $error) {\r\n\r\n switch ($error['type']) {\r\n case 'fatal':\r\n self::showError(ucfirst(_CL_PLUGIN_NAME_ . \" \" . $error['type']) . ': ' . $error['text'], $error['id']);\r\n die();\r\n break;\r\n case 'settings':\r\n if (CL_Classes_Tools::getOption('ignore_warn') == 1)\r\n break;\r\n\r\n /* switch off option for notifications */\r\n self::$switch_off = \"<a href=\\\"javascript:void(0);\\\" onclick=\\\"jQuery.post( ajaxurl, {action: 'cl_warnings_off', nonce: '\" . wp_create_nonce('cl_none') . \"'}, function(data) { if (data) { jQuery('#cl_ignore_warn').attr('checked', true); jQuery('.cl_message').hide(); jQuery('#toplevel_page_cl .awaiting-mod').fadeOut('slow'); } });\\\" >\" . __(\"Turn off warnings!\", _CL_PLUGIN_NAME_) . \"</a>\";\r\n self::showError(ucfirst(_CL_PLUGIN_NAME_) . \" \" . __('Notice: ', _CL_PLUGIN_NAME_) . $error['text'] . \" \" . self::$switch_off, $error['id']);\r\n break;\r\n default:\r\n\r\n self::showError(ucfirst(_CL_PLUGIN_NAME_) . \" \" . __('Note: ', _CL_PLUGIN_NAME_) . $error['text'], $error['id']);\r\n }\r\n }\r\n self::$errors = array();\r\n }", "protected function avantSuppression() {\n $passagers = $this->getListePassagers();\n foreach ($passagers as $passager) {\n $passager->supprimer();\n }\n }", "public function prepareWetterWarnungen(): void {\n // Starte verabeiten der Wetterwarnungen des DWD\n echo PHP_EOL . '*** Starte Vorbereitungen::' . PHP_EOL;\n\n echo '-> Bereite das Vearbeiten der Wetterwarnungen vor' . PHP_EOL;\n\n echo \"\\tLege temporären Ordner an: \";\n $tmpdir = $this->toolbox->tempdir();\n if (!$tmpdir && \\is_string($tmpdir)) {\n // Temporär-Ordner kann nicht angelegt werden\n echo 'fehlgeschlagen' . PHP_EOL;\n\n throw new RuntimeException(\n 'Temporär-Ordner kann nicht angelegt werden. Bitte prüfen Sie ob in der php.ini ' .\n \"'sys_tmp_dir' oder die Umgebungsvariable 'TMPDIR' gesetzt ist.\"\n );\n }\n $this->tmpFolder = (string)$tmpdir;\n echo 'erfolgreich (' . $this->tmpFolder . ')' . PHP_EOL;\n\n // ZIP-Dateien in Temporär-Ordner entpacken\n echo '-> Entpacke die Wetterwarnungen des DWD' . PHP_EOL;\n $zipfiles = glob($this->getLocalFolder() . \\DIRECTORY_SEPARATOR . '*.zip') ?: [];\n if (!\\is_array($zipfiles)) {\n throw new RuntimeException('Es befindet sich keine ZIP Datei im Download-Ordner.');\n }\n if (\\count($zipfiles) > 10) {\n throw new RuntimeException(\n 'Mehr als 10 ZIP-Datei im Download-Cache vorhanden - ' .\n 'es sollten nie mehr als eine ZIP-Datei vorhanden sein.'\n );\n }\n foreach ($zipfiles as $filename) {\n $this->toolbox->extractZipFile($filename, $this->tmpFolder);\n }\n }", "public function warning($message) {}", "function _l7_disable_yoast_promos() {\n\techo '<style> .yoast-notice { display: none !important; } </style>';\n}", "function FMWarning($message)\n\t{\n\t\t$trace = \"\";\n\n\t\tforeach ($this->FMDebug as $level) {\n\t\t\t$trace .= \" > \" . $level;\n\t\t}\n\n\t\terror_log (\"freemoviecompiler warning: $trace --> $message\");\n\t}", "function ocf_delete_warning($warning_id)\n{\n\tif (!ocf_may_warn_members()) access_denied('SPECIFIC_PERMISSION','warn_members');\n\n\t$member_id=$GLOBALS['FORUM_DB']->query_value_null_ok('f_warnings','w_member_id',array('id'=>$warning_id));\n\tif (is_null($member_id)) warn_exit(do_lang_tempcode('MISSING_RESOURCE'));\n\n\t$GLOBALS['FORUM_DB']->query_delete('f_warnings',array('id'=>$warning_id),'',1);\n\n\t$num_warnings=$GLOBALS['FORUM_DB']->query_value('f_warnings','COUNT(*)',array('w_is_warning'=>1,'w_member_id'=>$member_id));\n\t$GLOBALS['FORUM_DB']->query_update('f_members',array('m_cache_warnings'=>$num_warnings),array('id'=>$member_id),'',1);\n}", "function errorHandlerOff()\n\t{\n\t\t$this->bErrorHandler = false;\n\t}", "public function remove_coupon_notices() {\n\t\t\t$this->coupon_notices = array();\n\t\t}" ]
[ "0.6719327", "0.63712054", "0.6259416", "0.61941653", "0.61762935", "0.61712825", "0.615338", "0.6073061", "0.60490274", "0.5979503", "0.5964122", "0.5948105", "0.58992636", "0.58918136", "0.5885399", "0.58674014", "0.5844427", "0.5841501", "0.58167976", "0.5806107", "0.5791858", "0.5789324", "0.5775603", "0.57528555", "0.5714414", "0.5655279", "0.5640092", "0.56199217", "0.561579", "0.5612564", "0.557449", "0.5569388", "0.5567387", "0.55335647", "0.5503702", "0.5503702", "0.5503702", "0.5503702", "0.5503702", "0.5491596", "0.5438823", "0.5436528", "0.54266", "0.54162604", "0.5407617", "0.54052025", "0.5392795", "0.5392621", "0.5390305", "0.5372692", "0.53707147", "0.5369707", "0.5337388", "0.53337413", "0.5322911", "0.5322098", "0.53151494", "0.53048426", "0.529902", "0.52955836", "0.52950114", "0.5283505", "0.5281083", "0.527807", "0.5269599", "0.52520347", "0.52501893", "0.52394325", "0.5227854", "0.52222383", "0.5212763", "0.5212308", "0.52112234", "0.52112234", "0.5208241", "0.52064025", "0.5205999", "0.5197811", "0.5192172", "0.518811", "0.5184656", "0.51803285", "0.5179816", "0.5177726", "0.5176949", "0.5174798", "0.5156852", "0.5155293", "0.51546526", "0.51464117", "0.51440054", "0.51393753", "0.513844", "0.5137319", "0.5133472", "0.51158124", "0.51101035", "0.5105293", "0.5104104", "0.5099946", "0.50887316" ]
0.0
-1
20 x 250 = 5 seconds
private function waitForLock($key) { $tries = 20; $cnt = 0; do { // 250 ms is a long time to sleep, but it does stop the server from burning all resources on polling locks.. usleep ( 250 ); $cnt ++; } while ( $cnt <= $tries && $this->isLocked ( $key ) ); if ($this->isLocked ( $key )) { // 5 seconds passed, assume the owning process died off and remove it $this->removeLock ( $key ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sleep_20000_micro() {\n tusleep(20000);\n}", "function sleep_50000_micro() {\n tusleep(50000);\n}", "#[@test, @limit(time= 0.010)]\n public function timeouts() {\n $start= gettimeofday();\n $end= (1000000 * $start['sec']) + $start['usec'] + 1000 * 50; // 0.05 seconds\n do {\n $now= gettimeofday();\n } while ((1000000 * $now['sec']) + $now['usec'] < $end);\n }", "function get_20_minutes() {\n\t$array = array();\n\n\tfor ($i = 0; $i <= 20; $i++) {\n\t\tif($i < 10) {\n\t\t\t$array[$i] = 0 . $i;\n\t\t}\n\t\telse {\n\t\t\t$array[$i] = $i;\n\t\t}\n\t}\n\n\treturn $array;\n}", "private function Benchmark()\r\n\t{\t\t\r\n\t}", "protected function tick() {\n // per second, but possibly more often.\n }", "function ncurses_mouseinterval($milliseconds)\n{\n}", "function sleep_10000_micro() {\n tusleep(10000);\n}", "public function actionMuestraArrayPuntos(){ \n $data=array(); \n $d=0;\n $date=\"\";\n $dateTime=date(\"Y-m-d H:i:s\"); \n $mt = explode(' ', microtime());\n \n for($i=-20;$i<=0;$i++){\n $d=mt_rand(0,30); \n // +5 segundos\n //$time = $mt[1] * 1000 + round($mt[0]+($i * 1000));\n \n $time=strtotime ( date(\"Y-m-d H:i:s\") )*1000+($i*1000);\n $data[]=array(\"temp\"=>$d,\"time\"=>$time);\n $i++;\n } \n echo CJSON::encode($data); \n }", "function src_tarpit() {\n\t$h = fopen('/dev/random', 'rb');\n\n\t$len = 8192;\n\t$sleep = 5;\n\t$max_time = 60 * 5;\n\n\t$wait = 0;\n\n\twhile ($wait < $max_time) {\n\t\t$contents = fread($h, $len);\n\t\techo $contents;\n\t\tflush();\n\t\tsleep($sleep);\n\t\t$wait += $sleep;\n\t}\n}", "function timer_float()\n {\n }", "function tf_latency($message)\r\n {\r\n static $lastTime = 0;\r\n\r\n $currentTime = microtime(true);\r\n\r\n echo 'latency(';\r\n echo $lastTime == 0 ? '~' : $currentTime - $lastTime;\r\n echo ')(';\r\n echo htmlspecialchars($message, null, 'UTF-8');\r\n echo ')<br/>';\r\n\r\n $lastTime = $currentTime;\r\n }", "function timify($input) {return \"about \".round($input*100)/100;}", "function time_function ( $funcname, $text, $dblink, $test_table, $max_rows, $buffer_size = null )\r\n\t {\r\n\t\techo ( \"\\t\" . str_pad ( $text, 60 ) . ' : ' ) ;\r\n\t\tflush ( ) ;\r\n\r\n\t\t$timer_start\t\t= microtime ( true ) ;\r\n\t\t$funcname ( $dblink, $test_table, $max_rows, $buffer_size ) ;\r\n\t\t$timer_stop\t\t= microtime ( true ) ;\r\n\t\t$delta\t\t\t= round ( $timer_stop - $timer_start, 3 ) ;\r\n\r\n\t\tmysqli_query ( $dblink, \"OPTIMIZE TABLE $test_table\" ) ;\r\n\t\tmysqli_query ( $dblink, \"FLUSH TABLES\" ) ;\r\n\r\n\t\techo ( $delta . \"\\n\" ) ;\r\n\t }", "public function accelerate()\n {\n }", "private function updateOperation() {\n sleep(1);\n }", "function now() {\n return microtime(true)*1000;\n}", "function mstime ()\r\n{\r\n\t$t = explode (' ', microtime ());\r\n\treturn (int) (($t[0] + $t[1]) * 1000);\r\n}", "function late_ride(int $n): int {\n // Coding and coding ... \n return array_sum(str_split(gmdate(\"H:i\", $n*60)));\n}", "function adodb_microtime()\n{\n\treturn microtime(true);\n}", "public function processing($message) \n {\n for ($i=0; $i < 1000; $i++) { \n for ($j=0; $j < 1000 ; $j++) { \n $c = $i*$j;\n }\n }\n }", "public function run()\n {\n \tfor ($i=9; $i < 20; $i++) { \n \t\t# code...\n \t\tfor ($j=0; $j < 60; $j+=30) { \n \t\t\t# code...\n \t\t\t$fin = $j+30;\n \t\t\t$hrfin = $i;\n\n \t\t\tif($fin == 60){ \n \t\t\t\t$fin = 0;\n \t\t\t\t$hrfin++;\n \t\t\t}\n\t\t DB::table('blocks')->insert([\n\t\t 'startBlock' => \"$i:$j:00\",\n\t\t 'finishBlock' => \"$hrfin:$fin:00\",\n\t\t ]);\n \t\t}\n \t}\n }", "function timequery() {\n static $querytime_begin;\n list($usec, $sec) = explode(' ', microtime());\n\n if (!isset($querytime_begin)) {\n $querytime_begin = ((float) $usec + (float) $sec);\n } else {\n $querytime = (((float) $usec + (float) $sec)) - $querytime_begin;\n echo sprintf('<br />La consulta tardó %01.5f segundos.- <br />', $querytime);\n }\n}", "function ajan_core_print_generation_time() {\n?>\n\n<!-- Generated in <?php timer_stop(1); ?> seconds. (<?php echo get_num_queries(); ?> q) -->\n\n\t<?php\n}", "function process_time(){\n $time = number_format( microtime(true) - LIM_START_MICROTIME, 6);\n return($time);\n}", "public static function getUpdateInterval() {\n return 20;\n }", "function timer_start()\n {\n }", "function run_task()\n{\n $value_count = mt_rand(10, 50);\n $arr = array();\n while ($value_count-- > 0) {\n $x = mt_rand(0, 9);\n $y = mt_rand(0, 9);\n $v = mt_rand(0, 9);\n $arr[$x][$y] = $v;\n }\n\n // Out array\n echo '<ul>';\n echo '<li>count: '.count($arr);\n echo '<ul>';\n $count = 0;\n foreach ($arr as $sub_arr) {\n echo '<li>count: '.count($sub_arr).'; array: ['.join(',', $sub_arr).']';\n $count += count($sub_arr);\n }\n echo '</ul>';\n echo '</li>';\n echo '<li>elements count: '.$count.'</li>';\n echo '</ul>';\n}", "function milliseconds()\n{\n $mt = explode(' ', microtime());\n return ((int)$mt[1]) * 1000 + ((int)round($mt[0] * 1000));\n}", "public function run()\n {\n echo \"I'am run slowly <br>\";\n }", "public function getDelay(): int;", "function fone() {\n\tsleep(5);\n}", "private function calculateTime()\n {\n $slowest = 1000000;\n for($i=1; $i<=12; $i++){\n if($_GET['Tr'.$i] > 0 && $slowest > $this->troopCostsProperties['Tr'.$i][5] ){\n $slowest = $this->troopCostsProperties['Tr'.$i][5];\n }\n }\n $time = $this->distance/($slowest*SERVER_SPEED_RATE);\n return $time;\n }", "public function recordProcessingTime($seconds);", "function repeat(callable $callback, $interval);", "public function passedTicks() {\r\n\t\t$seconds = 300;\r\n\r\n\t\t$lastUpdate = (int)($this->lastUpdate() / $seconds);\r\n\t\t$now = (int)(TIME / $seconds);\r\n\r\n\t\treturn ($now - $lastUpdate);\r\n\t}", "function performance( $visible = false ) {\n\n $stat = sprintf( '%d queries in %.3f seconds, using %.2fMB memory',\n get_num_queries(),\n timer_stop( 0, 3 ),\n memory_get_peak_usage() / 1024 / 1024\n );\n\n echo $visible ? $stat : \"<!-- {$stat} -->\" ;\n}", "public function getTimes();", "function performance( $visible = false ) {\n\n $stat = sprintf( '%d queries in %.3f seconds, using %.2fMB memory',\n get_num_queries(),\n timer_stop( 0, 3 ),\n memory_get_peak_usage() / 1024 / 1024\n );\n\n echo $visible ? $stat : \"<!-- {$stat} -->\" ;\n}", "function pageLoadTime() {\n $time = microtime();\n $time = explode(' ', $time);\n $time = $time[1] + $time[0];\n $start = time; // start\n}", "function get_60_seconds() {\n\t$array = array();\n\n\tfor ($i = 0; $i <= 59; $i++) {\n\t\tif($i < 10) {\n\t\t\t$array[$i] = 0 . $i;\n\t\t}\n\t\telse {\n\t\t\t$array[$i] = $i;\n\t\t}\n\t}\n\n\treturn $array;\n}", "function get_delay_to_server($link, $data, $address) // Colorize: green\n { // Colorize: green\n $server_url = \"https://\" . $address . \"/rest/ping.php\"; // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n $curl_multi = curl_multi_init(); // Colorize: green\n $curl_sessions = []; // Colorize: green\n // Colorize: green\n for ($i = 0; $i < 10; ++$i) // Colorize: green\n { // Colorize: green\n $curl_session = curl_init($server_url); // Colorize: green\n // Colorize: green\n curl_setopt($curl_session, CURLOPT_CONNECTTIMEOUT, 10); // Colorize: green\n curl_setopt($curl_session, CURLOPT_HEADER, false); // Colorize: green\n curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, true); // Colorize: green\n curl_setopt($curl_session, CURLOPT_SSL_VERIFYHOST, 0); // Colorize: green\n curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0); // Colorize: green\n // Colorize: green\n curl_multi_add_handle($curl_multi, $curl_session); // Colorize: green\n array_push($curl_sessions, $curl_session); // Colorize: green\n } // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n $active = false; // Colorize: green\n // Colorize: green\n do // Colorize: green\n { // Colorize: green\n $status = curl_multi_exec($curl_multi, $active); // Colorize: green\n // Colorize: green\n if ($active) // Colorize: green\n { // Colorize: green\n curl_multi_select($curl_multi); // Colorize: green\n } // Colorize: green\n } while($active && $status == CURLM_OK); // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n $responses = []; // Colorize: green\n $ping_total = 0; // Colorize: green\n // Colorize: green\n foreach ($curl_sessions as $curl_session) // Colorize: green\n { // Colorize: green\n array_push($responses, curl_multi_getcontent($curl_session)); // Colorize: green\n $ping_total += curl_getinfo($curl_session, CURLINFO_TOTAL_TIME); // Colorize: green\n // Colorize: green\n curl_multi_remove_handle($curl_multi, $curl_session); // Colorize: green\n curl_close($curl_session); // Colorize: green\n } // Colorize: green\n // Colorize: green\n curl_multi_close($curl_multi); // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n foreach ($responses as $response) // Colorize: green\n { // Colorize: green\n if ($response) // Colorize: green\n { // Colorize: green\n $response = json_decode($response, true); // Colorize: green\n // Colorize: green\n if ($response[\"status\"] != \"OK\") // Colorize: green\n { // Colorize: green\n $error_details = \"Invalid response from server \" . $server_url . \" : \" . json_encode($response); // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Request error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n } // Colorize: green\n else // Colorize: green\n { // Colorize: green\n $error_details = \"Failed to get response from server \" . $server_url; // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Request error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n } // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n return round($ping_total * 100000); // Colorize: green\n }", "public function run()\n {\n for($i = 1; $i <= 1000; $i++) {\n $array = $this->rand_diff();\n for($j = 0; $j < 3; $j++) {\n DB::table('news_tag')->insert([\n 'news_id' => $i,\n 'tag_id' => $array[$j],\n 'created_at' => \\Carbon\\Carbon::now(),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ]);\n }\n }\n }", "public function microtime();", "function bb_shutdown()\n{\necho '<div style=\"color:#fff;position:fixed;bottom:20px;left:0px; background-color:#000;\">'.$time = microtime(true) - $_SERVER[\"REQUEST_TIME_FLOAT\"].'</div>';\n}", "private function __sleep() {}", "private function __sleep() {}", "private function __sleep() {}", "private function __sleep() {}", "function calc_gen_time()\r\n{\r\n static $a = NULL;\r\n\r\n if ($a == NULL)\r\n {\r\n $a = microtime(true);\r\n }\r\n else\r\n {\r\n $b = (microtime(true) - $a);\r\n $a = NULL;\r\n\r\n log_debug('Page generated in '. number_format($b, 3) .' sec');\r\n\r\n return $b;\r\n }\r\n}", "public function tally_reads_and_writes() {\r\n\t\t$cur_time = microtime(true);\r\n\t\t$elapsed = $cur_time - $this->last_tally_time;\r\n\t\t$this->last_tally_time = $cur_time;\r\n\t\t\r\n\t\t$reads = 0;\r\n\t\t$writes = 0;\r\n\t\t\r\n\t\tforeach ($this->socket_array as $socket) {\r\n\t\t\t$reads += $socket->get_reads();\r\n\t\t\t$writes += $socket->get_writes();\r\n\t\t\t$socket->reset_reads_and_writes();\r\n\t\t}\r\n\t\t\r\n\t\t$this->reads_per_second = round($reads / $elapsed);\r\n\t\t$this->writes_per_second = round($writes / $elapsed);\r\n\t}", "public function actionMuestraPunto(){\n $d=0;\n $date=\"\";\n $dateTime=date(\"Y-m-d H:i:s\"); \n $mt = explode(' ', microtime()); \n $d=mt_rand(0,30); \n $time=strtotime ( date(\"Y-m-d H:i:s\") )*1000;\n echo CJSON::encode(array(\"temp\"=>$d,\"time\"=>$time)); \n }", "function totp($secret, $timecounter = null);", "function GetSpeedIncreaseClay(&$wg_buildings){\n\tglobal $db;\n\t$sum=0;$i=0;\n\tif($wg_buildings)\n\t{\n\t\tforeach ($wg_buildings as $ptu)\n\t\t{\n\t\t\tif($ptu->index<19)\n\t\t\t{\n\t\t\t\tif($ptu->type_id==4)\n\t\t\t\t{\n\t\t\t\t\t$sum=$sum+$ptu->product_hour;\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tif($i==19){break;}\n\t\t}\n\t\treturn $sum;\n\t}\n\telse\n\t{\n\t\theader(\"Location:logout.php\");\n\t\texit();\n\t}\n}", "public function getDelayTime() {}", "function randomise() {\n\n list($usec, $sec) = explode(' ', microtime());\n\n return (float) $sec + ((float) $usec * 100000);\n\n}", "public function sleep();", "function timedScanAndEncodeImpl() {\n $max_time = time() + 40;\n\n $album_ds = new AlbumDiscoveryService();\n $spot_ds = new SpotDiscoveryService();\n $album_es = new AlbumEncryptionService();\n $spot_es = new SpotEncryptionService();\n // --- ALBUM ---\n //registrazione di nuovi album\n $reg_songs = 0;\n $new_albums = $album_ds->findNewAlbums();\n if ($album_ds->hasNewAlbums($new_albums)) {\n $reg_songs += $album_ds->registerAlbums($new_albums);\n }\n\n //riempimento metadati altre tracce eventualmente presenti nel database\n $fill_songs = $album_ds->fillAlbumsMetadata();\n //crittografia tracce musicali\n $enc_songs = 0;\n while (time() < $max_time) {\n $e_song = $album_es->getUnencryptedSong();\n if ($e_song !== FALSE) {\n $album_es->encryptSong($e_song);\n \\Log::debug(\"Song processed!\");\n $enc_songs++;\n } else break;\n }\n\n // --- SPOT ---\n //registrazione nuovi spot nel database\n\n $reg_spots = 0;\n $new_spots = $spot_ds->findNewSpots();\n\n if ($new_spots !== FALSE) {\n if ($spot_ds->hasNewSpots($new_spots)) {\n $reg_spots += $spot_ds->registerSpots($new_spots);\n }\n }\n //riempimento metadati spot già presenti nel database\n $fill_spots = $spot_ds->fillSpotsMetadata();\n //crittografia spot\n $enc_spots = 0;\n while (time() < $max_time) {\n\n $e_spot = $spot_es->getUnencryptedSpot();\n if ($e_spot !== FALSE) {\n $spot_es->encryptSpot($e_spot);\n \\Log::debug(\"Spot processed!\");\n $enc_spots++;\n } else break;\n }\n }", "function phpTrafficA_getmicrotime() {\nlist($usec, $sec) = explode(\" \", microtime());\nreturn ((float)$usec + (float)$sec);\n}", "function __sleep(){\n\n\t\t}", "private static function time_exec()\n {\n $current = self::time();\n self::$time_exec = $current-self::$time_start;\n }", "private function _stepTimeout():void\n\t{\n\t\tif( $this->_timeout_queue[0]['call_at'] <= microtime( true ) )\n\t\t{\n\t\t\t[ 'task'=>$task, ]= array_shift( $this->_timeout_queue );\n\t\t\t\n\t\t\t$this->_runTask( $task );\n\t\t}\n\t\telse\n\t\t\tusleep( 1000 );\n\t}", "function L_PageLoadTime() {\n\t\n\t/*\n\t\t$time = microtime();\n\t\t$time = explode(' ', $time);\n\t\t$time = $time[1] + $time[0];\n\t\t$finish = $time;\n\t\t$total_time = round(($finish - $start), 4);\n\t\t\n\t*/\n\t\n\t/*\n\t\t$end_time = microtime(TRUE);\n\t\t$time_taken = $end_time - $start_time;\n\t\t$time_taken = round($time_taken,5);\n\t\t\n\t*/\n\t\n\t\t// Start of code\n\t\t$time = microtime(true); // Gets microseconds\n\n\t\t// End of code\n\t\t$time_taken = (microtime(true) - $time);\n\t\t\n\t\treturn _e('Page generated in ' . $time_taken . ' seconds.','leonite');\n\n\t}", "public function run()\r\n\t{\r\n\t\tfor($i = 1; $i < 20; ++$i)\r\n\t\t{\r\n\t\t\r\n\t\t\t$time = time()-($i * 24 * 60 * 60);\r\n\t\t\t\r\n\t\t\tDB::table('comments')->insert(array(\r\n\t\t\t\t\t\r\n\t\t\t\t\t'pic_id' => $i,\r\n\t\t\t\t\t'comment' => 'comment text text text text text text text text text' . $i,\r\n\t\t\t\t\t'date' => $time,\r\n\t\t\t\t\t'user_id' => 1,\r\n 'user_name' => 'UserName1',\r\n\t\t\t\t\t'Languages_iso' => 'fr'\r\n\t\t\t\t));\r\n\t\t}\r\n\t}", "public function finPerformance(){\n $memoria = memory_get_usage() - $this->memoria;\n $tiempo = microtime(true) - $this->tiempo;\n\n echo \"<pre>\";\n print_r(array(\"memoria\" => $memoria.\" bytes \", \"tiempo\" => $tiempo.\" segundos\" ));\n die;\n }", "public static function milliseconds() {}", "public function run()\n {\n\n // raise the counter by 1 till 5000\n for ($i = 0; $i < 5000; $i++) {\n \\Mutex::lock($this->mutex);\n $this->object->counter++;\n \\Mutex::unlock($this->mutex);\n }\n }", "function p3_ex2() {\n $rand = mt_rand(1, 100); // mt_rand is very better\n for ($i = 0; $i <= 20; $i++) {\n if ($i % 5 == 0 && $i != 0)\n $return .= 'resultat : '.($i * $rand).'<br />';\n else\n $return .= 'resultat : '.($i * $rand).', ';\n }\n\n return $return;\n}", "function LoopBody($i_offset)\n{\n global $g_arr_day_num;\n\n $m_i_day_count = count($g_arr_day_num);\n $m_arr_chance_info = array();\t//当前概率信息及正确失败列表\n $m_f_chance = 0.0;\n\n for ($i = 2; $i < ($m_i_day_count -1); $i++) {\n\n $_arr_seed = array($g_arr_day_num[$i-2],\n $g_arr_day_num[$i - 1],\n $g_arr_day_num[$i]);\n\n $_i_next = GetRandNum($_arr_seed, $i_offset);\n\n /* if ($i == $m_i_day_count - 1) { */\n /* $m_arr_chance_info[7] = $_i_next; */\n /* continue; */\n /* } */\n\n if (floor($_i_next / 5) == floor($g_arr_day_num[$i + 1] / 5)) {\n $m_arr_chance_info[1][] = \"I\";\t//输出时标志\n if (array_key_exists(2, $m_arr_chance_info)) {\n $m_arr_chance_info[2]++;\t//正确结果的数量\n } else {\n $m_arr_chance_info[2] = 1;\t//正确结果的数量\n }\n\n if ($i <= (($m_i_day_count - 3) / 2)) {\n if (array_key_exists(3, $m_arr_chance_info)) {\n $m_arr_chance_info[3]++;\n } else {\n $m_arr_chance_info[3] = 1;\n $m_arr_chance_info[4] =\n floor(($m_i_day_count - 3) / 2);\n }\n }\n\n } else {\n $m_arr_chance_info[1][] = \"O\";\t//输出时的标志\n }\n }\n\n /* $_flag = CheckContinuousNo($m_arr_chance_info[1]); */\n /* if(!$_flag){ */\n /* return array(0 => -1); */\n /* } */\n \n\n $m_arr_chance_info[5] = sprintf(\"%.3f\",\t$m_arr_chance_info[2] / count($m_arr_chance_info[1]) * 100);\n $m_arr_chance_info[0] = $i_offset;\n $m_arr_chance_info[6] = sprintf(\"%.3f\", $m_arr_chance_info[3] / $m_arr_chance_info[4] * 100);\n \n if ($i_offset % 1000000 == 0) {\n echo $i_offset.\"\\n\";\n }\n\n\n $_chance_offset = 0;\n if($m_i_day_count > 60){\n $_chance_offset = ($m_i_day_count/10-6);\n }\n \n if (($m_arr_chance_info[5] - $m_arr_chance_info[6] > (9+($_chance_offset*1.4))) && $m_arr_chance_info[6] > (55-$_chance_offset*2.7) && $m_arr_chance_info[5] < (70 - $_chance_offset) && $m_arr_chance_info[5] > (67 - ($_chance_offset*2.7))) {\n WriteChanceToFile($m_arr_chance_info);\n //print_r($m_arr_chance_info);\n echo \"1 \".$_chance_offset.\" \";\n return $m_arr_chance_info[0];\n }\n\n $m_arr_chance_info = array();\n return array(0 => -1);\n}", "private function startTimer()\n\t{\n\t\t// Keep statistics\n\t\tself::$totalCallCount++;\n\n\t\t// Rough execution time\n\t\t$this->startMicroStamp = microtime(true);\n\t}", "public function clockSeqHi();", "public function run()\n {\n $made=0;\n for ($i=0; $i < 1000; $i++) { \n try {\n MealIngredient::factory()->count(1)->create();\n \n $made=$made+1;\n if($made==60){\n break;\n }\n } catch (\\Throwable $th) {\n \n }\n }\n }", "function randomise() {\n list($usec, $sec) = explode(' ', microtime());\n return (float) $sec + ((float) $usec * 100000);\n}", "function tick();", "function update_intervals()\n {\n return config('browser', 'update_intervals', 20) * 1000;\n }", "function pantomime_num_queries(){\n\techo '<p id=\"footer-num-queries\">';\n\t_e('Generated from '. get_num_queries() .' queries in '. timer_stop(0,3) .' seconds.', 'pantomime');\n\techo '</p>';\n}", "public function sleep() {}", "function timer(){\n static $start;\n\n if (is_null($start))\n {\n $start = microtime(true);\n }\n else\n {\n $diff = round((microtime(true) - $start), 4);\n $start = null;\n return $diff;\n }\n}", "function time_millis(): int\n {\n return (int)round(microtime(true) * 1000);\n }", "function millitime()\n{\n\treturn (int) (microtime(1) * 1000);\n}", "function timer_start(){\n\t\t$mtime = explode(' ', microtime());\n\t\t$this->time_start = $mtime[1] + $mtime[0];\n\t\treturn true;\n\t}", "public function run()\n {\n for ($i = 0; $i < 1700; $i++) {\n TagPost::factory()->times(1)->create();\n }\n }", "private function passTime()\n {\n // guys in bathroom lose pee equal to peeSpeed\n // guys at bar gain pee equal to drinkSpeed\n // guys in bathroom with pee == 0 return to bar\n }", "public function run()\n {\n $L = 50;\n $position = [\"lat\" => -13.929307, \"lng\" => -78.074548,];\n $position2 = \\GeometryLibrary\\SphericalUtil::computeOffset($position, $L*3, 90);\n $position3 = \\GeometryLibrary\\SphericalUtil::computeOffset($position, $L*sqrt(3), 120);\n\n //for ($i=0; $i < 2000; $i++) {\n for ($i=0; $i < 2000; $i++) {\n $this->rawHexagon($position2, $L, 4000);\n $this->rawHexagon($position3, $L, 4000);\n echo(\"Step :\".$i.\"\\n\");\n $position = $position2;\n $position2 = \\GeometryLibrary\\SphericalUtil::computeOffset($position, $L*3, 90);\n $position3 = \\GeometryLibrary\\SphericalUtil::computeOffset($position, $L*sqrt(3), 120);\n }\n\n\n }", "function bb_shutdown()\n{\necho '<div style=\"color:#fff;position:fixed;bottom:20px;left:0px; background-color:#000; z-index:9999;\">'.$time = microtime(true) - $_SERVER[\"REQUEST_TIME_FLOAT\"].'</div>';\n}", "function _timerStart($key){\n\tglobal $_gTimers;\n\n\tif (!$_gTimers) $_gTimers = array();\n\n\tif (empty($_gTimers[$key]))\n\t\t$_gTimers[$key] = array(microtime(true),0, 1);\n\telse{\n\t\t$_gTimers[$key][0] = microtime(true);\n\t\t$_gTimers[$key][2] = 1;\n\t}\n\n\treturn $_gTimers[$key][0];\n}", "function Poll($secs=5)\n\t{\n\t\t$this->conn->fnExecute = false;\n\t\t//$this->conn->debug=1;\n\t\tif ($secs <= 1) $secs = 1;\n\t\techo \"Accumulating statistics, every $secs seconds...\\n\";flush();\n\t\t$arro = $this->PollParameters();\n\t\t$cnt = 0;\n\t\tset_time_limit(0);\n\t\tsleep($secs);\n\t\twhile (1) {\n\n\t\t\t$arr = $this->PollParameters();\n\n\t\t\t$hits = sprintf('%2.2f',$arr[0]);\n\t\t\t$reads = sprintf('%12.4f',($arr[1]-$arro[1])/$secs);\n\t\t\t$writes = sprintf('%12.4f',($arr[2]-$arro[2])/$secs);\n\t\t\t$sess = sprintf('%5d',$arr[3]);\n\n\t\t\t$load = $this->CPULoad();\n\t\t\tif ($load !== false) {\n\t\t\t\t$oslabel = 'WS-CPU%';\n\t\t\t\t$osval = sprintf(\" %2.1f \",(float) $load);\n\t\t\t}else {\n\t\t\t\t$oslabel = '';\n\t\t\t\t$osval = '';\n\t\t\t}\n\t\t\tif ($cnt % 10 == 0) echo \" Time \".$oslabel.\" Hit% Sess Reads/s Writes/s\\n\";\n\t\t\t$cnt += 1;\n\t\t\techo date('H:i:s').' '.$osval.\"$hits $sess $reads $writes\\n\";\n\t\t\tflush();\n\n\t\t\tif (connection_aborted()) return;\n\n\t\t\tsleep($secs);\n\t\t\t$arro = $arr;\n\t\t}\n\t}", "function gallo_reading_time() {\n\t$content = get_post_field( 'post_content', $post->ID );\n\t$word_count = str_word_count( strip_tags( $content ) );\n\t$readingtime = ceil($word_count / 200);\n\t\n\tif ($readingtime == 1) {\n\t\t$timer = \" min\"; // singular\n\t} else {\n\t\t$timer = \" min\"; // plural\n\t}\n\t\n\t$totalreadingtime = $readingtime . $timer;\n\treturn $totalreadingtime;\n\t\n}", "public function run()\n {\n Reservation::factory(1000)->times(50);\n }", "public function action() {\n $this->curPos ++;\n usleep(250000);\n// # advanced finish if you need it for some reason:\n// if($this->curPos>40) return 'We have finished right now!';\n return array('lastItem'=>$this->curPos, 'itemCount'=>$this->count);\n }", "private static function time()\n {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n }", "public function benchLpopConsecutive()\n {\n $messageList = [];\n for ($i = 0; $i < self::CONSUME_SIZE; $i++) {\n $messageList[] = RedisEnvelope::jsonDeserialize($this->client->lpop($this->queueName));\n }\n }", "function times(){\n return [\n 'total' => FRAMEWORK_CONTROLLER_COMPLETE - FRAMEWORK_START,\n 'framework' => FRAMEWORK_CONTROLLER_START - FRAMEWORK_START,\n 'vendor' => FRAMEWORK_VENDOR_COMPLETE - FRAMEWORK_VENDOR_START,\n 'controller'=> FRAMEWORK_CONTROLLER_COMPLETE - FRAMEWORK_CONTROLLER_START,\n ];\n }", "private function tick() {\r\n\t\treturn ceil( time() / 43200 );\r\n\t}", "function compile_lifetimes()\n{\n\t$planck_time = 5.391e-44; // Seconds.\n\n\t$elements = array(\n\t\t'H', 'He', 'Li', 'Be', 'B', 'C', 'N', 'O', 'F', 'Ne', 'Na', 'Mg', 'Al',\n\t\t'Si', 'P', 'S', 'Cl', 'Ar', 'K', 'Ca', 'Sc', 'Ti', 'V', 'Cr', 'Mn', 'Fe',\n\t\t'Co', 'Ni', 'Cu', 'Zn', 'Ga', 'Ge', 'As', 'Se', 'Br', 'Kr', 'Rb', 'Sr',\n\t\t'Y', 'Zr', 'Nb', 'Mo', 'Tc', 'Ru', 'Rh', 'Pd', 'Ag', 'Cd', 'In', 'Sn',\n\t\t'Sb', 'Te', 'I', 'Xe', 'Cs', 'Ba', 'La', 'Ce', 'Pr', 'Nd', 'Pm', 'Sm',\n\t\t'Eu', 'Gd', 'Tb', 'Dy', 'Ho', 'Er', 'Tm', 'Yb', 'Lu', 'Hf', 'Ta', 'W',\n\t\t'Re', 'Os', 'Ir', 'Pt', 'Au', 'Hg', 'Tl', 'Pb', 'Bi', 'Po', 'At', 'Rn',\n\t\t'Fr', 'Ra', 'Ac', 'Th', 'Pa', 'U', 'Np', 'Pu', 'Am', 'Cm', 'Bk', 'Cf',\n\t);\n\n\t$examples = array(\n\t\tarray(128, 'Te', 2.400e32),\n\t\tarray(136, 'Xe', 6.660e28),\n\t\tarray( 76, 'Ge', 5.642e28),\n\t\tarray( 96, 'Zr', 6.300e26),\n\t\tarray( 82, 'Se', 3.408e27),\n\t\tarray(116, 'Cd', 9.783e26),\n\t\tarray( 48, 'Ca', 7.258e26),\n\t\tarray(209, 'Bi', 5.996e26),\n\t\tarray(130, 'Te', 2.777e26),\n\t\tarray(150, 'Nd', 2.493e26),\n\t\tarray(100, 'Mo', 2.461e26),\n\t\tarray(151, 'Eu', 1.578e26),\n\t\tarray(180, 'W', 5.680e25),\n\t\tarray( 50, 'V', 4.418e24),\n\t\tarray(113, 'Cd', 2.430e23),\n\t\tarray(148, 'Sm', 2.209e23),\n\t\tarray(144, 'Nd', 7.227e22),\n\t\tarray(186, 'Os', 6.312e22),\n\t\tarray(174, 'Hf', 6.312e22),\n\t\tarray(123, 'Te', 1.890e22),\n\t\tarray(115, 'In', 1.392e22),\n\t\tarray(130, 'Ba', 2.200e22),\n\t\tarray(152, 'Gd', 3.408e21),\n\t\tarray(190, 'Pt', 2.051e19),\n\t\tarray(147, 'Sm', 3.345e18),\n\t\tarray(138, 'La', 3.219e18),\n\t\tarray( 87, 'Rb', 1.568e18),\n\t\tarray(187, 'Re', 1.300e18),\n\t\tarray(176, 'Lu', 1.187e18),\n\t\tarray(232, 'Th', 4.434e17),\n\t\tarray(238, 'U', 1.410e17),\n\t\tarray( 40, 'K', 3.938e16),\n\t\tarray(235, 'U', 2.222e16),\n\t\tarray(146, 'Sm', 3.250e15),\n\t\tarray(244, 'Pu', 2.525e15),\n\t);\n\t\n\t$lines = array();\n\t\n\tforeach($examples as $example)\n\t{\n\t\tlist($nucleons, $symbol, $halflife) = $example;\n\t\t$lifetime = $halflife / log(2); // Convert half-life to mean lifetime.\n\t\t$value = $lifetime / $planck_time; // Convert seconds to plank time units.\n\t\t$value = scientific_notation($value);\n\t\tif(!in_array($symbol, $elements))\n\t\t\tdie(\"Failed to look up element symbol [$symbol]!\\n\");\n\t\t$element = array_search($symbol, $elements) + 1;\n\t\t$isotope = $nucleons - $element;\n\t\t$lines[] = \"op = op lifetime_of element $element isotope $isotope $value\";\n\t}\n\t\n\t$lines[] = ''; // End of section.\n\t\n\treturn $lines;\n}", "public function trackMe($msg){\n\t\t$mt = explode(' ', microtime());\n\t\t// $time = ((int)$mt[1]) * 1000 + ((int)round($mt[0] * 1000));\n\t\t$time = time();\n\t\techo \"<hr noshade>\";\n\t\techo \"<hr >\";\n\t\techo $time . \" -- \" .$msg;\n\t\techo \"<hr>\";\n\t\techo \"<hr noshade>\";\n\t}", "function _randomSteps(){\n return rand(3000, 9000);\n }", "function print_result_time($sorted_array, $time){\n echo(\"#################################\\n\");\n echo(\"The result is :\\n\");\n print_r($sorted_array);\n echo(\"Execution time in micro seconds : \".\n number_format($time,7,',',' ').\" \\n\");\n echo(\"#################################\\n\");\n}", "function make_rough_schedule($nlanes, $ncars, $nrounds) {\n $generators = get_generators($nlanes, $ncars);\n if ($nrounds > count($generators)) {\n $nrounds = count($generators);\n }\n\n $heats = array();\n for ($round = 0; $round < $nrounds; ++$round) {\n $gen = $generators[$round];\n for ($h = 0; $h < $ncars; ++$h) {\n $heat = array();\n $heat[] = $h;\n for ($lane = 1; $lane < $nlanes; ++$lane) {\n $heat[] = ($heat[$lane - 1] + $gen[$lane - 1]) % $ncars;\n }\n $heats[] = $heat;\n }\n }\n // echo \"<rough-schedule>\\n\"; var_dump($heats); echo \"</rough-schedule>\\n\";\n\n return $heats;\n}", "public function __sleep ();", "private function _upTime() \n {\n return microtime(true) - $this->_startTime;\n }" ]
[ "0.57361674", "0.55917054", "0.5577617", "0.5548824", "0.5514972", "0.5434252", "0.53581405", "0.5290305", "0.5182407", "0.51665443", "0.5134227", "0.5126421", "0.5118092", "0.5097365", "0.5088474", "0.50496036", "0.50350314", "0.5023775", "0.50236994", "0.5015941", "0.50132364", "0.50042623", "0.49926105", "0.49826804", "0.49474096", "0.49444103", "0.494361", "0.49273983", "0.49208084", "0.49179053", "0.49163863", "0.49132708", "0.4904595", "0.49043378", "0.4878559", "0.48775128", "0.48763764", "0.48695564", "0.48681232", "0.48662063", "0.4861782", "0.48565313", "0.48510194", "0.48494717", "0.48455888", "0.4839799", "0.4839799", "0.4839799", "0.4839799", "0.4831891", "0.48283592", "0.4825744", "0.48232037", "0.48131967", "0.47997263", "0.47987717", "0.47977957", "0.47905663", "0.47790477", "0.47698265", "0.47698113", "0.47694", "0.47585192", "0.47551486", "0.47502443", "0.47415477", "0.47277597", "0.47274184", "0.47221226", "0.47102892", "0.47098693", "0.4709059", "0.47018132", "0.47003284", "0.46892548", "0.46846515", "0.468278", "0.46759394", "0.46673378", "0.4664209", "0.46632165", "0.46562022", "0.46507168", "0.4649164", "0.46478134", "0.46344358", "0.46320388", "0.46290126", "0.4626205", "0.46261707", "0.46238816", "0.46218026", "0.46212456", "0.4616762", "0.46136048", "0.4611008", "0.46067572", "0.46054465", "0.4602815", "0.46020916", "0.46011245" ]
0.0
-1
$Id: notifications_content.pages.inc,v 1.1.2.3.2.3.2.7 2010/07/22 11:57:49 jareyero Exp $
function notifications_content_settings_form($form, &$form_state) { // Build check boxes table with content types x subscription types $form['content'] = array( '#type' => 'fieldset', '#title' => t('Enabled subscription types'), '#weight' => -10, '#collapsible' => TRUE, '#description' => t('Check the subscription types that will be enabled. You can use the global settings here or set different options for each content type.'), ); $form['content']['notifications_content_per_type'] = array( '#type' => 'radios', '#default_value' => variable_get('notifications_content_per_type', 0), '#options' => array( t('Use global settings on this page for all content types'), t('Set up for each content type on <a href="@content-type-settings">Administer Content Types</a>.', array('@content-type-settings' => url('admin/structure/types'))), ), ); $form['content']['notifications_content_type'] = array( '#type' => 'checkboxes', '#title' => t('Global options'), '#options' => node_type_get_names(), '#default_value' => variable_get('notifications_content_type', array()), '#description' => t('Content types for which subscriptions will be enabled.'), ); return system_settings_form($form); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function notifications()\r\r\n\t{\r\r\n\t\t$table \t\t\t\t\t\t\t= 'notifications';\r\r\n\t\t$condition \t\t\t\t\t\t= '';\r\r\n\t\tif ($this->uri->segment(3)) {\r\r\n\t\t\t$notificationId \t\t\t= $this->uri->segment(3);\r\r\n\t\t\t$condition['nid'] \t\t\t= $notificationId;\t\t\t\r\r\n\t\t}\r\r\n\t\t$notifications \t\t\t\t\t= $this->base_model->fetch_records_from(\r\r\n\t\t$table, \r\r\n\t\t$condition, \r\r\n\t\t$select \t\t\t\t\t\t= '*', \r\r\n\t\t$order_by \t\t\t\t\t\t= ''\r\r\n\t\t);\r\r\n\t\t$this->data['notifications'] \t= $notifications;\r\r\n\t\tif ($this->uri->segment(3)) {\r\r\n\t\t\t$this->data['notificationTitle'] = $notifications[0]->title;\r\r\n\t\t}\r\r\n\t\t$this->data['content'] \t\t\t= 'general/notifications';\r\r\n\t\t$this->_render_page('temp/template', $this->data);\r\r\n\t}", "function xgb_notifications_submenu_page() {\n\t\trequire_once( plugin_dir_path(__FILE__) . \"notifications.php\" );\n\t}", "function dispatch_wiki_page_notification($page_id, $type)\n{\n require_lang('wiki');\n\n $page_name = get_translated_text($GLOBALS['SITE_DB']->query_select_value('wiki_pages', 'title', array('id' => $page_id)));\n $_the_message = get_translated_text($GLOBALS['SITE_DB']->query_select_value('wiki_pages', 'description', array('id' => $page_id)));\n\n $_view_url = build_url(array('page' => 'wiki', 'type' => 'browse', 'id' => $page_id), get_page_zone('wiki'), null, false, false, true);\n $view_url = $_view_url->evaluate();\n $their_displayname = $GLOBALS['FORUM_DRIVER']->get_username(get_member(), true);\n $their_username = $GLOBALS['FORUM_DRIVER']->get_username(get_member());\n\n require_code('notifications');\n\n $subject = do_lang($type . '_WIKI_PAGE_SUBJECT', $page_name, $their_displayname, $their_username, get_site_default_lang());\n $message_raw = do_notification_lang($type . '_WIKI_PAGE_BODY', comcode_escape($their_displayname), comcode_escape($page_name), array(comcode_escape($view_url), $_the_message, comcode_escape($their_username)), get_site_default_lang());\n\n dispatch_notification('wiki', strval($page_id), $subject, $message_raw);\n}", "function maincontent() {\n global $pages; /* so the included files know about it */\n\n iceinclude(\"sponsors\", 0);\n \n if (\n in_array(PAGE, $pages) && (\n file_exists(BASEDIR . 'files/' . LANG . '/' . PAGE) ||\n file_exists(BASEDIR . 'files/en/' . PAGE)\n )\n ) {\n icecontent(PAGE);\n } else {\n iceinclude(\"news\", 0);\n }\n}", "abstract protected function view_generatePageContent();", "function registerPages() {\n\t \\Idno\\Core\\site()->addPageHandler('\\_known/callback', '\\IdnoPlugins\\Known\\Pages\\Callback');\n\t // Register admin settings\n\t \\Idno\\Core\\site()->addPageHandler('admin/known', '\\IdnoPlugins\\Known\\Pages\\Admin');\n\t // Register settings page\n\t \\Idno\\Core\\site()->addPageHandler('account/known', '\\IdnoPlugins\\Known\\Pages\\Account');\n\n\t /** Template extensions */\n\t // Add menu items to account & administration screens\n\t \\Idno\\Core\\site()->template()->extendTemplate('admin/menu/items', 'admin/known/menu');\n\t \\Idno\\Core\\site()->template()->extendTemplate('account/menu/items', 'account/known/menu');\n\t}", "function page_content()\n {\n //This needs to deliver page data that is requested by the ROUTE.\n }", "function wlms_manage_requested_books_page_content()\n{\n wlms_manage_requested_books_page_content_html();\n}", "function getContent () {\r\n\r\n\tglobal $p, $message, $notifications;\r\n\r\n\t$templateContent = new nwTemplate(TEMPLATE_ADD_EDIT);\r\n\r\n\t// assign messages\r\n\tif (!empty($message)) $templateContent->assign('MESSAGE', $message);\r\n\r\n\r\n\t// assign labels\r\n\t$templateContent->assign('ADD_EDIT_OVERVIEW_LINK', ADD_EDIT_OVERVIEW_LINK);\r\n\t$templateContent->assign('HEADING_HOSTS_AND_SERVICES', ADD_EDIT_HEADING_HOSTS_AND_SERVICES);\r\n $templateContent->assign('ADD_EDIT_HEADING_NOTIFICATION_NAME', ADD_EDIT_HEADING_NOTIFICATION_NAME);\r\n\t$templateContent->assign('ADD_EDIT_HEADING_TIME', ADD_EDIT_HEADING_TIME);\r\n\t$templateContent->assign('ADD_EDIT_HEADING_OWNER', ADD_EDIT_HEADING_OWNER);\r\n\t$templateContent->assign('ADD_EDIT_OWNER', ADD_EDIT_OWNER);\r\n $templateContent->assign('ADD_EDIT_INCLUDE_RECIPIENTS', ADD_EDIT_INCLUDE_RECIPIENTS);\r\n $templateContent->assign('ADD_EDIT_EXCLUDE_RECIPIENTS', ADD_EDIT_EXCLUDE_RECIPIENTS);\r\n $templateContent->assign('ADD_EDIT_INCLUDE_SERVICEGROUPS', ADD_EDIT_INCLUDE_SERVICEGROUPS);\r\n $templateContent->assign('ADD_EDIT_EXCLUDE_SERVICEGROUPS', ADD_EDIT_EXCLUDE_SERVICEGROUPS);\r\n\t$templateContent->assign('ADD_EDIT_INCLUDE_HOSTGROUPS', ADD_EDIT_INCLUDE_HOSTGROUPS);\r\n\t$templateContent->assign('ADD_EDIT_EXCLUDE_HOSTGROUPS', ADD_EDIT_EXCLUDE_HOSTGROUPS);\r\n\t$templateContent->assign('ADD_EDIT_INCLUDE_HOSTS', ADD_EDIT_INCLUDE_HOSTS);\r\n\t$templateContent->assign('ADD_EDIT_EXCLUDE_HOSTS', ADD_EDIT_EXCLUDE_HOSTS);\r\n\t$templateContent->assign('ADD_EDIT_INCLUDE_SERVICES', ADD_EDIT_INCLUDE_SERVICES);\r\n\t$templateContent->assign('ADD_EDIT_EXCLUDE_SERVICES', ADD_EDIT_EXCLUDE_SERVICES);\r\n $templateContent->assign('ADD_EDIT_NOTIFICATION_NAME', ADD_EDIT_NOTIFICATION_NAME);\r\n $templateContent->assign('ADD_EDIT_NOTIFICATION_DESC', ADD_EDIT_NOTIFICATION_DESC);\r\n\t$templateContent->assign('ADD_EDIT_TIMEZONE', ADD_EDIT_TIMEZONE);\r\n $templateContent->assign('ADD_EDIT_TIMEFRAME', ADD_EDIT_TIMEFRAME);\r\n\t$templateContent->assign('ADD_EDIT_SUBMIT', ADD_EDIT_SUBMIT);\r\n\r\n\t// assign style to preview\r\n\tif ($notifications['preview_scroll']) {\r\n\r\n\t\t// init\r\n\t\t$style = null;\r\n\r\n\t\t// set width of preview window\r\n\t\tif (isset($notifications['preview_width'])) {\r\n\t\t\tif ($notifications['preview_width'] > 0) {\r\n\t\t\t\t$width = $notifications['preview_width'];\r\n\t\t\t} else {\r\n\t\t\t\t$width = 250;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$style .= 'width:' . $width . 'px;';\r\n\r\n\t\t// set max height\r\n\t\tif (isset($notifications['preview_max_height'])) {\r\n\t\t\tif ($notifications['preview_max_height'] > 0) {\r\n\t\t\t\t$style .= 'max-height:' . $notifications['preview_max_height'] . 'px;';\r\n\t\t\t} \r\n\t\t}\r\n\r\n\t\t// assign style\r\n\t\t$templateContent->assign('STYLE_HS_PREVIEW', ' style=\"overflow:auto;' . $style . '\"');\r\n\r\n\t}\r\n\r\n\r\n\t// get info and assign defaults\r\n\t$id = (!isset($_GET['id'])) ? ((isset($_POST['id'])) ? $_POST['id'] : null) : $_GET['id'];\r\n\t$timezone_id = null;\r\n\t$timeframe_id = null;\r\n\t$notify_users = null;\r\n\t$notify_groups = null;\r\n\t$notify_by = null;\r\n\t$owner = null;\r\n\t$dbResult = null;\r\n\r\n\tif (!empty($id)) {\r\n\r\n\t\t$id_safe = prepareDBValue($id);\r\n\r\n\t\t$templateContent->assign('ID', $id);\r\n\r\n\t\t$dbResult = queryDB('select * from notifications where id=\\'' . $id_safe . '\\'');\r\n\r\n\t\t$templateContent->assign('ACTION', 'update');\r\n\t\t$templateContent->assign('HEADING', ADD_EDIT_HEADING_EDIT);\r\n\r\n\t\t$templateContent->assign('INCLUDE_RECIPIENTS', $dbResult[0]['recipients_include']);\r\n\t\t$templateContent->assign('EXCLUDE_RECIPIENTS', $dbResult[0]['recipients_exclude']);\r\n\r\n $templateContent->assign('INCLUDE_SERVICEGROUPS', $dbResult[0]['servicegroups_include']);\r\n $templateContent->assign('EXCLUDE_SERVICEGROUPS', $dbResult[0]['servicegroups_exclude']);\r\n\r\n\t\t$templateContent->assign('INCLUDE_HOSTGROUPS', $dbResult[0]['hostgroups_include']);\r\n\t\t$templateContent->assign('EXCLUDE_HOSTGROUPS', $dbResult[0]['hostgroups_exclude']);\r\n\r\n\t\t$templateContent->assign('INCLUDE_HOSTS', $dbResult[0]['hosts_include']);\r\n\t\t$templateContent->assign('EXCLUDE_HOSTS', $dbResult[0]['hosts_exclude']);\r\n\r\n\t\t$templateContent->assign('INCLUDE_SERVICES', $dbResult[0]['services_include']);\r\n\t\t$templateContent->assign('EXCLUDE_SERVICES', $dbResult[0]['services_exclude']);\r\n\r\n $templateContent->assign('NOTIFICATION_NAME', $dbResult[0]['notification_name']);\r\n $templateContent->assign('NOTIFICATION_DESCRIPTION', $dbResult[0]['notification_description']);\r\n\r\n\t\t// get notification users\r\n\t\t$dbSub = queryDB('select c.username from contacts c\r\n\t\t\t\t\t\t\tleft join notifications_to_contacts nc on nc.contact_id=c.id\r\n\t\t\t\t\t\t\twhere nc.notification_id=\\'' . $id_safe . '\\'\r\n\t\t\t\t\t\t\torder by c.username');\r\n\t\tif (is_array($dbSub)) {\r\n\t\t\tforeach($dbSub as $subRow) {\r\n\t\t\t\t$notify_users[] = $subRow['username'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// get notification groups\r\n\t\t$query = 'select cg.id from contactgroups cg\r\n\t\t\t\t\tleft join notifications_to_contactgroups ncg on cg.id=ncg.contactgroup_id\r\n\t\t\t\t\twhere ncg.notification_id=\\'' . $id_safe . '\\'';\r\n\t\t$dbSub = queryDB($query);\r\n\t\tif (is_array($dbSub)) {\r\n\t\t\tforeach($dbSub as $subRow) {\r\n\t\t\t\t$notify_groups[] = $subRow['id'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// get notification methods\r\n\t\t$dbSub = queryDB('select method_id from notifications_to_methods where notification_id=\\'' . $id_safe . '\\'');\r\n\t\tif (is_array($dbSub)) {\r\n\t\t\tforeach($dbSub as $subRow) {\r\n\t\t\t\t$notify_by[] = $subRow['method_id'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t} else {\r\n\r\n\t\t$templateContent->assign('ACTION', 'add_new');\r\n\t\t$templateContent->assign('HEADING', ADD_EDIT_HEADING_NEW);\r\n\r\n\t}\r\n\r\n\t\t$timezone_id = $dbResult[0]['timezone_id'];\r\n\t\tif (!isset($timezone_id)) $timezone_id = getServerTimeZone();\r\n $templateContent->assign('TIMEFRAME_SELECT', htmlSelect('timeframe', getTimeFrames(), $dbResult[0]['timeframe_id']));\r\n $templateContent->assign('TIMEZONE_SELECT', htmlSelect('timezone', getTimeZone(), $timezone_id));\r\n\r\n\tif (empty($id) && !empty($_SESSION['user'])) {\r\n\t\t$templateContent->assign('OWNER_SELECT', $_SESSION['user'] . htmlInput('owner', 'hidden', $_SESSION['user']));\r\n\t} else {\r\n\t\t$templateContent->assign('OWNER_SELECT', htmlSelect('owner', getContacts(), $dbResult[0]['username']));\r\n\t}\r\n\r\n\t// BEGIN - assign content for contacts and methods\r\n\t// init\r\n\t$action = $p['action'];\r\n\t$content = '';\r\n\r\n\r\n\t$count = 1;\r\n\tif (!empty($id)) {\r\n\t\t// get escalations\r\n\t\t$query = sprintf(\r\n\t\t\t'select id,notify_after_tries\r\n\t\t\t\tfrom escalations_contacts\r\n\t\t\t\twhere notification_id=\\'%s\\'\r\n\t\t\t\torder by notify_after_tries asc',\r\n\t\t\t\t$id_safe\r\n\t\t);\r\n\t\t$escalations = queryDB($query);\r\n\r\n\r\n\t\t// get counter for loop\r\n\t\t$count = count($escalations) + 1;\r\n\t\tif ($action == 'add_escalation') $count++;\r\n\t}\r\n\t$last = $count - 1;\r\n\r\n\r\n\t// assign content\r\n\tfor ($x = 0; $x < $count; $x++) {\r\n\r\n\t\t$templateSubContent = new nwTemplate(TEMPLATE_ADD_EDIT_CONTACTS_METHODS);\r\n\r\n\t\t$formArray = ($action != 'add') ? \"[$x]\" : null;\r\n\r\n\r\n\t\t// init\r\n\t\tif ($x) {\r\n\t\t\t$notify_users = array();\r\n\t\t\t$notify_groups = array();\r\n\t\t\t$notify_by = array();\r\n\t\t\t$dbResult = array();\r\n\t\t}\r\n\t\r\n\t\t// assign 'let notifier handle'\r\n\t\tif (!$x) {\r\n\t\t\t$templateSubSubContent = new nwTemplate(TEMPLATE_ADD_EDIT_LET_NOTIFIER_HANDLE);\r\n\t\t $templateSubContentTypes = new nwTemplate(TEMPLATE_ADD_EDIT_TYPES);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_PROBLEM', NOTIFY_PROBLEM);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_RECOVERY', NOTIFY_RECOVERY);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_SPECIAL', NOTIFY_SPECIAL);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_OK', NOTIFY_OK);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_WARNING', NOTIFY_WARNING);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_CRITICAL', NOTIFY_CRITICAL);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_UNKNOWN', NOTIFY_UNKNOWN);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_UP', NOTIFY_UP);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_UNREACHABLE', NOTIFY_UNREACHABLE);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_DOWN', NOTIFY_DOWN);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_FLAPPING_START', NOTIFY_FLAPPING_START);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_FLAPPING_STOP', NOTIFY_FLAPPING_STOP);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_FLAPPING_DISABLED', NOTIFY_FLAPPING_DISABLED);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_DOWNTIME_START', NOTIFY_DOWNTIME_START);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_DOWNTIME_END', NOTIFY_DOWNTIME_END);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_DOWNTIME_CANCELLED', NOTIFY_DOWNTIME_CANCELLED);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_ACKNOWLEDGEMENT', NOTIFY_ACKNOWLEDGEMENT);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_CUSTOM', NOTIFY_CUSTOM);\r\n\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_ADVANCED', NOTIFY_ADVANCED);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_WARNING_TO_CRITICAL', NOTIFY_WARNING_TO_CRITICAL);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_WARNING_TO_UNKNOWN', NOTIFY_WARNING_TO_UNKNOWN);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_CRITICAL_TO_WARNING', NOTIFY_CRITICAL_TO_WARNING);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_CRITICAL_TO_UNKNOWN', NOTIFY_CRITICAL_TO_UNKNOWN);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_UNKNOWN_TO_CRITICAL', NOTIFY_UNKNOWN_TO_CRITICAL);\r\n\t\t\t$templateSubContentTypes->assign('NOTIFY_UNKNOWN_TO_WARNING', NOTIFY_UNKNOWN_TO_WARNING);\r\n\r\n\t\t\t$templateSubSubContent->assign('ADD_EDIT_LET_NOTIFIER_HANDLE', ADD_EDIT_LET_NOTIFIER_HANDLE);\r\n\t\t\t$templateSubContentTypes->assign('ADD_EDIT_NOTIFY_ON_TABLE', ADD_EDIT_NOTIFY_ON_TABLE);\r\n\t\t\t// $templateSubSubContent->assign('ADD_EDIT_RELOOP_DELAY', ADD_EDIT_RELOOP_DELAY);\r\n\t\t\t$templateSubSubContent->assign('ADD_EDIT_ROLLOVER', ADD_EDIT_ROLLOVER);\r\n\t\t\t$templateSubSubContent->assign('CHECKED_LET_NOTIFIER_HANDLE', ($dbResult[0]['let_notifier_handle']==1)?' checked=\"checked\" ':'');\r\n\t\t\t$templateSubSubContent->assign('CHECKED_ROLLOVER', ($dbResult[0]['rollover']==1)?' checked=\"checked\" ':'');\r\n\t\t\t// $templateSubSubContent->assign('RELOOP_DELAY', $dbResult[0]['reloop_delay']);\r\n\t\t\t$templateSubContent->assign('LET_NOTIFIER_HANDLE', $templateSubSubContent->getHTML());\r\n\t\t}\r\n\r\n\r\n\t\t// get escalation data\r\n\t\tif ($x && (($x != $last && $action == 'add_escalation') || $action != 'add_escalation')) {\r\n\r\n\t\t\t// get db result from escalations\r\n\t\t\t$dbResult[$x] = $escalations[$x-1];\r\n\r\n\t\t\t// get contacts\r\n\t\t\t$query = sprintf(\r\n\t\t\t\t'select distinct c.username from contacts c\r\n\t\t\t\t\tleft join escalations_contacts_to_contacts ecc on ecc.contacts_id=c.id\r\n\t\t\t\t\tleft join escalations_contacts ec on ec.id=ecc.escalation_contacts_id\r\n\t\t\t\t\twhere ec.id=\\'%s\\'',\r\n\t\t\t\t\t$dbResult[$x]['id']\r\n\t\t\t);\r\n\t\t\t$dbResult_tmp = queryDB($query);\r\n\r\n\t\t\t$notify_users = array();\r\n\t\t\tforeach($dbResult_tmp as $row) {\r\n\t\t\t\t$notify_users[] = $row['username'];\r\n\t\t\t}\r\n\r\n\t\t\t// get contact groups\r\n\t\t\t$query = sprintf(\r\n\t\t\t\t'select distinct eccg.contactgroup_id from escalations_contacts_to_contactgroups eccg\r\n\t\t\t\t\tleft join escalations_contacts ec on ec.id=eccg.escalation_contacts_id\r\n\t\t\t\t\twhere ec.id=\\'%s\\'',\r\n\t\t\t\t\t$dbResult[$x]['id']\r\n\t\t\t);\r\n\t\t\t$dbResult_tmp = queryDB($query);\r\n\r\n\t\t\t$notify_groups = array();\r\n\t\t\tforeach($dbResult_tmp as $row) {\r\n\t\t\t\t$notify_groups[] = $row['contactgroup_id'];\r\n\t\t\t}\r\n\r\n\t\t\t// get notification methods\r\n\t\t\t$query = sprintf(\r\n\t\t\t\t'select distinct ecm.method_id from escalations_contacts_to_methods ecm\r\n\t\t\t\t\tleft join escalations_contacts ec on ec.id=ecm.escalation_contacts_id\r\n\t\t\t\t\twhere ec.id=\\'%s\\'',\r\n\t\t\t\t\t$dbResult[$x]['id']\r\n\t\t\t);\r\n\t\t\t$dbResult_tmp = queryDB($query);\r\n\r\n\t\t\t$notify_by = array();\r\n\t\t\tforeach($dbResult_tmp as $row) {\r\n\t\t\t\t$notify_by[] = $row['method_id'];\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\r\n\r\n\t\tif ($x && $action != 'add' && !($x == $last && $action == 'add_escalation')) {\r\n\r\n\t\t\t$button = htmlInput(\r\n\t\t\t\t'remove_escalation' . $formArray,\r\n\t\t\t\t'submit', ADD_EDIT_BUTTON_REMOVE_ESCALATION,\r\n\t\t\t\t'onclick=\"if(confirm(\\'' . ADD_EDIT_CONFIRM_REMOVE_ESCALATION . '\\')){setValue(\\'eid\\',\\'' . $dbResult[$x]['id'] . '\\');setValue(\\'action\\',\\'remove_escalation\\');}else{return false;}\"'\r\n\t\t\t);\r\n\r\n\t\t\t$templateSubContent->assign('BUTTON_REMOVE_ESCALATION', $button);\r\n\r\n\t\t} else {\r\n\r\n\t\t\t$templateSubContent->assign('BUTTON_REMOVE_ESCALATION', '&nbsp;');\r\n\r\n\t\t}\r\n\r\n\r\n\t\tif ($x == $last && $action != 'add' && $action != 'add_escalation') {\r\n\r\n\t\t\t$button = '&nbsp;';\r\n\t\t\t$button .= htmlInput(\r\n\t\t\t\t'add_escalation',\r\n\t\t\t\t'submit', ADD_EDIT_BUTTON_ADD_ESCALATION,\r\n\t\t\t\t'onclick=\"if(confirm(\\'' . ADD_EDIT_CONFIRM_ADD_ESCALATION . '\\')){setValue(\\'action\\',\\'add_escalation\\');}else{return false;}\"'\r\n\t\t\t);\r\n\r\n\t\t\t$templateSubContent->assign('BUTTON_ADD_ESCALATION', $button);\r\n\r\n\t\t} else {\r\n\r\n\t\t\t$templateSubContent->assign('BUTTON_ADD_ESCALATION', '&nbsp;');\r\n\r\n\t\t}\r\n\r\n\r\n\t\t$templateSubContent->assign('ESCALATION_COUNT', $x);\r\n\r\n\t\t$templateSubContent->assign('ADD_EDIT_NOTIFY_AFTER_TRIES', ADD_EDIT_NOTIFY_AFTER_TRIES);\r\n\t\t$templateSubContent->assign('NOTIFY_AFTER_TRIES', $dbResult[$x]['notify_after_tries']);\r\n\t\t$templateSubContent->assign('ADD_EDIT_NUM_NOTIFICATIONS', ADD_EDIT_NUM_NOTIFICATIONS);\r\n\t\t$templateSubContent->assign('ADD_EDIT_HEADING_CONTACTS_METHODS', ADD_EDIT_HEADING_CONTACTS_METHODS);\r\n\t\t$templateSubContent->assign('ADD_EDIT_NOTIFY_USERS', ADD_EDIT_NOTIFY_USERS);\r\n\t\t$templateSubContent->assign('ADD_EDIT_NOTIFY_GROUPS', ADD_EDIT_NOTIFY_GROUPS);\r\n\t\t$templateSubContent->assign('ADD_EDIT_NOTIFY_BY', ADD_EDIT_NOTIFY_BY);\r\n if (!$x) {\r\n $templateSubContent->assign('ADD_EDIT_NOTIFY_ON', ADD_EDIT_NOTIFY_ON);\r\n }\r\n\r\n $templateSubContent->assign('NOTIFY_USERS_SELECT', htmlSelect('notify_users' . $formArray . '[]', getContacts(), $notify_users, 'size=\"5\" multiple=\"multiple\"'));\r\n\t\t$templateSubContent->assign('NOTIFY_GROUPS_SELECT', htmlSelect('notify_groups' . $formArray . '[]', getContactGroups(), $notify_groups, 'size=\"5\" multiple=\"multiple\"'));\r\n\r\n\t\t$templateSubContent->assign('NOTIFY_BY_SELECT', htmlSelect('notify_by' . $formArray . '[]', getNotificationMethods(), $notify_by, 'size=\"5\" multiple=\"multiple\"'));\r\n\r\n if (!$x) {\r\n // only show the check boxes for the base rule, not notifications\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_OK', ($dbResult[$x]['on_ok']==1) ? ' checked=\"checked\"' : '' );\r\n\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_WARNING', (($dbResult[$x]['on_warning'] & 1) == 1) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_CRITICAL_TO_WARNING', (($dbResult[$x]['on_warning'] & 8) == 8) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_UNKNOWN_TO_WARNING', (($dbResult[$x]['on_warning'] & 16) == 16) ? ' checked=\"checked\"' : '' );\r\n\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_CRITICAL', (($dbResult[$x]['on_critical'] & 1) == 1) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_WARNING_TO_CRITICAL', (($dbResult[$x]['on_critical'] & 4) == 4) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_UNKNOWN_TO_CRITICAL', (($dbResult[$x]['on_critical'] & 16) == 16) ? ' checked=\"checked\"' : '' );\r\n\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_UNKNOWN', (($dbResult[$x]['on_unknown'] & 1) == 1) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_WARNING_TO_UNKNOWN', (($dbResult[$x]['on_unknown'] & 4) == 4) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_CRITICAL_TO_UNKNOWN', (($dbResult[$x]['on_unknown'] & 8) == 8) ? ' checked=\"checked\"' : '' );\r\n\r\n\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_HOST_UP', ($dbResult[$x]['on_host_up']==1) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_HOST_DOWN', ($dbResult[$x]['on_host_down']==1) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_HOST_UNREACHABLE', ($dbResult[$x]['on_host_unreachable']==1) ? ' checked=\"checked\"' : '' );\r\n\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_TYPE_PROBLEM', ($dbResult[$x]['on_type_problem']==1) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_TYPE_RECOVERY', ($dbResult[$x]['on_type_recovery']==1) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_TYPE_FLAPPINGSTART', ($dbResult[$x]['on_type_flappingstart']==1) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_TYPE_FLAPPINGSTOP', ($dbResult[$x]['on_type_flappingstop']==1) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_TYPE_FLAPPINGDISABLED', ($dbResult[$x]['on_type_flappingdisabled']==1) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_TYPE_DOWNTIMESTART', ($dbResult[$x]['on_type_downtimestart']==1) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_TYPE_DOWNTIMEEND', ($dbResult[$x]['on_type_downtimeend']==1) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_TYPE_DOWNTIMECANCELLED', ($dbResult[$x]['on_type_downtimecancelled']==1) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_TYPE_ACKNOWLEDGEMENT', ($dbResult[$x]['on_type_acknowledgement']==1) ? ' checked=\"checked\"' : '' );\r\n $templateSubContentTypes->assign('CHECKED_NOTIFY_TYPE_CUSTOM', ($dbResult[$x]['on_type_custom']==1)?' checked=\"checked\" ':'');\r\n $templateSubContentTypes->assign('ARRAY_ITEM', $formArray);\r\n $templateSubContent->assign('NOTIFY_ON_TABLE', $templateSubContentTypes->getHTML());\r\n }\r\n\r\n\t\t$templateSubContent->assign('ARRAY_ITEM', $formArray);\r\n\r\n\t\t$content .= $templateSubContent->getHTML();\r\n\r\n\t}\r\n\r\n\t$templateContent->assign('CONTACTS_METHODS', $content);\r\n\t// END - assign content for contacts and methods\r\n\r\n\r\n\t// BEGIN - generate content for asynchronous-preview call\r\n\tif ($notifications['host_service_preview']) {\r\n\r\n $templateContent->assign('ONCHANGE_RECIPIENTS_INCLUDE', ' onkeyup=\"update_preview(\\'r\\',\\'i\\');\"');\r\n $templateContent->assign('ONCHANGE_RECIPIENTS_EXCLUDE', ' onkeyup=\"update_preview(\\'r\\',\\'e\\');\"');\r\n\r\n $templateContent->assign('ONCHANGE_SERVICEGROUPS_INCLUDE', ' onkeyup=\"update_preview(\\'sg\\',\\'i\\');\"');\r\n $templateContent->assign('ONCHANGE_SERVICEGROUPS_EXCLUDE', ' onkeyup=\"update_preview(\\'sg\\',\\'e\\');\"');\r\n\r\n\t\t$templateContent->assign('ONCHANGE_HOSTGROUPS_INCLUDE', ' onkeyup=\"update_preview(\\'hg\\',\\'i\\');\"');\r\n\t\t$templateContent->assign('ONCHANGE_HOSTGROUPS_EXCLUDE', ' onkeyup=\"update_preview(\\'hg\\',\\'e\\');\"');\r\n\r\n\t\t$templateContent->assign('ONCHANGE_HOSTS_INCLUDE', ' onkeyup=\"update_preview(\\'h\\',\\'i\\');\"');\r\n\t\t$templateContent->assign('ONCHANGE_HOSTS_EXCLUDE', ' onkeyup=\"update_preview(\\'h\\',\\'e\\');\"');\r\n\r\n\t\t$templateContent->assign('ONCHANGE_SERVICES_INCLUDE', ' onkeyup=\"update_preview(\\'s\\',\\'i\\');\"');\r\n\t\t$templateContent->assign('ONCHANGE_SERVICES_EXCLUDE', ' onkeyup=\"update_preview(\\'s\\',\\'e\\');\"');\r\n\r\n\t}\r\n\t// END - generate content for asynchronous-preview call\r\n\t\r\n\r\n\treturn $templateContent->getHTML();\r\n\r\n}", "function _wp_posts_page_notice()\n {\n }", "function pantomime_links_page_content(){\n\t\tif (is_page_template( 'temp-links.php' )){\n\t\t\t\t$bookmarks_args = array(\n\t\t\t\t\t\t'title_before' => '<h3>',\n\t\t\t\t\t\t'title_after' => '</h3>',\n\t\t\t\t\t\t'category_before' => '',\n\t\t\t\t\t\t'category_after' => ''\n\t\t\t\t);\n\t\t\t\techo '<div id=\"bookmarks\">';\n\t\t\t\twp_list_bookmarks($bookmarks_args);\n\t\t\t\techo '</div><!-- bookmarks -->';\n\t\t}\n}", "function lastcomments_page() {\r\n\r\n\tglobal $SYSTEM_FLAGS, $template, $CurrentHandler;\r\n\t// Action if ppage is enabled\r\n\tif (pluginGetVariable('lastcomments', 'ppage') && ($CurrentHandler['handlerParams']['value']['pluginName'] == 'core')) {\r\n\t\t$SYSTEM_FLAGS['info']['title']['group'] = \"lastcomments\";\r\n\t\t$template['vars']['mainblock'] = lastcomments(1);\r\n\t} else {\r\n\t\terror404();\r\n\t}\r\n}", "public function prePageContent();", "function sh_page_content() {\n\tglobal $post, $wp_query;\n\t\n\t// if there's a specific page template, then redirect to this\n\t$action = get_query_var ( 'sh_action' );\n\t$type = get_query_var ( 'sh_post_type' );\n\t\n\tif ($action == 'new') {\n\t\t$template = locate_template (array('edit/'.$type.'.php') );\n\t\tif ($template != '') {\n\t\t\tinclude ($template);\n\t\t}\n\t\treturn;\n\t} \n\telse if ($action == 'edit') {\n\t\t$template = locate_template ( array (\n\t\t\t\t'edit/' . $post->post_type . '-' . get_query_var ( 'sh_part' ) . '.php',\n\t\t\t\t'edit/' . $post->post_type . '.php' \n\t\t) );\n\t\tif ($template != '') {\n\t\t\tinclude ($template);\n\t\t}\n\t\treturn;\n\t} \n\telse if ($post) {\n\t\t$template = locate_template ( array (\n\t\t\t\t'content/page-' . $post->post_name . '.php',\n\t\t\t\t'content/' . $post->post_type . '.php' \n\t\t) );\n\t\t\n\t\tif ($template != '') {\n\t\t\tinclude ($template);\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\t// otherwise, show the new post form and feed\n\tsh_post_form ();\n\tsh_topic_loop ();\n}", "public static function getContentNotifications($limit)\n {\n if (isset($_GET[\"page\"])) {\n $page = $_GET[\"page\"];\n } else {\n $page = 1;\n }\n //important for pagination. DON'T DELETE!\n $start_from = ($page - 1) * $limit;\n\n $con = $GLOBALS[\"con\"];\n $sql = \"select date_created, resource_id, content_id, content_title, content_description from content order by date_created DESC LIMIT $start_from, $limit\";\n\n $result = mysqli_query($con, $sql);\n while ($row = mysqli_fetch_assoc($result)) {\n $contentName = self::GetResourceNameByResourceId($row[\"resource_id\"]);\n $contentName = rtrim($contentName, \"s\");\n $content_id = $row[\"content_id\"];\n $date = strtotime($row[\"date_created\"]);\n $set_date = date(\"F d, Y | g:ia\", $date);\n echo \"<div class=\\\"col-lg-4 col-md-6 col-sm-12\\\">\n <div class=\\\"features-categories-item mx-auto mb-5 mb-lg-0 mb-lg-3\\\">\n <div class=\\\"main-card card\\\">\n <span class=\\\"not-time-frame bg-ngreen text-center text-white\\\">$set_date</span>\n <div class=\\\"card-notifications\\\">\n <h3>\" . $row['content_title'] . \"</h3> \n <p>\" . $row['content_description'] . \"</p> \n <a href=\\\"#\\\" class=\\\"btn btn-outline-ngreen btn-block\\\" onclick=\\\"ReadArticle($content_id)\\\">View Content</a>\n </div>\n </div>\n </div>\n </div>\";\n }\n\n //pagination function: Parameters (table's name, articles number limit, link path (without '.php'))\n $result = self::pagePagination(\"content\", $limit, \"notifications\");\n echo $result;\n }", "public function settings_page()\r\n {\r\n add_submenu_page('giga',\r\n __('Notifications', 'giga-messenger-bots'),\r\n __('Notifications', 'giga-messenger-bots'),\r\n 'manage_options',\r\n 'notifications',\r\n [$this, 'render']\r\n );\r\n }", "function fatherly_fcr_process_admin_page()\n{\n include_once(__DIR__ . '/inc/classes/ContentRecirculation.php');\n $pageData = FCR\\ContentRecirculation::init()->getAdminPageData();\n include(__DIR__ . '/inc/pages/feed-content-recirculation.php');\n}", "public function main()\n {\n $lang = $this->getLanguageService();\n // Access check...\n // The page will show only if there is a valid page and if this page may be viewed by the user\n $access = is_array($this->pageinfo) ? 1 : 0;\n // Content\n $content = '';\n if ($this->id && $access) {\n // Initialize permission settings:\n $this->CALC_PERMS = $this->getBackendUser()->calcPerms($this->pageinfo);\n $this->EDIT_CONTENT = $this->contentIsNotLockedForEditors();\n\n $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);\n\n // override the default jumpToUrl\n $this->moduleTemplate->addJavaScriptCode('jumpToUrl', '\n function jumpToUrl(URL,formEl) {\n if (document.editform && TBE_EDITOR.isFormChanged) { // Check if the function exists... (works in all browsers?)\n if (!TBE_EDITOR.isFormChanged()) {\n window.location.href = URL;\n } else if (formEl) {\n if (formEl.type==\"checkbox\") formEl.checked = formEl.checked ? 0 : 1;\n }\n } else {\n window.location.href = URL;\n }\n }\n ');\n $this->moduleTemplate->addJavaScriptCode('mainJsFunctions', '\n if (top.fsMod) {\n top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';\n top.fsMod.navFrameHighlightedID[\"web\"] = \"pages' . (int)$this->id . '_\"+top.fsMod.currentBank; ' . (int)$this->id . ';\n }\n ' . ($this->popView ? BackendUtility::viewOnClick($this->id, '', BackendUtility::BEgetRootLine($this->id)) : '') . '\n function deleteRecord(table,id,url) { //\n window.location.href = ' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('tce_db') . '&cmd[')\n . ' + table + \"][\" + id + \"][delete]=1&redirect=\" + encodeURIComponent(url) + \"&prErr=1&uPT=1\";\n return false;\n }\n ');\n\n // Find backend layout / columns\n $backendLayout = GeneralUtility::callUserFunction(BackendLayoutView::class . '->getSelectedBackendLayout', $this->id, $this);\n if (!empty($backendLayout['__colPosList'])) {\n $this->colPosList = implode(',', $backendLayout['__colPosList']);\n }\n // Removing duplicates, if any\n $this->colPosList = array_unique(GeneralUtility::intExplode(',', $this->colPosList));\n // Accessible columns\n if (isset($this->modSharedTSconfig['properties']['colPos_list']) && trim($this->modSharedTSconfig['properties']['colPos_list']) !== '') {\n $this->activeColPosList = array_unique(GeneralUtility::intExplode(',', trim($this->modSharedTSconfig['properties']['colPos_list'])));\n // Match with the list which is present in the colPosList for the current page\n if (!empty($this->colPosList) && !empty($this->activeColPosList)) {\n $this->activeColPosList = array_unique(array_intersect(\n $this->activeColPosList,\n $this->colPosList\n ));\n }\n } else {\n $this->activeColPosList = $this->colPosList;\n }\n $this->activeColPosList = implode(',', $this->activeColPosList);\n $this->colPosList = implode(',', $this->colPosList);\n\n $content .= $this->getHeaderFlashMessagesForCurrentPid();\n\n // Render the primary module content:\n if ($this->MOD_SETTINGS['function'] == 1 || $this->MOD_SETTINGS['function'] == 2) {\n $content .= '<form action=\"' . htmlspecialchars(BackendUtility::getModuleUrl($this->moduleName, ['id' => $this->id, 'imagemode' => $this->imagemode])) . '\" id=\"PageLayoutController\" method=\"post\">';\n // Page title\n $content .= '<h1 class=\"t3js-title-inlineedit\">' . htmlspecialchars($this->getLocalizedPageTitle()) . '</h1>';\n // All other listings\n $content .= $this->renderContent();\n }\n $content .= '</form>';\n $content .= $this->searchContent;\n // Setting up the buttons for the docheader\n $this->makeButtons();\n // @internal: This is an internal hook for compatibility7 only, this hook will be removed without further notice\n if ($this->MOD_SETTINGS['function'] != 1 && $this->MOD_SETTINGS['function'] != 2) {\n $renderActionHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['renderActionHook'];\n if (is_array($renderActionHook)) {\n foreach ($renderActionHook as $hook) {\n $params = [\n 'deleteButton' => $this->deleteButton,\n ''\n ];\n $content .= GeneralUtility::callUserFunction($hook, $params, $this);\n }\n }\n }\n // Create LanguageMenu\n $this->makeLanguageMenu();\n } else {\n $this->moduleTemplate->addJavaScriptCode(\n 'mainJsFunctions',\n 'if (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';'\n );\n $content .= '<h1>' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '</h1>';\n $view = GeneralUtility::makeInstance(StandaloneView::class);\n $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/InfoBox.html'));\n $view->assignMultiple([\n 'title' => $lang->getLL('clickAPage_header'),\n 'message' => $lang->getLL('clickAPage_content'),\n 'state' => InfoboxViewHelper::STATE_INFO\n ]);\n $content .= $view->render();\n }\n // Set content\n $this->moduleTemplate->setContent($content);\n }", "function jr_news_add_pages() {\r\n add_options_page('News', 'News', 'administrator', 'news', 'news_options_page');\r\n}", "function shoutbox_pages() {\n\t\tglobal $lang;\n\t\t$pages[] = array(\n\t\t\t'func' => 'posts',\n\t\t\t'title' => $lang['shoutbox']['page posts']\n\t\t);\n\t\t$pages[] = array(\n\t\t\t'func' => 'clean',\n\t\t\t'title' => $lang['shoutbox']['clean shoutbox']\n\t\t);\n\t\t$pages[] = array(\n\t\t\t'func' => 'settings',\n\t\t\t'title' => $lang['shoutbox']['page settings']\n\t\t);\n\t\t$pages[] = array(\n\t\t\t'func' => 'check_updates',\n\t\t\t'title' => $lang['shoutbox']['updates']\n\t\t);\n\t\treturn $pages;\n\t}", "function OS_PMMenu() {\n\tglobal $db;\n //$db = new db(\"mysql:host=\".OSDB_SERVER.\";dbname=\".OSDB_DATABASE.\"\", OSDB_USERNAME, OSDB_PASSWORD);\n\n\t\n\t$sth = $db->prepare(\"SELECT COUNT(*) FROM \".OSDB_CUSTOM_FIELDS.\" as c WHERE c.field_name LIKE ('%||p.m.0') AND c.field_id = ? \");\n\t$sth->bindValue(1, OS_GetUserID(), PDO::PARAM_INT);\n\t$result = $sth->execute();\n\t$r = $sth->fetch(PDO::FETCH_NUM);\n\t$numrows = $r[0];\n\t\n\tif ( $numrows>=1 ) { ?>\n\t<li><a href=\"<?=OS_HOME?>?action=pm&amp;inbox\"><b>(<?=$numrows?>) My Messages</b></a></li>\n\t<?php \n\tif ( !OS_GetAction(\"pm\") )\n\tAddEvent(\"os_content\", \"OS_PMNewMessageNotification\");\n\t} else { ?><li><a href=\"<?=OS_HOME?>?action=pm&amp;inbox\">(<?=$numrows?>) My Messages</a></li><?php }\n\t\n\t?><li><a href=\"<?=OS_HOME?>?action=pm&amp;inbox\">My Messages</a></li><?php\n\t}", "public function action_index () {\r\n\t\t$page_category\t= $this->page_category->load_by_name($this->_class_name);\r\n\t\t$category_files\t= $this->category_files->find(array('category_id'=>$page_category->id),'',1);\r\n\t\t\r\n\t\t$buffers = array();\r\n\t\tforeach ($category_files as $cfile){\r\n\t\t\t$buffers[$cfile->category_id] = $cfile;\r\n\t\t}\r\n\t\t$category_files = $buffers;\r\n\t\t\r\n\t\t$order_by\t\t= array('order'=>'desc');\r\n\t\t$links\t\t\t= $this->links->find(array('status'=>'publish'),$order_by);\r\n\t\t$linkstype\t\t= $this->linkstype->find(array('status'=>'publish'));\r\n\t\t\r\n\t\t$content_vars\t= array(\r\n\t\t\t\t\t\t\t\t\t'category_upload_path' => $this->category_upload_path,\r\n\t\t\t\t\t\t\t\t\t'category_upload_url' => $this->category_upload_url,\r\n\t\t\t\t\t\t\t\t\t'page_category' => $page_category,\r\n\t\t\t\t\t\t\t\t\t'category_files' => $category_files,\r\n\t\t\t\t\t\t\t\t\t'links' => $links,\r\n\t\t\t\t\t\t\t\t\t'linkstype' => $linkstype\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t$content\t\t\t= View::factory('site/links_page');\r\n\r\n\t\tforeach ($content_vars as $var => $val) {\r\n\t\t\t$content->$var\t= $val;\r\n\t\t}\r\n\t\t\t\t\r\n\t\t$this->template->meta_keywords\t\t= Lib::_explode_keywords('Links for information');\r\n\t\t\r\n\t\t$this->template->meta_description\t= 'Links Page ' . strip_tags('Links for information');\t\r\n\t\t\r\n\t\t$this->template->page_title\t\t= 'Links - '. Lib::config('site.title');\r\n\t\t\r\n\t\t$this->template->content\t\t= $content; \r\n\t}", "public function notificationsAction()\n {\n \t$medium = User_Notification::MEDIUM_HOMEPAGE;\n \t$notifications = $this->_user->getNotifications($medium);\n \t$notifications = $this->_user->addDefaultNotifications($notifications, $medium);\n\n $form = new User_Notification_Form($notifications);\n $form->populateFromDatabaseData($notifications);\n\n $data = $this->_request->getPost();\n if(!$data || !$form->isValid($data)){\n // Display errors or empty form\n $this->view->form = $form;\n $this->view->status = null;\n return;\n }\n\n /**\n * Try to fetch the notification rows in DB for each itemType.\n * Create a blank one if it does not exist, then save it.\n */\n $table = new User_Notification();\n $elements = $form->getElements();\n foreach($elements as $element){\n \t$name = $element->getName();\n \tif(in_array($name, $this->_disregardUpdates)){\n \t\tcontinue;\n \t}\n\n \tif(!isset($data[$name])){\n \t\tcontinue;\n \t}\n\n \t$row = $notifications[$name];\n\t\t\t$row->notify = $element->getValue();\n\t\t\t$row->save();\n }\n\n $this->_user->clearCache();\n // Update successful\n $this->view->form = null;\n $this->view->status = true;\n }", "public function main($content,$conf)\t{\n\t\t$this->conf=$conf;\n\t\t$this->pi_setPiVarDefaults();\n\t\t$this->pi_loadLL();\n\t\t$this->pid=intval($this->cObj->data['pages']);\n\t\t\n\t\t#t3lib_div::debug($GLOBALS['TSFE']->type,'debug'); \n\t\t \n\t\t\n\t\t$this->server=$this->pi_getRecord('tx_nntpreader_server',1);\n\t\t$this->threadsPerPage = $this->conf['threadsPerPage'] ? intval($this->conf['templateFile']) : 25;\n\t\t\n\t\t\n\t\t$tmpl=$this->conf['templateFile'] ? $this->conf['templateFile'] : 'typo3conf/ext/nntpreader/res/template.html';\n\t\t$this->uploadDir='uploads/tx_nntpreader/'; \n\t\t$this->template=$this->cObj->fileResource($tmpl);\n\t\t\n\t\t#t3lib_div::debug($this->template,'debug'); \n\t\t\n\t\tif($GLOBALS['TSFE']->type==111) {\n\t\t\treturn $this->rssfeed();\n\t\t} \n\t\t\n\t\t\n\t\t\n\t\t$GLOBALS['TSFE']->additionalHeaderData[] = '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.($this->conf['cssFile'] ? $this->conf['cssFile'] : 'typo3conf/ext/nntpreader/res/nntpreader.css').'\" />';\n\t\t\n\t\t\n\t\t\n\t\tif($this->conf['showCronStat']) {\n $content = $this->cronstat();\n } elseif($this->conf['showLastPosts']) {\n $content = $this->LastPosts();\n } elseif($this->conf['showLastThreads']) {\n\t\t\t$content = $this->LastPosts(1);\n\t\t} else {\n\t\t\n\t\t\tif($this->piVars['search']) {\n\t\t\t\t$content=$this->search();\n\t\t\t} elseif($this->piVars['nid'] && $this->piVars['mid']) {\n\t\t\t\t$content=$this->showThread();\n\t\t\t} elseif($this->piVars['nid'] && !$this->piVars['tid']) {\n\t\t\t\t$content = $this->showSingleNewsgroup();\n\t\t\t} else {\n\t\t\t\t$content = $this->showNewsgroups();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\treturn $this->pi_wrapInBaseClass($content);\n\t}", "function getlistPage($content, $conf) {\n\t\t//we want to keep the md5-transformation on the paramenterlist, so we use\n\t\t//pi_linkTP_keepPIvars_url instead of pi_linkTP_keepPIvars (which would deliver us the whole link with <a href=\"...\">...</a>)\n\t\t//plus: pi_linkTP_keepPIvars_url allows to reset the mode :-))\n\n\t\t$this->pi_loadLL(); //or else the pi_getLL won't work!\n\t\tif ($conf['pageid'] > '') {\n\t\t\t$pageid = $conf['pageid'];\n\t\t} else {\n\t\t\t$pageid = $GLOBALS['TSFE']->id;\n\t\t}\n\n\t\tif($this->conf['recursive'] > 0){\n\t\t\t$recursion=$this->conf['recursive'];\n\t\t} else {\n\t\t\t$recursion=20;\n\t\t}\n\t\t// $this->pi_getPidList($pageid, $recursion) does not work for pages inside info-folder (which are outside civserv_Plugin)\n\t\t// try home-made getPidList-Funktion instead.\n\t\t// identify it actual page is child of info_folder_uid\n\t\t$this->res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'pages.pid',\t\t\t \t\t\t\t\t\t\t// SELECT ...\n\t\t\t'pages',\t\t\t\t\t\t\t\t\t// FROM ...\n\t\t\t'pages.uid = '. intval($pageid).\n\t\t\t$this->cObj->enableFields('pages'),\t\t\t// WHERE\n\t\t\t'', \t\t\t\t\t\t\t\t\t\t// GROUP BY...\n\t\t\t'', \t\t\t\t\t\t\t\t\t\t// ORDER BY...\n\t\t\t'' \t\t\t\t\t\t\t\t\t\t\t// LIMIT to 10 rows, starting with number 5 (MySQL compat.)\n\t\t\t);\n\n\t\t$parent_list = $this->get_parent_list($this->res, $parent_list);\n\n\t\t$linkText=$GLOBALS['TSFE']->page['title']; //default\n\t\tif($this->piVars['mode'] == \"organisation\"){\n\t\t\t$pageLink= parent::pi_linkTP_keepPIvars_url(array(mode => 'organisation_list'),1,1,$pageid);\n\t\t\t$linkText=$this->pi_getLL('tx_civserv_pi1_menuarray.organisation_list','Organisation A - Z');\n\t\t}elseif($this->piVars['mode'] == \"circumstance\"){\n\t\t\t$pageLink= parent::pi_linkTP_keepPIvars_url(array(mode => 'circumstance_tree'),1,1,$pageid);\n\t\t\t$linkText=$this->pi_getLL('tx_civserv_pi1_menuarray.circumstance_tree','Circumstances');\n\t\t}elseif($this->piVars['mode'] == \"usergroup\"){\n\t\t\t$pageLink= parent::pi_linkTP_keepPIvars_url(array(mode => 'usergroup_tree'),1,1,$pageid);\n\t\t\t$linkText=$this->pi_getLL('tx_civserv_pi1_menuarray.usergroup_tree','Usergroups');\n\t\t}elseif($this->piVars['mode'] == \"service\"){\n\t\t\t$_SESSION['stored_pagelink']=$this->getActualPage($content, $conf);\n\t\t\t$pageLink= parent::pi_linkTP_keepPIvars_url(array(mode => 'service_list'),1,1,$pageid);\n\t\t\t$linkText=$this->pi_getLL('tx_civserv_pi1_service_list.service_list','Services A - Z');\n\t\t\t$_SESSION['info_sites'] = $this->getCompletePageLink($pageLink, $linkText); //Variablen namen �ndern?\n\t\t}elseif($this->piVars['mode'] == \"employee\"){\n\t\t\treturn $_SESSION['stored_pagelink'];\n\t\t}elseif($this->piVars['mode'] == \"\"){\n\t\t\t// no mode means either it is a page outside the pagetree of civserv --> do not display custom breadcrumb!\n\t\t\t// or else it is an Info-Page belonging to civserv --> do display custom breadcrumb! The pid of info-pages is available from tx_civserv_conf_mandant!\n\t\t\tif(in_array($_SESSION['info_folder_uid'], $parent_list)){\n\t\t\t\t$breadcrumb = $_SESSION['info_sites']; //Organisations A-Z\n\t\t\t\t$breadcrumb .= $_SESSION['stored_pagelink']; //Services\n\t\t\t\treturn $breadcrumb;\n\t\t\t \t#return '<span style=\"border:solid red 1px;\">'.$breadcrumb.'</span>';\n\t\t\t }else{\n\t\t\t \treturn '';\n\t\t\t }\n\t\t}else{\n\t\t\t// there is a mode - but none of the above-mentioned (e.g. a mode belonging to another extension)\n\t\t\treturn '';\n\t\t\t#return '<span style=\"border:solid blue 1px;\">'.$this->piVars['mode'].'</span>';\n\t\t}\n\t\tif(!$pageid == $_SESSION['page_uid'] && !$pageid == $_SESSION['alternative_page_uid']){\n\t\t\treturn ''; // generally only the civserv display-pages need to have custom-breadcrumb\n\t\t}\n\t\treturn $this->getCompletePageLink($pageLink, $linkText);\n\t\t#return '<span style=\"border:solid green 1px;\">'.$this->getCompletePageLink($pageLink, $linkText).'</span>';\n\t}", "function honeycomb_page_content() {\n\t\t?>\n\t\t<div class=\"entry-content\">\n\t\t\t<?php the_content(); ?>\n\t\t\t<?php\n\t\t\t\twp_link_pages( array(\n\t\t\t\t\t'before' => '<div class=\"page-links\">' . __( 'Pages:', 'honeycomb' ),\n\t\t\t\t\t'after' => '</div>',\n\t\t\t\t) );\n\t\t\t?>\n\t\t</div><!-- .entry-content -->\n\t\t<?php\n\t}", "public function GetPageDef()\n {\n $oGlobal = TGlobal::instance();\n $iPageId = false;\n $oURLData = TCMSSmartURLData::GetActive();\n $iMessagePos = strpos($oURLData->sRelativeURL, TShopPaymentHandlerOgone::URL_IDENTIFIER_NOTIFY);\n $bNotifyIsValid = false;\n if (false !== $iMessagePos) {\n TTools::WriteLogEntry('OGONE: incoming notify message: '.print_r($oGlobal->GetUserData(), true), 1, __FILE__, __LINE__);\n if ($oGlobal->UserDataExists('PAYHAID') && $oGlobal->UserDataExists('PAYCALL')) {\n $sPaymentHandlerCMSIdent = $oGlobal->GetUserData('PAYHAID');\n $sInoParameter = $oGlobal->GetUserData('PAYCALL');\n if (TShopPaymentHandlerOgone::URL_IDENTIFIER == $sInoParameter && !empty($sPaymentHandlerCMSIdent)) {\n $bNotifyIsValid = true;\n } else {\n TTools::WriteLogEntry('OGONE: incoming notify message parameter incorrect: '.print_r($sInoParameter, true), 1, __FILE__, __LINE__);\n }\n } else {\n TTools::WriteLogEntry('OGONE: incoming notify message parameter missing: '.print_r($oGlobal->GetUserData(), true), 1, __FILE__, __LINE__);\n }\n if ($bNotifyIsValid) {\n /** @var TShopPaymentHandlerOgone $oPaymentHandler */\n $oPaymentHandler = TdbShopPaymentHandler::GetNewInstance();\n $oPaymentHandler->LoadFromField('cmsident', $sPaymentHandlerCMSIdent);\n $activePortal = $this->getPortalDomainService()->getActivePortal();\n try {\n /** @var TShopPaymentHandlerOgone $oPaymentHandler */\n $oPaymentHandler = $this->getShopPaymentHandlerFactory()->createPaymentHandler($oPaymentHandler->id, $activePortal->id);\n $oGlobal = TGlobal::instance();\n if ($oPaymentHandler->HandleNotifyMessage($oGlobal->GetUserData())) {\n // done... exit\n TTools::WriteLogEntry('Ogone Payment notify Response completed', 4, __FILE__, __LINE__);\n header('HTTP/1.1 200 OK');\n exit(0);\n } else {\n $this->handleError();\n }\n } catch (ConfigurationException $e) {\n $this->getLogger()->error(\n sprintf('Unable to create payment handler: %s', $e->getMessage()),\n [\n 'paymentHandlerId' => $oPaymentHandler->id,\n 'portalId' => $activePortal->id,\n ]\n );\n $this->handleError();\n }\n } else {\n $this->handleError();\n }\n } else {\n $iMessagePos = strpos($oURLData->sRelativeURL, TShopPaymentHandlerOgone::URL_IDENTIFIER);\n if (false !== $iMessagePos) {\n TTools::WriteLogEntry('OGONE: incoming payment redirect: '.print_r($oGlobal->GetUserData(), true), 1, __FILE__, __LINE__);\n $oURLData->sRelativeURL = substr($oURLData->sRelativeURL, 0, $iMessagePos);\n $sNewRelativeURL = '';\n if ('' != $oURLData->sRelativeURLPortalIdentifier) {\n $sNewRelativeURL .= '/'.$oURLData->sRelativeURLPortalIdentifier;\n }\n if ('' != $oURLData->sLanguageIdentifier) {\n $sNewRelativeURL .= '/'.$oURLData->sLanguageIdentifier;\n }\n $sNewRelativeURL .= $oURLData->sRelativeURL;\n $oURLData->sRelativeFullURL = $sNewRelativeURL;\n $iPageId = parent::GetPageDef();\n if (false !== $iPageId) {\n $oURLData->bPagedefFound = false;\n } // prevent caching\n }\n }\n\n return $iPageId;\n }", "abstract protected function render_page_content(): void;", "function _syndicated_content_listings_page()\n{\n}", "function members_page() {\r\n require_once( $plugin_dir . \"email-newsletter-files/page-members.php\" );\r\n }", "function xgb_manage_articles_main_menu_page() {\n\t\trequire_once( plugin_dir_path(__FILE__) . \"manage-requests-incoming.php\" );\n\t}", "public function page () {\n\t\tinclude _APP_ . '/views/pages/' . $this->_reg->controller . '/' . $this->_page . '.phtml';\n\t}", "function wiki_add_page($title, $description, $notes, $hide_posts, $member = null, $add_time = null, $views = 0, $meta_keywords = '', $meta_description = '', $edit_date = null, $send_notification = true)\n{\n if (is_null($member)) {\n $member = get_member();\n }\n if (is_null($add_time)) {\n $add_time = time();\n }\n\n require_code('comcode_check');\n check_comcode($description, null, false, null, true);\n\n // Update post count\n if ((addon_installed('points')) && (cms_mb_strlen($description) > 1024)) {\n require_code('points');\n $_count = point_info($member);\n $count = array_key_exists('points_gained_wiki', $_count) ? $_count['points_gained_wiki'] : 0;\n $GLOBALS['FORUM_DRIVER']->set_custom_field($member, 'points_gained_wiki', $count + 1);\n }\n\n $map = array(\n 'hide_posts' => $hide_posts,\n 'notes' => $notes,\n 'submitter' => $member,\n 'wiki_views' => $views,\n 'add_date' => time(),\n 'edit_date' => $edit_date,\n );\n if (multi_lang_content()) {\n $map['description'] = 0;\n } else {\n $map['description'] = '';\n $map['description__text_parsed'] = '';\n $map['description__source_user'] = get_member();\n }\n $map += insert_lang('title', $title, 2);\n if ($description != '') {\n $page_id = $GLOBALS['SITE_DB']->query_insert('wiki_pages', $map, true);\n\n require_code('attachments2');\n $GLOBALS['SITE_DB']->query_update('wiki_pages', insert_lang_comcode_attachments('description', 2, $description, 'wiki_page', strval($page_id), null, false, $member), array('id' => $page_id), '', 1);\n } else {\n $map = insert_lang_comcode('description', $description, 2) + $map;\n $page_id = $GLOBALS['SITE_DB']->query_insert('wiki_pages', $map, true);\n }\n\n update_stat('num_wiki_pages', 1);\n\n log_it('WIKI_ADD_PAGE', strval($page_id), $title);\n\n require_code('seo2');\n if (($meta_keywords == '') && ($meta_description == '')) {\n seo_meta_set_for_implicit('wiki_page', strval($page_id), array($title, $description), $description);\n } else {\n seo_meta_set_for_explicit('wiki_page', strval($page_id), $meta_keywords, $meta_description);\n }\n\n if ($send_notification) {\n if (post_param_integer('send_notification', null) !== 0) {\n dispatch_wiki_page_notification($page_id, 'ADD');\n }\n }\n\n if ((addon_installed('commandr')) && (!running_script('install')) && (!get_mass_import_mode())) {\n require_code('resource_fs');\n generate_resource_fs_moniker('wiki_page', strval($page_id), null, null, true);\n }\n\n require_code('sitemap_xml');\n notify_sitemap_node_add('_SEARCH:wiki:browse:' . strval($page_id), null, $edit_date, ($page_id == db_get_first_id()) ? SITEMAP_IMPORTANCE_HIGH : SITEMAP_IMPORTANCE_MEDIUM, 'weekly', has_category_access($GLOBALS['FORUM_DRIVER']->get_guest_id(), 'wiki', strval($page_id)));\n\n return $page_id;\n}", "protected function _content_template() {\n\t}", "function callback_pages(array $args)\n {\n }", "function messages_notifier() {\n\tif (elgg_is_logged_in()) {\n\t\t$class = \"elgg-icon elgg-icon-mail\";\n\t\t$text = \"<span class='$class'></span>\";\n\t\t$tooltip = elgg_echo(\"messages\");\n\t\t\n\t\t// get unread messages\n\t\t$num_messages = (int)messages_count_unread();\n\t\tif ($num_messages != 0) {\n\t\t\t$text .= \"<span class=\\\"messages-new\\\">$num_messages</span>\";\n\t\t\t$tooltip .= \" (\" . elgg_echo(\"messages:unreadcount\", array($num_messages)) . \")\";\n\t\t}\n\n\t\telgg_register_menu_item('topbar', array(\n\t\t\t'name' => 'messages',\n\t\t\t'href' => 'messages/inbox/' . elgg_get_logged_in_user_entity()->username,\n\t\t\t'text' => $text,\n\t\t\t'priority' => 600,\n\t\t\t'title' => $tooltip,\n\t\t));\n\t}\n}", "function settings_page() {\r\n require_once( $plugin_dir . \"email-newsletter-files/page-settings.php\" );\r\n }", "public function pagePreferences()\r\n\t{\r\n\t\t$eventId = Bn::getValue('event_id');\r\n\t\t$oEvent = new Oevent($eventId);\r\n\r\n\t\t$body = new Body();\r\n\r\n\t\t$oEvent->header($body);\r\n\r\n\t\t$dyn = $body->addDynpref('divPreferences');\r\n\t\t$dyn->addItem(BPREF_PAGE_ADMIN, LOC_ITEM_GENERAL, true);\r\n\t\t$dyn->addItem(BPREF_PAGE_SPORTIVE, LOC_ITEM_SPORTIVE);\r\n\t\t$dyn->addItem(BPREF_PAGE_PRIVILEGES, LOC_ITEM_PRIVILEGE);\r\n\t\tif($oEvent->getVal('type') == OEVENT_TYPE_INDIVIDUAL)\r\n\t\t{\r\n\t\t\t//$dyn->addItem(BPREF_PAGE_INLINE, LOC_ITEM_INLINE);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//$dyn->addItem(BPREF_PAGE_CAPTAIN, LOC_ITEM_CAPTAIN);\r\n\t\t\t//$dyn->addItem(BPREF_PAGE_INLINEIC, LOC_ITEM_INLINE);\r\n\t\t}\r\n\t\t$dyn->addItem(BPREF_PAGE_PRESENTATION, LOC_ITEM_PRESENTATION);\r\n\t\t$dyn->addItem(BPREF_PAGE_PRINT, LOC_ITEM_PRINT);\r\n\r\n\t\t$body->addBreak();\r\n\t\t$body->display();\r\n\t\treturn false;\r\n\t}", "protected function content_template()\n\t{\n\t\t//\n\t}", "function create_newsletter_page() {\r\n require_once( $plugin_dir . \"email-newsletter-files/page-create-newsletter.php\" );\r\n }", "function _home_template ($page,$contents){\n\t\t\t$this->load->view(\"client_home_header_new\",$contents);\n\t\t\t$this->load->view('user/career_event/'.$page, $contents);\n\t\t\t$this->load->view(\"client_home_footer_new\",$contents);\n\t\t}", "public function page_content() {\n\t\t$tab = empty( $_REQUEST['tab'] ) ? 'new' : wp_strip_all_tags( wp_unslash( $_REQUEST['tab'] ) ); // Input var okay.\n\t\t$paged = ! empty( $_REQUEST['paged'] ) ? (int) $_REQUEST['paged'] : 1; // Input var okay.\n\n\t\t$tab = esc_attr( $tab );\n\t\t$paged = esc_attr( $paged );\n\n\t\t$filters = _appthemes_get_addons_mp_page_args( $this->args['page_slug'], 'filters' );\n\t\t$defaults = _appthemes_get_addons_mp_page_args( $this->args['page_slug'], 'defaults' );\n\n\t\t$args = array(\n\t\t\t'tab' => $tab,\n\t\t\t'page' => $paged,\n\t\t\t'filters' => $filters,\n\t\t\t'defaults' => $defaults,\n\t\t);\n\n\t\t$table = $this->create_list_table( $this->args['page_slug'], $this->args['parent'], $args );\n\n\t\t// Outputs the tabs, filters and search bar.\n\t\t$table->views();\n\n\t\t/**\n\t\t * Fires on the Add-ons browser tab after the top navigation bar.\n\t\t *\n\t\t * The dynamic part of the hook name refers to the tab slug (i.e. new or popular)\n\t\t *\n\t\t * @param APP_Addons_List_Table $table The content generator instance.\n\t\t */\n\t\tdo_action( \"appthemes_addons_mp_{$tab}\", $table );\n\t}", "function template_unread()\n{\n\tglobal $context, $settings, $txt, $scripturl, $modSettings;\n\n\techo '\n\t<div id=\"recent\" class=\"main_content\">';\n\n\tif (!empty($context['topics']))\n\t{\n\t\techo '\n\t\t\t<div class=\"pagesection\">\n\t\t\t\t', $context['menu_separator'], '<a href=\"#pbot\" class=\"topbottom floatleft\">', $txt['go_down'], '</a>\n\t\t\t\t<div class=\"pagelinks floatleft\">', $context['page_index'], '</div>\n\t\t\t</div>';\n\n\t\techo '\n\t\t\t<div id=\"unread\">\n\t\t\t\t<div id=\"topic_header\" class=\"title_bar\">\n\t\t\t\t\t<div class=\"board_icon\"></div>\n\t\t\t\t\t<div class=\"info\">\n\t\t\t\t\t\t<a href=\"', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '\">', $txt['subject'], $context['sort_by'] == 'subject' ? ' <span class=\"generic_icons sort_' . $context['sort_direction'] . '\"></span>' : '', '</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"board_stats\">\n\t\t\t\t\t\t<a href=\"', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '\">', $txt['replies'], $context['sort_by'] == 'replies' ? ' <span class=\"generic_icons sort_' . $context['sort_direction'] . '\"></span>' : '', '</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"lastpost'. (!empty($modSettings['avatars_on_boardIndex']) ? '_ava' : '') .'\">\n\t\t\t\t\t\t<a href=\"', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '\">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <span class=\"generic_icons sort_' . $context['sort_direction'] . '\"></span>' : '', '</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"moderation\">&nbsp;</div>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"topic_container\" class=\"recent_topics\">';\n\n\t\tforeach ($context['topics'] as $topic)\n\t\t{\n\t\t\techo '\n\t\t\t\t\t<div class=\"', $topic['css_class'], '\">\n\t\t\t\t\t\t<div class=\"board_icon\">\n\t\t\t\t\t\t\t<img src=\"', $topic['first_post']['icon_url'], '\" alt=\"\">\n\t\t\t\t\t\t\t', $topic['is_posted_in'] ? '<img class=\"posted\" src=\"' . $settings['images_url'] . '/icons/profile_sm.png\" alt=\"\">' : '', '\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"info\">';\n\n\t\t\t// Now we handle the icons\n\t\t\techo '\n\t\t\t\t\t\t\t<div class=\"icons floatright\">';\n\t\t\tif ($topic['is_locked'])\n\t\t\t\techo '\n\t\t\t\t\t\t\t\t<span class=\"generic_icons lock\"></span>';\n\t\t\tif ($topic['is_sticky'])\n\t\t\t\techo '\n\t\t\t\t\t\t\t\t<span class=\"generic_icons sticky\"></span>';\n\t\t\tif ($topic['is_poll'])\n\t\t\t\techo '\n\t\t\t\t\t\t\t\t<span class=\"generic_icons poll\"></span>';\n\t\t\techo '\n\t\t\t\t\t\t\t</div>';\n\n\t\t\techo '\n\t\t\t\t\t\t\t<div class=\"recent_title\">\n\t\t\t\t\t\t\t\t<a href=\"', $topic['new_href'], '\" id=\"newicon', $topic['first_post']['id'], '\"><span class=\"new_posts\">' . $txt['new'] . '</span></a>\n\t\t\t\t\t\t\t\t', $topic['is_sticky'] ? '<strong>' : '', '<span class=\"preview\" title=\"', $topic[(!empty($modSettings['message_index_preview_first']) ? 'last_post' : 'first_post')]['preview'], '\"><span id=\"msg_' . $topic['first_post']['id'] . '\">', $topic['first_post']['link'], '</span></span>', $topic['is_sticky'] ? '</strong>' : '', '\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<p class=\"floatleft\">\n\t\t\t\t\t\t\t\t', $topic['first_post']['started_by'], '\n\t\t\t\t\t\t\t</p>';\n\n\t\t\tif(!empty($topic['pages']))\n\t\t\t\techo '\n\t\t\t\t\t\t\t\t<small id=\"pages', $topic['first_post']['id'], '\" class=\"topic_pages\">&nbsp;', str_replace(';all\"', ';all#ptop\"', $topic['pages']), '</small>';\n\n\t\t\techo '\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"board_stats\">\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t', $txt['replies'], ': ', $topic['replies'], '\n\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t', $txt['views'], ': ', $topic['views'], '\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"lastpost';\n\n\t\t\tif(isset($topic['last_post']['member']['avatar']['url']) && !empty($modSettings['avatars_on_boardIndex']))\n\t\t\t\techo '_ava\">\n\t\t\t\t\t\t\t\t<span class=\"avaspan\"><img src=\"'. $topic['last_post']['member']['avatar']['url'].'\" alt=\"avatar\" class=\"brdidxava'. $topic['last_post']['member']['avatar']['class'] .'\"></span>';\n\t\t\telse\n\t\t\t\techo '\">';\n\n\t\t\techo '\n\t\t\t\t\t\t\t\t', sprintf($txt['last_post_topic'], '<a href=\"' . $topic['last_post']['href'] . '\">' . $topic['last_post']['time'] . '</a>', $topic['last_post']['member']['link']), '\n\t\t\t\t\t\t\t</div>';\n\n\t\t\tshowModeration($topic);\n\n\t\t\techo '\n\t\t\t\t\t\t</div>';\n\t\t}\n\n\t\techo '\n\t\t\t\t</div>\n\t\t\t</div>';\n\n\t\techo '\n\t\t\t<div class=\"pagesection\">\n\t\t\t\t', !empty($context['recent_buttons']) ? template_button_strip($context['recent_buttons'], 'right') : '', '\n\t\t\t\t<div class=\"floatleft\">\n\t\t\t\t\t<a href=\"#recent\" class=\"topbottom floatleft\">', $txt['go_up'], '</a>\n\t\t\t\t\t<div class=\"pagelinks floatleft\">', $context['page_index'], '</div>\n\t\t\t\t</div>\n\t\t\t</div>';\n\t}\n\telse\n\t\techo '\n\t\t\t<div class=\"cat_bar\">\n\t\t\t\t<h3 class=\"catbg\">\n\t\t\t\t\t', $context['showing_all_topics'] ? $txt['unread_topics_all'] : $txt['unread_topics_visit'], '\n\t\t\t\t</h3>\n\t\t\t</div>\n\t\t\t<div class=\"roundframe\" style=\"margin-top:0;border-top-left-radius:0;border-top-right-radius:0\">\n\t\t\t\t', $context['showing_all_topics'] ? $txt['topic_alert_none'] : $txt['unread_topics_visit_none'], '\n\t\t\t</div>';\n\n\techo '\n\t</div>';\n\n\tif (empty($context['no_topic_listing']))\n\t\ttemplate_topic_legend();\n}", "function requestUserManagePagesList (){\t\n\t\tinclude ($_SERVER['DOCUMENT_ROOT'] . '_inc/controller/fb/requestUserManagePagesList.fb.inc.php');\n\t}", "function index() {\n ConfigOptions::setValueFor('fmn_last_visited', $this->logged_user, new DateTimeValue());\n\t \n // Popup\n if($this->request->isAsyncCall()) {\n $this->setView(array(\n 'template' => 'popup',\n 'controller' => 'frosso_mail_notify',\n 'module' => FROSSO_MAILN_MODULE,\n ));\n\t\t\n\t\t// $this->response->assign(array(\n // 'mail_updates' => time(),\n // ));\n\n\t } else {\n\t \t// $this->response->forbidden();\n } // if\n }", "public function notificationAction(){\n\t\t$this->loadLayout(); \n\t\t$this->renderLayout();\n\t}", "public function notification() {\n\t\t$this->page_data['page_name'] = \"notification\";\n\t\t$this->page_data['page_title'] = 'notification';\n\t\t$this->page_data['page_view'] = 'user/notification';\n\n\t\t$this->page_data['company_add_request_list'] = $this->corporate_model->get_company_list(\n\t\t\t\"OBJECT\",\n\t\t\tarray(\n\t\t\t\t'company_user' => array('company_id', 'corporate_role', 'designation_id', 'department_id', 'request_status'),\n\t\t\t\t'company' => array('name as company_name'),\n\t\t\t\t'designation' => array('name as designation'),\n\t\t\t\t'department' => array('name as department'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'company_user.user_id' => $this->session->userdata('user_id'),\n\t\t\t\t'company_user.request_status' => 'PENDING',\n\t\t\t)\n\t\t);\n\n\t\t$this->load->view('index', $this->page_data);\n\n\t}", "public function view_notification()\n\t{\n\t\t$this->admin_header();\n\t\t\n\t\t//check and confirm if the total url segment is 3\n\t\t$url_segments = $this->uri->total_segments();\n\t\t\n\t\tif ($url_segments == 3) {\n\t\t\t//retrieved the unreviewed property id\n\t\t\t$notification_id = $this->uri->segment(3);\n\t\t\t\n\t\t\t//retrieve from the database all the details of this property\n\t\t\t$result = $this->Admin_model->fetch_notification_message($notification_id);\n\t\t\t\n\t\t\tif ($result === FALSE) {\n\t\t\t\tredirect('Admin/notification_list');\n\t\t\t}\n\t\t\t\n\t\t\t$data['notification_details'] = $result;\n\t\t\t\n\t\t\t$this->add_category_template('notification_message', $data);\n\t\t\t\n\t\t}else {\n\t\t\tredirect('Admin/notification_list');\n\t\t}\n\t}", "function createContent($page)\n{\n\tswitch ($page) \n\t{ \n\t\tcase \"Bio-Home\":\n\t\t\treturn createBioHomeContent();\t\n\t\t\tbreak;\n\t\tcase \"Bio-New\":\n\t\t\treturn createBioNewContent();\t\n\t\t\tbreak;\n\t\tcase \"Bio-New-Organism\":\n\t\t\treturn createBioNewOrgContent();\t\n\t\t\tbreak;\n\t\tcase \"Bio-New-Tank\":\n\t\t\treturn createBioNewTankContent();\n\t\t\tbreak;\n\t\tcase \"Bio-New-Plate\":\n\t\t\treturn createBioNewPlateContent();\n\t\t\tbreak;\n\t\tcase \"Bio-New-Bacteria\":\n\t\t\treturn createBioNewBacteriaContent();\n\t\t\tbreak;\n\t\tcase \"Bio-New-Colony\":\n\t\t\treturn createBioNewColonyContent();\n\t\t\tbreak;\n\t\tcase \"Bio-New-Sequence\":\n\t\t\treturn createBioNewSequenceContent();\n\t\t\tbreak;\n\t\tcase \"Bio-Edit\":\n\t\t\treturn createBioEditContent();\n\t\t\tbreak;\n\t\tcase \"Bio-Blast\":\n\t\t\treturn createBioBlastContent();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn createErrorContent();\n\t\t\tbreak;\n\t}\n\t\n\n}", "function bwrt_site_new_message() {\n $templates = bwrt_get_default_pages();\n\n ?>\n <h3>BWR Club Templates</h3>\n <p>This new club site will include <b><?php echo count($templates) ?></b> template page(s).\n To change the club site templates, toggle <em>BWR Template Page</em> in the page editor.</p>\n <?php\n}", "public function indexTypo3PageContent() {}", "function Page() {\n \n // only administrators can edit it\n \n // fields\n \n $this->char_field( 'title' );\n \n $this->text_field( 'body' );\n \n $this->text_field( 'summary' );\n \n $this->text_field( 'contributor' );\n $this->text_field( 'rights' );\n $this->text_field( 'source' );\n \n $this->char_field( 'uri' );\n $this->char_field( 'url' );\n \n $this->file_field( 'attachment' );\n \n $this->int_field( 'parent_id' );\n $this->int_field( 'profile_id' );\n $this->int_field( 'recipient_id' );\n \n $this->bool_field( 'local' );\n \n $this->time_field( 'created' );\n $this->time_field( 'modified' );\n \n $this->int_field( 'entry_id' );\n \n $this->auto_field( 'id' );\n \n // relationships\n \n // each record in posts HAS ONE record in entries\n \n $this->has_one( 'entry' );\n\n //$this->has_many( 'comments' );\n\n //$this->has_many( 'reviews' );\n \n $this->set_limit(10);\n \n // permissions\n \n $this->let_read( 'all:everyone' );\n \n $this->let_access( 'all:administrators' );\n \n $this->use_templates_from( 'posts' );\n \n }", "function newsletters_page() {\r\n //including file for send newsletter\r\n if ( \"send_newsletter\" == $_REQUEST['newsletter_action'] && ( $_REQUEST['newsletter_id'] || $_REQUEST['send_id'] ) ) {\r\n require_once( $plugin_dir . \"email-newsletter-files/page-send-newsletter.php\" );\r\n return;\r\n }\r\n\r\n require_once( $plugin_dir . \"email-newsletter-files/page-newsletters.php\" );\r\n }", "function pmpro_notifications()\n{\n\tif(current_user_can(\"manage_options\"))\n\t{\n\t\t$pmpro_notification = get_transient(\"pmpro_notification_\" . PMPRO_VERSION);\n\t\tif(empty($pmpro_notification))\n\t\t{\n\t\t\t//set to NULL in case the below times out or fails, this way we only check once a day\n\t\t\tset_transient(\"pmpro_notification_\" . PMPRO_VERSION, 'NULL', 86400);\n\n\t\t\t//figure out which server to get from\n\t\t\tif(is_ssl())\n\t\t\t{\n\t\t\t\t$remote_notification = wp_remote_get(\"https://notifications.paidmembershipspro.com/?v=\" . PMPRO_VERSION);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$remote_notification = wp_remote_get(\"http://notifications.paidmembershipspro.com/?v=\" . PMPRO_VERSION);\n\t\t\t}\n\n\t\t\t//get notification\n\t\t\t$pmpro_notification = wp_remote_retrieve_body($remote_notification);\n\n\t\t\t//update transient if we got something\n\t\t\tif(!empty($pmpro_notification))\n\t\t\t\tset_transient(\"pmpro_notification_\" . PMPRO_VERSION, $pmpro_notification, 86400);\n\t\t}\n\n\t\tif($pmpro_notification && $pmpro_notification != \"NULL\")\n\t\t{\n\t\t?>\n\t\t<div id=\"pmpro_notifications\">\n\t\t\t<?php echo $pmpro_notification; ?>\n\t\t</div>\n\t\t<?php\n\t\t}\n\t}\n\n\t//exit so we just show this content\n\texit;\n}", "function _template ($page,$contents){\n\t\t\t$this->load->view(\"client_common_header\",$contents);\t\t\t\t\t\t\t\n\t\t\t$this->load->view('user/career_event/'.$page, $contents);\n\t\t\t$this->load->view(\"client_common_footer\",$contents);\n\t\t}", "function _wp_auto_add_pages_to_menu($new_status, $old_status, $post)\n {\n }", "public function hook_menu() {\n\n $items = array();\n \n // Add a notification page...\n $items['thumbwhere/content_collection/notify'] = array(\n 'title' => 'Notifications Callback for \"ContentCollection\" Entity',\n 'page callback' => '_thumbwhere_content_collection_notify',\n 'access arguments' => array(\n 'send thumbwhere contentcollection notifications'\n ),\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n ); \n \n $id_count = count(explode('/', $this->path));\n $wildcard = isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%' . $this->entityType;\n\n $items[$this->path] = array(\n 'title' => 'ContentCollection',\n 'description' => 'Add edit and update thumbwhere_contentcollections.',\n 'page callback' => 'system_admin_menu_block_page',\n 'access arguments' => array('access administration pages'),\n 'file path' => drupal_get_path('module', 'system'),\n 'file' => 'system.admin.inc',\n );\n\n // Change the overview menu type for the list of thumbwhere_contentcollections.\n $items[$this->path]['type'] = MENU_LOCAL_TASK;\n\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollection',\n 'title' => 'Add',\n 'description' => 'Add a new ContentCollection',\n 'page callback' => 'thumbwhere_contentcollection_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollection_create(array('type' => 'thumbwhere_contentcollection'))),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollection'),\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n\n/*\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollection',\n 'title' => 'Add',\n\t 'description' => 'Add a new ContentCollection',\n 'page callback' => 'thumbwhere_contentcollection_add_page',\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit'),\n 'type' => MENU_NORMAL_ITEM,\n 'weight' => 20,\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n\n );\n*/ \n/*\n $items[$this->path . '/add/' . 'thumbwhere_contentcollection'] = array(\n 'title' => 'Add ' . 'ThumbWhereContentCollection',\n 'page callback' => 'thumbwhere_contentcollection_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollection_create(array('type' => 'thumbwhere_contentcollection'))),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollection'),\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n*/\n // Loading and editing thumbwhere_contentcollection entities\n $items[$this->path . '/thumbwhere_contentcollection/' . $wildcard] = array(\n 'page callback' => 'thumbwhere_contentcollection_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'weight' => 0,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n $items[$this->path . '/thumbwhere_contentcollection/' . $wildcard . '/edit'] = array(\n 'title' => 'Edit',\n 'type' => MENU_DEFAULT_LOCAL_TASK,\n 'weight' => -10,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n );\n\n $items[$this->path . '/thumbwhere_contentcollection/' . $wildcard . '/delete'] = array(\n 'title' => 'Delete',\n 'page callback' => 'thumbwhere_contentcollection_delete_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'type' => MENU_LOCAL_TASK,\n 'context' => MENU_CONTEXT_INLINE,\n 'weight' => 10,\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n // Menu item for viewing thumbwhere_contentcollections\n $items['thumbwhere_contentcollection/' . $wildcard] = array(\n //'title' => 'Title',\n 'title callback' => 'thumbwhere_contentcollection_page_title',\n 'title arguments' => array(1),\n 'page callback' => 'thumbwhere_contentcollection_page_view',\n 'page arguments' => array(1),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('view', 1),\n 'type' => MENU_CALLBACK,\n );\n return $items;\n }", "function dsq_add_pages() {\n \tadd_submenu_page(\n \t\t'edit-comments.php',\n \t\t'Disqus', \n \t\t'Disqus', \n \t\t'moderate_comments',\n \t\t'disqus',\n \t\t'dsq_manage'\n \t);\n}", "protected function _content_template()\n {\n\n }", "public function hook_menu() {\n\n $items = array();\n \n // Add a notification page...\n $items['thumbwhere/content_collection_item/notify'] = array(\n 'title' => 'Notifications Callback for \"ContentCollectionItem\" Entity',\n 'page callback' => '_thumbwhere_content_collection_item_notify',\n 'access arguments' => array(\n 'send thumbwhere contentcollectionitem notifications'\n ),\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n ); \n \n $id_count = count(explode('/', $this->path));\n $wildcard = isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%' . $this->entityType;\n\n $items[$this->path] = array(\n 'title' => 'ContentCollectionItem',\n 'description' => 'Add edit and update thumbwhere_contentcollectionitems.',\n 'page callback' => 'system_admin_menu_block_page',\n 'access arguments' => array('access administration pages'),\n 'file path' => drupal_get_path('module', 'system'),\n 'file' => 'system.admin.inc',\n );\n\n // Change the overview menu type for the list of thumbwhere_contentcollectionitems.\n $items[$this->path]['type'] = MENU_LOCAL_TASK;\n\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollectionItem',\n 'title' => 'Add',\n 'description' => 'Add a new ContentCollectionItem',\n 'page callback' => 'thumbwhere_contentcollectionitem_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollectionitem_create(array('type' => 'thumbwhere_contentcollectionitem'))),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollectionitem'),\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n\n/*\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollectionItem',\n 'title' => 'Add',\n\t 'description' => 'Add a new ContentCollectionItem',\n 'page callback' => 'thumbwhere_contentcollectionitem_add_page',\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit'),\n 'type' => MENU_NORMAL_ITEM,\n 'weight' => 20,\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n\n );\n*/ \n/*\n $items[$this->path . '/add/' . 'thumbwhere_contentcollectionitem'] = array(\n 'title' => 'Add ' . 'ThumbWhereContentCollectionItem',\n 'page callback' => 'thumbwhere_contentcollectionitem_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollectionitem_create(array('type' => 'thumbwhere_contentcollectionitem'))),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollectionitem'),\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n*/\n // Loading and editing thumbwhere_contentcollectionitem entities\n $items[$this->path . '/thumbwhere_contentcollectionitem/' . $wildcard] = array(\n 'page callback' => 'thumbwhere_contentcollectionitem_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'weight' => 0,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n $items[$this->path . '/thumbwhere_contentcollectionitem/' . $wildcard . '/edit'] = array(\n 'title' => 'Edit',\n 'type' => MENU_DEFAULT_LOCAL_TASK,\n 'weight' => -10,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n );\n\n $items[$this->path . '/thumbwhere_contentcollectionitem/' . $wildcard . '/delete'] = array(\n 'title' => 'Delete',\n 'page callback' => 'thumbwhere_contentcollectionitem_delete_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'type' => MENU_LOCAL_TASK,\n 'context' => MENU_CONTEXT_INLINE,\n 'weight' => 10,\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n // Menu item for viewing thumbwhere_contentcollectionitems\n $items['thumbwhere_contentcollectionitem/' . $wildcard] = array(\n //'title' => 'Title',\n 'title callback' => 'thumbwhere_contentcollectionitem_page_title',\n 'title arguments' => array(1),\n 'page callback' => 'thumbwhere_contentcollectionitem_page_view',\n 'page arguments' => array(1),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('view', 1),\n 'type' => MENU_CALLBACK,\n );\n return $items;\n }", "protected function _content_template() {\n \n }", "function main($content,$conf)\t{\n\t\t$this->conf=$conf;\n\t\t$this->pi_setPiVarDefaults();\n\t\t$this->pi_loadLL();\n\t\t\n\t\tif(t3lib_div::_GET('mode') == 'showmessage'){\n\t\t\techo $this->getThemengebietesById(t3lib_div::_POST('messageid'));\n\t\t\texit();\n\t\t}\n\t\n\t\t$content = $this->getThemengebietes();\n\t\treturn $this->pi_wrapInBaseClass($content);\n\t}", "public function notifications() {\n \n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n \n // Verify if account is confirmed\n $this->_check_unconfirmed_account();\n \n \n $notifications = $this->notifications->get_notifications($this->user_id);\n \n // Load view/user/notifications.php file\n $this->body = 'user/notifications';\n $this->content = ['notifications' => $notifications];\n $this->user_layout();\n \n }", "function event_poll_page_handler($page) {\n\n\telgg_load_library('elgg:event_poll');\n\t$page_type = $page[0];\n\tswitch ($page_type) {\t\t\n\t\tcase 'add':\n\t\tcase 'edit':\n\t\t\tgatekeeper();\n\t\t\techo event_poll_get_page_content_edit($page_type,$page[1]);\n\t\t\tbreak;\n\t\tcase 'vote':\n\t\t\tgatekeeper();\n\t\t\techo event_poll_get_page_content_vote($page[1]);\n\t\t\tbreak;\n\t\tcase 'schedule':\n\t\t\tgatekeeper();\n\t\t\techo event_poll_get_page_content_schedule($page[1]);\n\t\t\tbreak;\n\t\tcase 'list':\n\t\t\tgatekeeper();\n\t\t\techo event_poll_get_page_content_list($page[1]);\n\t\t\tbreak;\n\t\tcase 'get_times_dropdown':\n\t\t\tgatekeeper();\n\t\t\techo event_poll_get_times_dropdown();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn FALSE;\n\t}\n\treturn TRUE;\n}", "function messenger_messages_page($id = NULL)\n{\n\n return '';\n}", "function main()\t{\n\t\t\t\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t\t\t\t// Access check!\n\t\t\t\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t\t\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t\t\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\t\t\t\n\t\t\t\t\tif (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))\t{\n\n\t\t\t\t\t\t\t// Draw the header.\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t\t\t\t$this->doc->form='<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">';\n\n\t\t\t\t\t\t\t// JavaScript\n\t\t\t\t\t\t$this->doc->JScode = '\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction confirmURL(text,URL){\n\t\t\t\t\t\t\t\t\tvar agree=confirm(text);\n\t\t\t\t\t\t\t\t\tif (agree) {\n\t\t\t\t\t\t\t\t\t\tjumpToUrl(URL);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t$this->doc->postCode='\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t';\n\n\t\t\t\t\t\t$headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />'\n\t\t\t\t\t\t\t. $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n\t\t\t\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t\t\t\t// Render content:\n\t\t\t\t\t\t$this->moduleContent();\n\n\n\t\t\t\t\t\t// ShortCut\n\t\t\t\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// If no access or if ID == zero\n\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}", "function plugin_page() {\n\n echo '<div class=\"wrap\">';\n echo '<h2>'.esc_html__( 'WC Sales Notification Settings','wc-sales-notification-pro' ).'</h2>';\n $this->save_message();\n $this->settings_api->show_navigation();\n $this->settings_api->show_forms();\n echo '</div>';\n\n }", "function getSubMenuPageContent() {\n \tif(isSet($_GET['page'])) {\n \t\tswitch($_GET['page']) {\n \t\t\tcase 'lepress':\n \t\t\tcase 'lepress-student-roster':\n \t\t\t\trequire_once('teacher_include/subscriptions.php');\n \t\t\t\tbreak;\n \t\t\tcase 'lepress-classbook':\n \t\t\t\trequire_once('teacher_include/classbook.php');\n \t\t\t\tbreak;\n \t\t\tcase 'lepress-import-export':\n \t\t\t\trequire_once('teacher_include/import_export.php');\n \t\t\t\tbreak;\n \t\t}\n \t}\n }", "function _thumbwhere_content_collection_notify() {\n\n if (twCanDebug()) {\n watchdog('thumbwhere_content_collection', 'incoming notification.');\n }\n\n $numargs = func_num_args();\n $arg_list = func_get_args();\n\n \n\tif (twCanDebug()) debug('$numargs = ' . $numargs);\n\t\n\tif (twCanDebug()) debug('$arg_list = ' . $arg_list);\n\t\n\tif (twCanDebug()) debug('$_REQUEST');\n\tif (twCanDebug()) debug($_REQUEST);\n\t\n\tif (twCanDebug()) debug('$_GET');\n\tif (twCanDebug()) debug($_GET);\n\t\n\tif (twCanDebug()) debug('$_POST');\n\tif (twCanDebug()) debug($_POST);\n\t\n\t//if (twCanDebug()) debug('$HTTP_RAW_POST_DATA');\n\t//if (twCanDebug()) debug($HTTP_RAW_POST_DATA);\n\t\n\tif (twCanDebug()) debug('$_SERVER');\n\tif (twCanDebug()) debug($_SERVER);\n\t\n\t//if (twCanDebug()) debug('$GLOBALS');\n\t//if (twCanDebug()) debug($GLOBALS);\n\n \n\n if (variable_get('thumbwhere_api_log_debug', 0) == 1) {\n foreach ($arg_list as $arg) {\n if (twCanDebug()) debug('$arg = ' . $arg);\n }\n }\n\n\n //////////////////////////////////////////////////\n //\n //\n\n switch ($_SERVER['REQUEST_METHOD']) {\n\n case 'POST': {\n if ($numargs == 1) {\n if ($arg_list[0] == 'content_collection') {\n\n //\n // Get the POST data as XML\n //\n\n $post_xml = new SimpleXMLElement('php://input', null, true);\n if (twCanDebug()) debug('$post_xml');\n if (twCanDebug()) debug($post_xml);\n\n if (twCanDebug()) debug('$post_xml->getName()');\n if (twCanDebug()) debug($post_xml->getName());\n\n // We expect 'action' as the root element. TODO: I would rather this was the more generic 'request'\n if ($post_xml->getName() != 'action') {\n drupal_add_http_header('Status', '404 not found.');\n print('We were expecting \\'action\\', as the root element, not \\'' . $post_xml->getName() . '\\'.');\n exit(0);\n }\n\n /*\n * SimpleXMLElement::__set_state(array(\n * 'content_collection' =>\n * SimpleXMLElement::__set_state(array(\n * '@attributes' =>\n * array (\n * 'key' => '8e9ff318-3cd7-4593-99de-4c37c0fb335a',\n * 'op' => 'create',\n * ),\n * )),\n * ))\n */\n\n\n // We expect 'action' as the root element.\n if (!isset($post_xml->content_collection)) {\n drupal_add_http_header('Status', '404 not found.');\n print('We were expecting a \\'content_collection\\', element in the action payload.');\n exit(0);\n }\n\n // Handle the incoming notification for content ingest\n _thumbwhere_handle_content_collection_notify_xml($post_xml->content_collection);\n\n }\n else {\n drupal_add_http_header('Status', '404 not found.');\n print('Invalid resource');\n exit(0);\n }\n }\n else {\n drupal_add_http_header('Status', '404 not found.');\n print('Invalid notification request url format.');\n exit(0);\n }\n }\n break;\n\n case 'GET': {\n\n if ($numargs == 1) {\n\n // If we are returning the index.xml file for the webservice.\n if ($arg_list[0] == 'index.xml') {\n // return index.xml\n drupal_add_http_header('Content-Type', 'text/xml');\n readfile(dirname(__FILE__) . '/index.xml');\n exit(0);\n }\n else {\n drupal_add_http_header('Status', '404 not found.');\n print('File not found.');\n exit(0);\n }\n }\n else {\n drupal_add_http_header('Status', '404 not found.');\n print('Invalid notification request url format.');\n exit(0);\n }\n }\n break;\n\n default: {\n drupal_add_http_header('Status', '404 not found.');\n exit(0);\n }\n break;\n }\n\n //\n //\n ////////////////////////////////////////////////////////////////////////////////////\n \n}", "function display_default() {\n\n $target = $this->get_new_page(array('action' => 'default'));\n\n $configform = new $this->form_class($target->url);\n\n $configform->set_data(elis::$config->local_elisprogram);\n\n if ($configdata = $configform->get_data()) {\n /// Notifications section:\n\n configpage::config_set_value($configdata, 'notify_classenrol_user', 0);\n configpage::config_set_value($configdata, 'notify_classenrol_role', 0);\n configpage::config_set_value($configdata, 'notify_classenrol_supervisor', 0);\n if (empty($configdata->notify_classenrol_message)) {\n $configdata->notify_classenrol_message = get_string('notifyclassenrolmessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_classenrol_message', $configdata->notify_classenrol_message);\n\n configpage::config_set_value($configdata, 'notify_classcompleted_user', 0);\n configpage::config_set_value($configdata, 'notify_classcompleted_role', 0);\n configpage::config_set_value($configdata, 'notify_classcompleted_supervisor', 0);\n if (empty($configdata->notify_classcompleted_message)) {\n $configdata->notify_classcompleted_message = get_string('notifyclasscompletedmessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_classcompleted_message', $configdata->notify_classcompleted_message);\n\n configpage::config_set_value($configdata, 'notify_classnotstarted_user', 0);\n configpage::config_set_value($configdata, 'notify_classnotstarted_role', 0);\n configpage::config_set_value($configdata, 'notify_classnotstarted_supervisor', 0);\n if (empty($configdata->notify_classnotstarted_message)) {\n $configdata->notify_classnotstarted_message = get_string('notifyclassnotstartedmessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_classnotstarted_message', $configdata->notify_classnotstarted_message);\n configpage::config_set_value($configdata, 'notify_classnotstarted_days', 0);\n\n configpage::config_set_value($configdata, 'notify_classnotcompleted_user', 0);\n configpage::config_set_value($configdata, 'notify_classnotcompleted_role', 0);\n configpage::config_set_value($configdata, 'notify_classnotcompleted_supervisor', 0);\n if (empty($configdata->notify_classnotcompleted_message)) {\n $configdata->notify_classnotcompleted_message = get_string('notifyclassnotcompletedmessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_classnotcompleted_message', $configdata->notify_classnotcompleted_message);\n configpage::config_set_value($configdata, 'notify_classnotcompleted_days', 0);\n\n configpage::config_set_value($configdata, 'notify_curriculumcompleted_user', 0);\n configpage::config_set_value($configdata, 'notify_curriculumcompleted_role', 0);\n configpage::config_set_value($configdata, 'notify_curriculumcompleted_supervisor', 0);\n if (empty($configdata->notify_curriculumcompleted_message)) {\n $configdata->notify_curriculumcompleted_message = get_string('notifycurriculumcompletedmessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_curriculumcompleted_message', $configdata->notify_curriculumcompleted_message);\n\n\n configpage::config_set_value($configdata, 'notify_curriculumnotcompleted_user', 0);\n configpage::config_set_value($configdata, 'notify_curriculumnotcompleted_role', 0);\n configpage::config_set_value($configdata, 'notify_curriculumnotcompleted_supervisor', 0);\n if (empty($configdata->notify_curriculumnotcompleted_message)) {\n $configdata->notify_curriculumnotcompleted_message = get_string('notifycurriculumnotcompletedmessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_curriculumnotcompleted_message', $configdata->notify_curriculumnotcompleted_message);\n configpage::config_set_value($configdata, 'notify_curriculumnotcompleted_days', 0);\n\n configpage::config_set_value($configdata, 'notify_trackenrol_user', 0);\n configpage::config_set_value($configdata, 'notify_trackenrol_role', 0);\n configpage::config_set_value($configdata, 'notify_trackenrol_supervisor', 0);\n if (empty($configdata->notify_trackenrol_message)) {\n $configdata->notify_trackenrol_message = get_string('notifytrackenrolmessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_trackenrol_message', $configdata->notify_trackenrol_message);\n\n\n configpage::config_set_value($configdata, 'notify_courserecurrence_user', 0);\n configpage::config_set_value($configdata, 'notify_courserecurrence_role', 0);\n configpage::config_set_value($configdata, 'notify_courserecurrence_supervisor', 0);\n if (empty($configdata->notify_courserecurrence_message)) {\n $configdata->notify_courserecurrence_message = get_string('notifycourserecurrencemessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_courserecurrence_message', $configdata->notify_courserecurrence_message);\n configpage::config_set_value($configdata, 'notify_courserecurrence_days', 0);\n\n configpage::config_set_value($configdata, 'notify_curriculumrecurrence_user', 0);\n configpage::config_set_value($configdata, 'notify_curriculumrecurrence_role', 0);\n configpage::config_set_value($configdata, 'notify_curriculumrecurrence_supervisor', 0);\n if (empty($configdata->notify_curriculumrecurrence_message)) {\n $configdata->notify_curriculumrecurrence_message = get_string('notifycurriculumrecurrencemessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_curriculumrecurrence_message', $configdata->notify_curriculumrecurrence_message);\n configpage::config_set_value($configdata, 'notify_curriculumrecurrence_days', 0);\n\n configpage::config_set_value($configdata, 'notify_addedtowaitlist_user', 1);\n configpage::config_set_value($configdata, 'notify_enroledfromwaitlist_user', 1);\n configpage::config_set_value($configdata, 'notify_incompletecourse_user', 1);\n }\n\n $configform->display();\n }", "public function setFrontEndPages() {\n // Get badge page retrieved from the plugin setting\n $getBadgePage = get_post(\n SettingsTemp::getOption(SettingsTemp::FI_GET_BADGE)\n );\n\n if ($getBadgePage) {\n $args = array(\n // # GET BADGE PAGE\n array(\n 'slug' => $getBadgePage->post_name,\n 'class' => GetBadgeTemp::class,\n ),\n );\n $this->settings->loadFrontEndPages($args);\n }\n }", "function omn_superadmin_overview_page() {\n\n\tif( isset($_REQUEST['action']) ) {\n $action = $_REQUEST['action'];\n } else {\n $action = 'default';\n }\n \n switch( $action ) {\n case 'add':\n \tomn_superadmin_overview_page_add();\n \tbreak;\n case 'delete-notification':\n \tomn_delete_notification( $_GET['user'], $_GET['message'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n case 'expire-message':\n \tomn_delete_notifications( $_GET['id'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n case 'delete-message':\n \tomn_delete_message( $_GET['id'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n default:\n \tomn_superadmin_overview_page_default();\n \tbreak;\n }\n}", "protected function content_template() {\n\t}", "function getSubMenuPageContent() {\n \tif(isSet($_GET['page'])) {\n \t\tswitch($_GET['page']) {\n \t\t\tcase 'lepress-my-subscriptions':\n \t\t\tcase 'lepress':\n \t\t\t\trequire_once('student_include/subscriptions.php');\n \t\t\t\tbreak;\n \t\t\tcase 'lepress-assignments':\n \t\t\t\trequire_once('student_include/assignments.php');\n \t\t\t\tbreak;\n \t\t\tcase 'lepress-groups':\n \t\t\t\trequire_once('student_include/my-groups.php');\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\techo \"tere\";\n \t\t\t\tbreak;\n \t\t}\n \t}\n }", "public function setPages() {\n $this->pages = array(\n array(\n 'page_title' => 'Open Badge',\n 'menu_title' => 'Open Badge',\n 'capability' => 'manage_options',\n 'menu_slug' => self::SLUG_PLUGIN,\n 'callback' => array(DashboardTemp::class, 'main'),\n 'icon_url' => 'dashicons-awards',\n 'position' => '110'\n )\n );\n }", "function dispatch_wiki_post_notification($post_id, $type)\n{\n require_lang('wiki');\n\n $page_id = $GLOBALS['SITE_DB']->query_select_value('wiki_posts', 'page_id', array('id' => $post_id));\n $the_message = $GLOBALS['SITE_DB']->query_select_value('wiki_posts', 'the_message', array('id' => $post_id));\n $page_name = get_translated_text($GLOBALS['SITE_DB']->query_select_value('wiki_pages', 'title', array('id' => $page_id)));\n $_the_message = get_translated_text($the_message);\n\n $_view_url = build_url(array('page' => 'wiki', 'type' => 'browse', 'id' => $page_id), get_page_zone('wiki'), null, false, false, true);\n $view_url = $_view_url->evaluate();\n $their_displayname = $GLOBALS['FORUM_DRIVER']->get_username(get_member(), true);\n $their_username = $GLOBALS['FORUM_DRIVER']->get_username(get_member());\n\n require_code('notifications');\n\n $subject = do_lang($type . '_WIKI_POST_SUBJECT', $page_name, $their_displayname, $their_username, get_site_default_lang());\n $message_raw = do_notification_lang($type . '_WIKI_POST_BODY', comcode_escape($their_displayname), comcode_escape($page_name), array(comcode_escape($view_url), $_the_message, strval(get_member()), comcode_escape($their_username)), get_site_default_lang());\n\n dispatch_notification('wiki', strval($page_id), $subject, $message_raw);\n}", "function get_the_doc_page($doc_id,$item){\nglobal $prefix_doc;\nif($doc_id=='list'){\n\tif($item =='title'){\n\t\treturn 'Document Map';\n\t\n\t}\n\telse if($item == 'content'){\n\t$query = borno_query(\"SELECT id,title FROM $prefix_doc WHERE doc_status='publish'\");\n\n\t\t\n\t\t$output ='<ul>';\n\n\t\twhile($row=mysqli_fetch_array($query)){\n\n\t\t\t\t$output .= '<li><a href=\"'.doc_link($row['id']).'\">'.$row['title'].'</a></li>';\n\t\t\n\t\t\n\t\t}\n\t\t\tif(get_the_option('contactfrom')==='true'){\n\t\t\t\t\n\t\t\t\t$output .= '<li><a href=\"'.doc_link('contact').'\">Contact</a></li>';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\n\t\t$output .= '</ul>';\n\t\t\n\t\t$count = mysqli_num_rows($query);\n\t\tif($count==0){\n\t\t\treturn 'No document available ';\n\t\t}\n\t\treturn $output;\n\t}\n\telse if($item = 'count'){\n\t\n\t\t$query = borno_query(\"SELECT * FROM $prefix_doc WHERE doc_status='publish'\");\n\n\t\treturn mysqli_num_rows($query);\n\n\t}\n\n\t\n\n}/*contact form started */\nelse if($doc_id=='contact'){\n\tif($item =='title'){\n\t\treturn 'Contact form';\n\t}\n\telse if($item =='content'){\n\t\t$adrress = get_the_option('site_address').'/include/plugin/contact.php';\n\t\tinclude('include/function/contact.php');\n\t\t\n\t}\n\n}\n/*contact form end*/\nelse if(filter_var($doc_id, FILTER_VALIDATE_INT)){\n\t$doc_id = mysqli_escape($doc_id); //string\n\t$query = borno_query(\"SELECT * FROM $prefix_doc WHERE id='$doc_id'\");//$query\n\t\n\t//if any doc doc found in $GET[doc]\n\tif(mysqli_num_rows($query)=='1'){\n\t\t$row = mysqli_fetch_array($query);\n\t\t\n\t\t//if the doc condition is publish\n\t\tif($row['doc_status']=='publish'){\n\t\t\t\t//give permission\n\t\t\t\tif($item=='times'){\n\t\t\t\t\treturn $row['times'];\n\t\t\t\t}\n\t\t\t\telse if($item=='title'){\n\t\t\t\t\treturn $row['title'];\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if($item=='content'){\n\t\t\t\t\t\n\t\t\t\t\t$content = $row['content'];\n\t\t\t\t\t\tglobal $shortcoder;\n\t\t\t\t\t\t//$datas = str_replace();\n\t\t\t\t\t\tif(is_array($shortcoder)){\n\t\t\t\t\t\t\tforeach ($shortcoder as $shortcode){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$scode = $shortcode->shortcode_name;\n\t\t\t\t\t\t\t\t$sput = $shortcode->output;\n\t\t\t\t\t\t\t\t$content = str_replace('{'.$scode.'}',$sput,$content);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\treturn $content;\n\t\t\t\t}\n\t\t\t\telse if($item=='edited'){\n\t\t\t\t\treturn $row['edited'];\n\t\t\t\t}\n\t\t\t\telse if($item=='user_id'){\n\t\t\t\t\treturn $row['user_id'];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t//if the doc condition is draft\n\t\tif($row['doc_status']=='draft'){\n\t\t\t//if the doc editor id is equal to loggedin user id\n\t\t\tif($row['user_id']==loginuserinfo('id')){\n\t\t\t\t\t//give permission\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\telse{\n\t\treturn false;\n\t}\n}\nelse{\n\t\treturn false;\n}\n\n\n\n}", "public function page_metadata(){\n\t\t\t\n\t\t\tif(!$this->session->userdata('admin_logged_in')){\n\t\t\t\t\t\t\t\t\n\t\t\t\t$url = 'admin/login?redirectURL='.urlencode(current_url());\n\t\t\t\tredirect($url);\t\t\t\t\t\t\t\n\t\t\t\t//redirect('admin/login/','refresh');\n\t\t\t\t\n\t\t\t}else{\t\t\t\n\n\t\t\t\t$username = $this->session->userdata('admin_username');\n\t\t\t\t\n\t\t\t\t$data['user_array'] = $this->Admin->get_user($username);\n\t\t\t\t\t\n\t\t\t\t$fullname = '';\n\t\t\t\tif($data['user_array']){\n\t\t\t\t\tforeach($data['user_array'] as $user){\n\t\t\t\t\t\t$fullname = $user->admin_name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$data['fullname'] = $fullname;\n\t\t\t\t\t\n\t\t\t\t$data['unread_contact_us'] = $this->Contact_us->count_unread_messages();\n\t\t\t\t\t\n\t\t\t\t$messages_unread = $this->Messages->count_unread_messages($username);\n\t\t\t\tif($messages_unread == '' || $messages_unread == null){\n\t\t\t\t\t$data['messages_unread'] = 0;\n\t\t\t\t}else{\n\t\t\t\t\t$data['messages_unread'] = $messages_unread;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$data['header_messages_array'] = $this->Messages->get_header_messages($username);\n\t\t\t\t\n\t\t\t\t$enquiries_unread = $this->Sale_enquiries->count_unread_enquiries();\n\t\t\t\tif($enquiries_unread == '' || $enquiries_unread == null){\n\t\t\t\t\t$data['enquiries_unread'] = 0;\n\t\t\t\t}else{\n\t\t\t\t\t$data['enquiries_unread'] = $enquiries_unread;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//assign page title name\n\t\t\t\t$data['pageTitle'] = 'Page Metadata';\n\t\t\t\t\t\t\t\t\n\t\t\t\t//assign page title name\n\t\t\t\t$data['pageID'] = 'page_metadata';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t//load header and page title\n\t\t\t\t$this->load->view('admin_pages/header', $data);\n\t\t\t\t\t\t\t\n\t\t\t\t//load main body\n\t\t\t\t$this->load->view('admin_pages/page_metadata_page', $data);\t\n\t\t\t\t\t\n\t\t\t\t//load footer\n\t\t\t\t$this->load->view('admin_pages/footer');\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t}", "public function getPage($pageID){\n\t\t\t#error out if too many PHP notifications are supressed\n\t\t\terror_reporting(E_ALL);\n\t\t\t$GLOBALS['isPublic'] = true; #public side module\n\t\t\t$pagesObj = new pages(false, NULL); #need non-ajax results\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t$pageInfo = $pagesObj->getPageInfo($pageID);\n\t\t\t\n\t\t\t$_SESSION[\"pageName\"] = $pageInfo[\"pageName\"];\n\t\t\n\t\t\t#if the page redirects\n\t\t\tif(\n\t\t\t\tis_numeric($pageInfo[\"linkPageID\"]) && \n\t\t\t\t$pageInfo[\"linkPageID\"] != 0 && \n\t\t\t\t$pageInfo[\"linkPageID\"] != NULL\n\t\t\t){\n\t\t\t\t$tempForwardPage = $pageInfo;\n\t\t\t\t\n\t\t\t\t$linkedResult = $pagesObj->getRecordByID($pageInfo[\"linkPageID\"]);\n\t\t\t\t$pageInfo = $this->processRecord($linkedResult);\n\n\t\t\t\t#set the default URL parameters from the page thats redirecting\n\t\t\t\tif(strlen($tempForwardPage[\"defPageURLParams\"]) > 0){\n\t\t\t\t\t$_REQUEST[\"defPageURLParams\"] = $tempForwardPage[\"defPageURLParams\"];\n\t\t\t\t\tunset($tempForwardPag);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$_REQUEST[\"defPageURLParams\"] = $pageInfo[\"defPageURLParams\"];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$_REQUEST[\"defPageURLParams\"] = $pageInfo[\"defPageURLParams\"];\n\t\t\t}\n\t\t\t\n\t\t\t$pageID = $pageInfo[\"priKeyID\"]; \n\t\t\t \t\n\t\t\t#check if its a member only page, if it is check if they are logged in\n\t\t\t$hasAccess = false;\n\n\t\t\tif($pageInfo[\"isMembersPage\"] == 1 ){\n\t\t\t\t#all members have access to this page\n\t\t\t\tif(\n\t\t\t\t\t($pageInfo[\"allMembers\"] == 1 && \n\t\t\t\t\tisset($_SESSION[\"userID\"]) && $_SESSION[\"userID\"] != 0) ||\n\t\t\t\t\t$_SESSION['sessionSecurityLevel'] >= 3\n\t\t\t\t){\n\t\t\t\t\t$hasAccess = true;\n\t\t\t\t}\n\t\t\t\t#must be in a user group with access\n\t\t\t\telse{\n\t\t\t\t\t#get all user groups for this user, and see if any of them are mapped to this page\n\t\t\t\t\tinclude_once($_SERVER['DOCUMENT_ROOT'].\"/cmsAPI/publicUsers/publicUserGroups/publicUserGroupPageMap.php\");\n\t\t\t\t\t$publicUserGroupPageMapObj = new publicUserGroupPageMap(false,NULL);\n\t\t\t\t\tinclude_once($_SERVER['DOCUMENT_ROOT'].\"/cmsAPI/publicUsers/publicUserGroups/publicUserGroupMap.php\");\n\t\t\t\t\t$publicUserGroupMapObj = new publicUserGroupMap(false,NULL);\n\t\t\t\t\t\n\t\t\t\t\t$_SESSION[\"userID\"] = isset($_SESSION[\"userID\"]) ? $_SESSION[\"userID\"] : 0;\n\t\t\t\t\t\n\t\t\t\t\t#get user groups\n\t\t\t\t\t$mappedGroups = $publicUserGroupMapObj->getConditionalRecord(\n\t\t\t\t\t\tarray(\"publicUserID\",$_SESSION['userID'],true)\n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t\t\t#if the user is mapped to groups...\n\t\t\t\t\tif(mysqli_num_rows($mappedGroups) > 0){ \n\t\t\t\t\t\t#check if the users groups are mapped to the page\n\t\t\t\t\t\t$mappedUserGroupIDList = $publicUserGroupMapObj->getQueryValueString($mappedGroups,\"publicUserGroupID\");\n\t\t\t\t\t\t$mappedPages = $publicUserGroupPageMapObj->getConditionalRecordFromList(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"publicUserGroupID\",$mappedUserGroupIDList,true,\n\t\t\t\t\t\t\t\t\"pageID\",$pageID,true\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif(mysqli_num_rows($mappedPages) > 0){\n\t\t\t\t\t\t\t$hasAccess = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t#no member access\n\t\t\t\tif(!$hasAccess){\n\t\t\t\t\t#redirect them to the page id set in the nonMemberRedirect field in public_pages if it is not null\n\t\t\t\t\t$_SESSION[\"desiredPage\"] = $pageID;\n\n\t\t\t\t\tif(is_numeric($pageInfo['nonMemberRedirect'])) {\n\t\t\t\t\t\t$pageID = $pageInfo['nonMemberRedirect'];\n\t\t\t\t\t}\n\t\t\t\t\t#the default non member redirect page set in cmsSettings.php\n\t\t\t\t\telse {\n\t\t\t\t\t\t$pageID = $_SESSION['nonMemberDefaultRedirect'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$result = $pagesObj->getRecordByID($pageID);\n\t\t\t\t\t$pageInfo = $this->processRecord($result);\n\t\t\t\t\t\n\t\t\t\t\t#what page to go to if we create and account to access the page\n\t\t\t\t\t$pageArray['desiredPage'] = $_SESSION[\"desiredPage\"];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t#the fact that we have this many variables all getting the pageID tells me there should be a better way - Jared\n\t\t\t$_SESSION[\"pageID\"] = $_REQUEST[\"pageID\"] = $_GET[\"pageID\"] = $pageInfo[\"priKeyID\"];\n\t\t\t$pageID = $pageInfo[\"priKeyID\"]; \n\t\t\t\n\t\t\t#get the parent page info, if this is > level1, otherwise set itself as the parent\n\t\t\tif(is_numeric($pageInfo[\"parentPageID\"]) && $pageInfo[\"parentPageID\"] > 0){\n\t\t\t\t#array of all parents\n\t\t\t\t$parentPageArray = $this->getParentPages($pageInfo[\"priKeyID\"]);\n\t\t\t\t#index 0 is the root\n\t\t\t\t$rpi = $pagesObj->getRecordByID($parentPageArray[1]);\n\t\t\t\t$rootPageInfo = mysqli_fetch_assoc($rpi);\n\t\t\t\t$_GET[\"rootPageID\"] = $rootPageInfo[\"priKeyID\"];\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$rootPageInfo = $pageInfo;\n\t\t\t\t$_GET[\"rootPageID\"] = $pageInfo[\"priKeyID\"];\n\t\t\t}\n\t\t\t\n\t\t\t#$_GET so we can use the pageName in our modules\n\t\t\t$_GET['pageName'] = $pageInfo['pageName'];\n\t\t\t$_GET['rootPageName'] = $rootPageInfo['pageName'];\n\n\t\t\t#get all the modules for this page\n\t\t\tinclude_once($_SERVER['DOCUMENT_ROOT'].\"/cmsAPI/module/module.php\");\n\t\t\t$moduleObj = new module(false, NULL);\n\t\t\t$pageModules = $moduleObj->getModuleInfoQuery($_GET[\"pageID\"]);\n\t\t\t\n\t\t\t#check if page has primary modules\n\t\t\t$hasPrimaryMod = false;\n\t\t\twhile($pMod=mysqli_fetch_assoc($pageModules)){\n\t\t\t\tif($pMod[\"isPrimaryPageModule\"] == 1){\n\t\t\t\t\t$hasPrimaryMod = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t#last empty segment in URI can't belong to module. do 404 redirect\n\t\t\t/*if(\n\t\t\t\t#last empty segment in URI\n\t\t\t\tisset($_GET[\"hasLastEmptyURI\"]) && $_GET[\"hasLastEmptyURI\"] && \n\t\t\t\t(!isset($_GET[\"cms301\"]) || (isset($_GET[\"cms301\"]) && !$_GET[\"cms301\"])) &&\n\t\t\t\t#no modules, or no primary modules\n\t\t\t\t(mysqli_num_rows($pageModules) == 0 || !$hasPrimaryMod)\n\t\t\t){\n\t\t\t\theader($_SERVER[\"SERVER_PROTOCOL\"].\" 404 Not Found\", true, 404);\n\t\t\t\theader(\"Location: /index.php?pageID=-5\");\n\t\t\t}*/\n\n\t\t \t$_GET[\"moduleRunScripts\"] = \"\";\n\t\t\t$_GET[\"moduleScripts\"] = \"\";\n\t\t\t$_GET[\"moduleStyles\"] = \"\";\n\t\t\t\n\t\t\t$beforeModuleCode = \"\";\n\t\t\t$afterModuleCode = \"\";\n\n\t\t\t/*\n\t\t\t-set up instances\n\t\t\t-get the script code as text then insert into script tag. this \n\t\t\t way we can append to $moduleScripts for our level2 js code\n\t\t\t */\n\t\t\t \n\t\t\tmysqli_data_seek($pageModules,0);\n\t\t\twhile($pMod=mysqli_fetch_assoc($pageModules)){\n\t\t\t\tif($pMod[\"isTemplate\"]==0 || $pMod[\"isTemplate\"]==1 || $pMod[\"isTemplate\"]==3){\n\t\t\t\t\tinclude($_SERVER['DOCUMENT_ROOT'] . \"/cmsAPI/pages/pageModuleBuild.php\");\n\t\t\t\t}\n\t\t\t\telse{ \n\t\n\t\t\t\t\t$modContents = $this->getModuleContents(\n\t\t\t\t\t\t$_SERVER['DOCUMENT_ROOT'] . $pMod[\"includeFile\"],\n\t\t\t\t\t\t$pMod[\"priKeyID\"],$pageInfo\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t#if we're using a short code\n\t\t\t\t\tif(isset($pageInfo) && strpos($pageInfo['pageCode'], \"pmpmID\" . $pMod[\"priKeyID\"]) !== false){\n\t\t\t\t\t\t\n\t\t\t\t\t\t#replace the short code with the module\n\t\t\t\t\t\t$pageInfo['pageCode'] = $modContents;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t#appears after pageText\n\t\t\t\t\t\tif($pMod[\"beforeAfter\"]==1) {\n\t\t\t\t\t\t\t$afterModuleCode .= $modContents;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t#appears before pageText\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$beforeModuleCode .= $modContents;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t\t\n\t\t\t\t\t#if a module requires multiple script files we separate them\n\t\t\t\t\t#with ?^^? in the modules table\n\t\t\t\t\tob_start();\n\t\t\t\t\t$jScripts = explode(\"?^^?\",$pMod[\"jScript\"]);\n\t\t\t\t\tforeach($jScripts as $s){\n\t\t\t\t\t\tif(strlen($s) > 0) {\n\t\t\t\t\t\t\tinclude($_SERVER['DOCUMENT_ROOT'] . $s);\n\t\t\t\t\t\t\t$_GET[\"moduleScripts\"] .= ob_get_contents();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tob_end_clean();\n\t\t\t\t\t\n\t\t\t\t\t#functions to run when the scripts load\n\t\t\t\t\t$jRunScripts = explode(\"?^^?\",$pMod[\"runFunction\"]);\n\t\t\t\t\tforeach($jRunScripts as $s){\n\t\t\t\t\t\tif(strlen($s) > 0) {\n\t\t\t\t\t\t\t$_GET[\"moduleRunScripts\"] .= \";\" . $s;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tob_start();\n\t\t\t\t\t\tif(strlen($pMod[\"cssLink\"]) > 0) {\n\t\t\t\t\t\t\tinclude($_SERVER['DOCUMENT_ROOT'] . $pMod[\"cssLink\"]);\n\t\t\t\t\t\t}\n\t\t\t\t\t$_GET[\"moduleStyles\"] .= ob_get_contents();\n\t\t\t\t\tob_end_clean();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t#user wants to display the sub navigation on this page and its children\n if($pageInfo[\"showSubNav\"] == 1 || $rootPageInfo[\"showSubNav\"]) {\n \n #determine if its a side or top instance\n if($pageInfo[\"subNavType\"] == 1) $tmpPmPmID = -75;\n else $tmpPmPmID = -80;\n \n $pageModules = $moduleObj->getModuleInfoQuery(NULL,$tmpPmPmID);\n $pMod=mysqli_fetch_assoc($pageModules);\n \n include($_SERVER['DOCUMENT_ROOT'] . \"/cmsAPI/pages/pageModuleBuild.php\");\n }\n\n\t\t\t$pageArray = array();\n\t\t\tif(isset($_GET[\"primaryModulePageTitle\"]) && strlen($_GET[\"primaryModulePageTitle\"]) > 0){\n\t\t\t\t#add module item info to the page title\n\t\t\t\t$pageArray['pageTitle'] = $_GET[\"primaryModulePageTitle\"]; \n\t\t\t\t$pageArray['pageName'] = $pageInfo['pageName'];\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$pageArray['pageTitle'] = $pageInfo['pageTitle'];\n\t\t\t\t$pageArray['pageName'] = $pageInfo['pageName'];\n\t\t\t}\n\t\t\n\t\t\t$pageArray['pageCode'] = '<div class=\"pageText\" id=\"pageText' . $_GET[\"pageID\"] . '\" >\n\t\t\t\t\t\t\t\t\t '. $pageInfo['pageCode'] .'</div>' . PHP_EOL;\n\t\t\t$pageArray['metaWords'] = $pageInfo['metaWords'];\n\t\t\t$pageArray['metaDesc'] = $pageInfo['metaDesc'];\n\t\t\t$pageArray['beforeModuleCode'] = $beforeModuleCode;\n\t\t\t$pageArray['afterModuleCode'] = $afterModuleCode;\n\t\t\t$pageArray['moduleScripts'] = $_GET[\"moduleScripts\"];\n\t\t\t$pageArray['moduleRunScripts'] = $_GET[\"moduleRunScripts\"];\n\t\t\t$pageArray['pageTransition'] = $_SESSION[\"pageTransition\"];\n\t\t\t$pageArray['modulePageTransition'] = $_SESSION[\"modulePageTransition\"];\n\t\t\t$pageArray['moduleRunScripts'] .= (!empty($pageInfo['postUpdate']) && \n\t\t\t\t\t\t\t\t\t\t\t\t$_SESSION[\"singlePageSite\"] == 0) ? \n\t\t\t\t\t\t\t\t\t\t\t\t\"\\n\".$pageInfo['postUpdate'] : \"\";\n\t\t\t$pageArray['moduleStyles'] = $_GET[\"moduleStyles\"];\n\t\t\t$pageArray['priKeyID'] = $pageInfo['priKeyID'];\n\t\t\t$pageArray['rootPageID'] = $_GET['rootPageID'];\n\t\t\t#if we are using php 5.4 we can use the 2nd json_encode param for UTF_8 problems. see bug 153\t\n\t\t\tif($this->ajax) echo json_encode($pageArray);\n\t\t\telse return $pageArray;\t\t\t\t\t\t\t\t\t\t\t\n\t\t}", "function followedContentView($results, $pagination, $total, $error, $contentTypes) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<if test=\"haslikeserror:|:$error\">\n<p class='message error'>\n\t{$error}\n</p>\n<else />\n\t<if test=\"hasconfirm:|:$this->request['confirm']\">\n\t<p class='message'>\n\t\t{$this->lang->words['likes_rem_suc']}\n\t</p>\n\t</if>\n</if>\n<br />\n<input type='hidden' name=\"usedInJsLater\" id=\"urlString\" value=\"{parse expression=\"base64_encode( $this->registry->output->buildUrl( \"app=core&amp;module=search&amp;do=followed&amp;search_app={$this->request['search_app']}&amp;sid={$this->request['_sid']}\", \"public\" ) )\"}\" />\n<h1 class='ipsType_pagetitle'>{$this->lang->words['followed_content']}</h1>\n<div class='ipsType_pagedesc'>\n\t{$this->lang->words['followed_content_desc']}\n</div>\n<br />\n<div class='ipsLayout ipsLayout_withleft clearfix'>\n\t<div class='ipsLayout_left'>\n\t\t<div class='ipsBox'>\n\t\t\t<div class='ipsBox_container ipsSideMenu'>\n\t\t\t\t<h4>{$this->lang->words['filter_by_app']}</h4>\n\t\t\t\t<ul>\n\t\t\t\t\t<if test=\"memberFollow:|:IPSLib::appSupportsExtension( 'forums', array('like') )\"><li <if test=\"forumsTab:|:$this->request['search_app'] == 'forums'\">class='active'</if>><a href='{parse url=\"app=core&amp;module=search&amp;do=followed&amp;search_app=forums&amp;sid={$this->request['_sid']}\" base=\"public\"}'>{IPSLib::getAppTitle( 'forums' )}</a></li></if>\n\t\t\t\t\t<if test=\"memberFollow:|:IPSLib::appSupportsExtension( 'members', array('like') )\"><li <if test=\"membersTab:|:$this->request['search_app'] == 'members'\">class='active'</if>><a href='{parse url=\"app=core&amp;module=search&amp;do=followed&amp;search_app=members&amp;sid={$this->request['_sid']}\" base=\"public\"}'>{IPSLib::getAppTitle( 'members' )}</a></li></if>\n\t\t\t\t\t<foreach loop=\"apps:$this->registry->getApplications() as $app\">\n\t\t\t\t\t\t<if test=\"supportsLikes:|:IPSLib::appSupportsExtension( $app['app_directory'], array('like') ) AND !in_array( $app['app_directory'], array('core','forums','members') )\">\n\t\t\t\t\t\t\t<li <if test=\"appIsSearched:|:$this->request['search_app'] == $app['app_directory']\">class='active'</if>>\n\t\t\t\t\t\t\t\t<a href='{parse url=\"app=core&amp;module=search&amp;do=followed&amp;search_app={$app['app_directory']}&amp;sid={$this->request['_sid']}\" base=\"public\"}'>\n\t\t\t\t\t\t\t\t\t{IPSLib::getAppTitle( $app['app_directory'] )}\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t \t\t</if>\n\t\t\t\t\t</foreach>\n\t\t\t\t</ul>\n\t\t\t\t<if test=\"is_array($contentTypes) AND count( $contentTypes )\">\n\t\t\t\t\t<h4>{$this->lang->words['filter_by_section']}</h4>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<foreach loop=\"$contentTypes as $type\">\n\t\t\t\t\t\t\t<li <if test=\"$this->request['contentType'] == $type\">class='active'</if>>\n\t\t\t\t\t\t\t\t<a href='{parse url=\"app=core&amp;module=search&amp;do=followed&amp;search_app={$this->request['search_app']}&amp;sid={$this->request['_sid']}&amp;contentType={$type}\" base=\"public\"}'>{$this->lang->words['followed_type__' . $type]}</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</foreach>\n\t\t\t\t\t</ul>\n\t\t\t\t</if>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<form action=\"{parse url=\"app=core&amp;module=search&amp;do=manageFollowed&amp;search_app={$this->request['search_app']}&amp;contentType={$this->request['contentType']}\" base=\"public\"}\" id=\"checkBoxForm\" method=\"post\">\n\t<input type=\"hidden\" name=\"secure_key\" value=\"{$this->member->form_hash}\" />\n\t\n\t<div class='right clearfix'>\n\t\t<a href='#' id='toggle_notification' class='ipsButton_secondary'>{$this->lang->words['display_edit_options']}</a>\n\t</div>\n\t<br /><br />\n\t\n\t<div class='ipsLayout_content'>\n\t\t<h2 class='maintitle'>\n\t\t\t<span class='right'>\n\t\t\t\t<input type='checkbox' id='checkAllLikes' class='input_check toggle_notify_on' title='{$this->lang->words['search_select_all']}' value='1' />\n\t\t\t</span>\n\t\t\t<if test=\"searchedApp:|:$this->request['search_app']\">{IPSLib::getAppTitle( $this->request['search_app'] )}<else />{$this->lang->words['search_all']}</if>\n\t\t</h2>\n\t\t<div>\n\t\t\t<if test=\"NPTotal:|:$total\">\n\t\t\t\t{$results}\n\t\t\t\t\n\t\t\t\t<if test=\"hasLikeForMod:|:count($results)\">\n\t\t\t\t\t\n\t\t\t\t\t<div class='moderation_bar rounded with_action toggle_notify_on'>\n\t\t\t\t\t\t<select name='modaction' class='input_select'>\n\t\t\t\t\t\t\t<option value=''>{$this->lang->words['like_mod__chose']}</option>\n\t\t\t\t\t\t\t<option value='delete'>{$this->lang->words['like_mod__delete']}</option>\n\t\t\t\t\t\t\t<option value='change-donotify'>{$this->lang->words['like_mod__change_donotify']}</option>\n\t\t\t\t\t\t\t<option value='change-donotnotify'>{$this->lang->words['like_mod__change_nonotify']}</option>\n\t\t\t\t\t\t\t<option value='change-immediate'>{$this->lang->words['like_mod__change_immediate']}</option>\n\t\t\t\t\t\t\t<option value='change-offline'>{$this->lang->words['like_mod__change_offline']}</option>\n\t\t\t\t\t\t\t<if test=\"forumsDigests:|:$this->request['search_app'] == 'forums'\">\n\t\t\t\t\t\t\t\t<option value='change-daily'>{$this->lang->words['like_mod__change_daily']}</option>\n\t\t\t\t\t\t\t\t<option value='change-weekly'>{$this->lang->words['like_mod__change_weekly']}</option>\n\t\t\t\t\t\t\t</if>\n\t\t\t\t\t\t\t<option value='change-anon'>{$this->lang->words['like_mod__change_anon']}</option>\n\t\t\t\t\t\t\t<option value='change-noanon'>{$this->lang->words['like_mod__change_noanon']}</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t<input type=\"submit\" class=\"input_submit alt\" value=\"{$this->lang->words['update_selected']}\" />\n\t\t\t\t\t</div>\n\t\t\t\t</if>\n\t\t\t\t<br />\n\t\t\t\t{$pagination}\n\t\t\t<else />\n\t\t\t\t<p class='no_messages'>{$this->lang->words['followed_content_none']}</p>\n\t\t\t</if>\n\t\t</div>\n\t</div>\n\t\n\t</form>\n</div>\n<br class='clear' />\n<script type='text/javascript'>\n\tipb.global.registerCheckAll('checkAllLikes', 'checkall');\n\t\n\tif( $('toggle_notification') ){\n\t\t$('toggle_notification').observe( 'click', function(e){\n\t\t\tEvent.stop(e);\n\t\t\t$('checkBoxForm').toggleClassName('show_notify');\n\t\t});\n\t}\n</script>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "function templatePage ($s_content, $s_title, $s_header='', $s_footer='') {\n\treturn template_tags (template_load ('base.html'), array (\n\t\t'TITLE' => $s_title, 'HEADER' => $s_header, 'FOOTER' => $s_footer, 'CONTENT' => $s_content\n\t));\n}", "function _wp_block_editor_posts_page_notice()\n {\n }", "function _setContent()\r\n {\r\n global $_FRONTEND_LANGID;\r\n\r\n $this->_objTpl->addBlockfile('FILEBROWSER_CONTENT', 'fileBrowser_content', 'module_fileBrowser_content.html');\r\n\r\n $ckEditorFuncNum = isset($_GET['CKEditorFuncNum']) ? '&amp;CKEditorFuncNum='.contrexx_raw2xhtml($_GET['CKEditorFuncNum']) : '';\r\n $ckEditor = isset($_GET['CKEditor']) ? '&amp;CKEditor='.contrexx_raw2xhtml($_GET['CKEditor']) : '';\r\n $rowNr = 0;\r\n\r\n switch ($this->_mediaType) {\r\n case 'webpages':\r\n $jd = new \\Cx\\Core\\Json\\JsonData();\r\n $data = $jd->data('node', 'getTree', array('get' => array('recursive' => 'true')));\r\n $pageStack = array();\r\n $ref = 0;\r\n $data['data']['tree'] = array_reverse($data['data']['tree']);\r\n foreach ($data['data']['tree'] as &$entry) {\r\n $entry['attr']['level'] = 0;\r\n array_push($pageStack, $entry);\r\n }\r\n while (count($pageStack)) {\r\n $entry = array_pop($pageStack);\r\n $page = $entry['data'][0];\r\n $arrPage['level'] = $entry['attr']['level'];\r\n $arrPage['node_id'] = $entry['attr']['rel_id'];\r\n $children = $entry['children'];\r\n $children = array_reverse($children);\r\n foreach ($children as &$entry) {\r\n $entry['attr']['level'] = $arrPage['level'] + 1;\r\n array_push($pageStack, $entry);\r\n }\r\n $arrPage['catname'] = $page['title'];\r\n $arrPage['catid'] = $page['attr']['id'];\r\n $arrPage['lang'] = BACKEND_LANG_ID;\r\n $arrPage['protected'] = $page['attr']['protected'];\r\n $arrPage['type'] = \\Cx\\Core\\ContentManager\\Model\\Entity\\Page::TYPE_CONTENT;\r\n $arrPage['alias'] = $page['title'];\r\n $arrPage['frontend_access_id'] = $page['attr']['frontend_access_id'];\r\n $arrPage['backend_access_id'] = $page['attr']['backend_access_id'];\r\n \r\n // JsonNode does not provide those\r\n //$arrPage['level'] = ;\r\n //$arrPage['type'] = ;\r\n //$arrPage['parcat'] = ;\r\n //$arrPage['displaystatus'] = ;\r\n //$arrPage['moduleid'] = ;\r\n //$arrPage['startdate'] = ;\r\n //$arrPage['enddate'] = ;\r\n \r\n // But we can simulate level and type for our purposes: (level above)\r\n $jsondata = json_decode($page['attr']['data-href']);\r\n $path = $jsondata->path;\r\n if (trim($jsondata->module) != '') {\r\n $arrPage['type'] = \\Cx\\Core\\ContentManager\\Model\\Entity\\Page::TYPE_APPLICATION;\r\n $module = explode(' ', $jsondata->module, 2);\r\n $arrPage['modulename'] = $module[0];\r\n if (count($module) > 1) {\r\n $arrPage['cmd'] = $module[1];\r\n }\r\n }\r\n \r\n $url = \"'\" . '[[' . \\Cx\\Core\\ContentManager\\Model\\Entity\\Page::PLACEHOLDER_PREFIX;\r\n \r\n// TODO: This only works for regular application pages. Pages of type fallback that are linked to an application\r\n// will be parsed using their node-id ({NODE_<ID>})\r\n if (($arrPage['type'] == \\Cx\\Core\\ContentManager\\Model\\Entity\\Page::TYPE_APPLICATION) && ($this->_mediaMode !== 'alias')) {\r\n $url .= $arrPage['modulename'];\r\n if (!empty($arrPage['cmd'])) {\r\n $url .= '_' . $arrPage['cmd'];\r\n }\r\n \r\n $url = strtoupper($url);\r\n } else {\r\n $url .= $arrPage['node_id'];\r\n }\r\n \r\n // if language != current language or $alwaysReturnLanguage\r\n if ($this->_frontendLanguageId != $_FRONTEND_LANGID ||\r\n (isset($_GET['alwaysReturnLanguage']) &&\r\n $_GET['alwaysReturnLanguage'] == 'true')) {\r\n $url .= '_' . $this->_frontendLanguageId;\r\n }\r\n $url .= \"]]'\";\r\n \r\n $this->_objTpl->setVariable(array(\r\n 'FILEBROWSER_ROW_CLASS' => $rowNr%2 == 0 ? \"row1\" : \"row2\",\r\n 'FILEBROWSER_FILE_PATH_CLICK' => \"javascript:{setUrl($url,null,null,'\".\\FWLanguage::getLanguageCodeById($this->_frontendLanguageId).$path.\"','page')}\",\r\n 'FILEBROWSER_FILE_NAME' => $arrPage['catname'],\r\n 'FILEBROWSER_FILESIZE' => '&nbsp;',\r\n 'FILEBROWSER_FILE_ICON' => $this->_iconPath.'htm.png',\r\n 'FILEBROWSER_FILE_DIMENSION' => '&nbsp;',\r\n 'FILEBROWSER_SPACING_STYLE' => 'style=\"margin-left: '.($arrPage['level'] * 15).'px;\"',\r\n ));\r\n $this->_objTpl->parse('content_files');\r\n \r\n $rowNr++;\r\n }\r\n break;\r\n case 'Media1':\r\n case 'Media2':\r\n case 'Media3':\r\n case 'Media4':\r\n \\Permission::checkAccess(7, 'static'); //Access Media-Archive\r\n \\Permission::checkAccess(38, 'static'); //Edit Media-Files\r\n \\Permission::checkAccess(39, 'static'); //Upload Media-Files\r\n\r\n //Hier soll wirklich kein break stehen! Beabsichtig!\r\n \r\n \r\n default:\r\n if (count($this->_arrDirectories) > 0) {\r\n foreach ($this->_arrDirectories as $arrDirectory) {\r\n $this->_objTpl->setVariable(array(\r\n 'FILEBROWSER_ROW_CLASS' => $rowNr%2 == 0 ? \"row1\" : \"row2\",\r\n 'FILEBROWSER_FILE_PATH_CLICK' => \"index.php?cmd=FileBrowser&amp;standalone=true&amp;langId={$this->_frontendLanguageId}&amp;type={$this->_mediaType}&amp;path={$arrDirectory['path']}\". $ckEditor . $ckEditorFuncNum,\r\n 'FILEBROWSER_FILE_NAME' => $arrDirectory['name'],\r\n 'FILEBROWSER_FILESIZE' => '&nbsp;',\r\n 'FILEBROWSER_FILE_ICON' => $arrDirectory['icon'],\r\n 'FILEBROWSER_FILE_DIMENSION' => '&nbsp;',\r\n ));\r\n $this->_objTpl->parse('content_files');\r\n $rowNr++;\r\n }\r\n }\r\n \r\n if (count($this->_arrFiles) > 0) {\r\n $arrEscapedPaths = array();\r\n foreach ($this->_arrFiles as $arrFile) {\r\n $arrEscapedPaths[] = contrexx_raw2encodedUrl($arrFile['path']);\r\n $this->_objTpl->setVariable(array(\r\n 'FILEBROWSER_ROW_CLASS' => $rowNr%2 == 0 ? \"row1\" : \"row2\",\r\n 'FILEBROWSER_ROW_STYLE'\t\t\t\t=> in_array($arrFile['name'], $this->highlightedFiles) ? ' style=\"background: '.$this->highlightColor.';\"' : '',\r\n 'FILEBROWSER_FILE_PATH_DBLCLICK' => \"setUrl('\".contrexx_raw2xhtml($arrFile['path']).\"',\".$arrFile['width'].\",\".$arrFile['height'].\",'')\",\r\n 'FILEBROWSER_FILE_PATH_CLICK' => \"javascript:{showPreview(\".(count($arrEscapedPaths)-1).\",\".$arrFile['width'].\",\".$arrFile['height'].\")}\",\r\n 'FILEBROWSER_FILE_NAME' => contrexx_stripslashes($arrFile['name']),\r\n 'FILEBROWSER_FILESIZE' => $arrFile['size'].' KB',\r\n 'FILEBROWSER_FILE_ICON' => $arrFile['icon'],\r\n 'FILEBROWSER_FILE_DIMENSION' => (empty($arrFile['width']) && empty($arrFile['height'])) ? '' : intval($arrFile['width']).'x'.intval($arrFile['height'])\r\n ));\r\n $this->_objTpl->parse('content_files');\r\n $rowNr++;\r\n }\r\n \r\n $this->_objTpl->setVariable('FILEBROWSER_FILES_JS', \"'\".implode(\"','\",$arrEscapedPaths).\"'\");\r\n }\r\n if (array_key_exists($this->_mediaType, $this->mediaTypePaths)) {\r\n $this->_objTpl->setVariable('FILEBROWSER_IMAGE_PATH', $this->mediaTypePaths[$this->_mediaType][1]);\r\n } else {\r\n $this->_objTpl->setVariable('FILEBROWSER_IMAGE_PATH', ASCMS_CONTENT_IMAGE_WEB_PATH);\r\n }\r\n break;\r\n }\r\n $this->_objTpl->parse('fileBrowser_content');\r\n }", "function my_admin_page_contents() {\n\t\t?>\n\t\t\t<h1>\n\t\t\t\tPage d'aministration du plugin de création de formulaire\n\t\t\t\t\n\t\t\t</h1>\n\t\t<?php\n\t}", "public function addPages()\r\n {\r\n $settings = add_options_page(\r\n 'OHS Newsletter',\r\n 'OHS Newsletter',\r\n 'manage_options',\r\n 'ohs-newsletter',\r\n array($this, 'optionsPage')\r\n );\r\n }", "function smarty_function_pagesetter_pubBrowser($args, &$smarty)\n{\n\n\t//*****************************************\n\t// Customization area\n\t//*****************************************\n\t// Define the text attributes for the links (size, color...)\n\t$style = \"color: black; text-decoration: none;\";\n\t// Define a symbol. It is displayed left of the previous link. You can leave it blank, if you don't need it.\n\t$prevSymbol = \"&lt;&lt; \";\n\t// Define a symbol. It is displayed right of the next link. You can leave it blank, if you don't need it.\n\t$nextSymbol = \" &gt;&gt;\";\n\t// The previous link of the first publication links to the list of the current pub type. Define the text here.\n\t$back2overview_left = \"back to overview\";\n\t// The next link of the last publication links to the list of the current pub type. Define the text here.\n\t$back2overview_right = \"back to overview\";\n\t//*****************************************\n\t// End of customization area\n\t//*****************************************\n\t\n\t$core = $smarty->get_template_vars('core');\n\t$id = $core['id'];\n\t\n\tif (!isset($language))\n\t $language = pnUserGetLang();\n\t\n // Get stuff that exists in core\n $page = isset($args['page']) ? intval($args['page']) : intval($core['page']);\n $baseURL = isset($args['baseURL']) ? $args['baseURL'] : $core['baseURL'];\n\n //Build filter array and filter string\n //this will get filter, filter1,...,filtern from the url\n //note: the filter string will use filters starting from filter1\n $filterStrSet = pagesetterGetFilters(array(), $dummyArgs);\n if(count($filterStrSet) != 0)\n {\n $temp = array();\n foreach( $filterStrSet as $key => $item )\n {\n $i = $key + 1;\n $temp[] = \"filter$i=\" . $item;\n }\n $filterStr = \"&amp;\" . implode(\"&amp;\", $temp);\n } else $filterStr = \"\";\n $baseURL .= $filterStr;\n \n\t$pubList = pnModAPIFunc( 'pagesetter', 'user', 'getPubList',\n\t array( 'tid' => $core['tid'],\n\t 'language' => $language,\n 'filterSet' => $filterStrSet, \n 'noOfItems' => -1 ) );//EM: added 'noOfItems' => -1\n\t\n $pinfo = pnModAPIFunc( 'pagesetter', 'admin', 'getPubTypeInfo', array( 'tid' => $core['tid'], 'noOfItems' => 999 ) ); \n $perpage = $pinfo['publication']['listCount'];\n $perpage = isset($args['pageSize']) ? $args['pageSize'] : $perpage;\n\n\t$html = '';\n\t\n\t$counter = 0;\n\t$navhtml['prev'] = '<a href=\"index.php?module=pagesetter&amp;tid='.$core['tid'].'\" style=\"'.$style.'\">'.$prevSymbol.$back2overview_left.'</a>';\n\t$navhtml['next'] = '<a href=\"index.php?module=pagesetter&amp;tid='.$core['tid'].'\" style=\"'.$style.'\">'.$nextSymbol.$back2overview_right.'</a>';\n\t$foundprev = false;\n\t$foundnext = false;\n\tforeach ($pubList['publications'] as $pub)\n \t{\n\t\t$counter++;\n\t\tif (($pub['id'] != $id) && ($foundprev == false))\n\t\t{\n\t\t\t$link = htmlspecialchars( pnModURL('pagesetter','user','viewpub',array('tid' => $core['tid'], 'pid' => $pub['pid'] )));\n\t\t\t$navhtml['prev'] = '<a href=\"'.$link.'\" style=\"'.$style.'\">'.$prevSymbol.$pub['title'].'</a>';\n\t\t}\n\t\tif ($pub['id'] == $id)\n\t\t{\n\t\t\t$foundprev = true;\n $page = ceil($counter / $perpage);\n\t\t\t$link = htmlspecialchars( pnModURL('pagesetter','user','view',array('tid' => $core['tid'], 'page' => $page )));\n\t\t\t$navhtml['list'] = '[&nbsp;<a href=\"'.$link.'\" style=\"'.$style.'\">Liste</a>&nbsp;]';\n\t\t}\n\t\tif (($pub['id'] != $id) && ($foundprev == true) && ($foundnext == false))\n\t\t{\n\t\t\t$foundnext = true;\n\t\t\t$link = htmlspecialchars( pnModURL( 'pagesetter', 'user', 'viewpub', array( 'tid' => $core['tid'], 'pid' => $pub['pid'] )));\n\t\t\t$navhtml['next'] = '<a href=\"'.$link.'\" style=\"'.$style.'\">'.$pub['title'].$nextSymbol.'</a>';\n\t\t}\n\t}\n\t\n\t$smarty->assign('nav', $navhtml );\n\t\n}", "function editImportantPagesObject()\n\t{\n\t\tglobal $tpl, $ilToolbar, $ilTabs, $lng, $ilCtrl;\n\n\t\t$this->checkPermission(\"write\");\n\n\t\tilUtil::sendInfo($lng->txt(\"wiki_navigation_info\"));\n\t\t\n\t\t$ipages = ilObjWiki::_lookupImportantPagesList($this->object->getId());\n\t\t$ipages_ids = array();\n\t\tforeach ($ipages as $i)\n\t\t{\n\t\t\t$ipages_ids[] = $i[\"page_id\"];\n\t\t}\n\n\t\t// list pages\n\t\tinclude_once(\"./Modules/Wiki/classes/class.ilWikiPage.php\");\n\t\t$pages = ilWikiPage::getAllPages($this->object->getId());\n\t\t$options = array(\"\" => $lng->txt(\"please_select\"));\n\t\tforeach ($pages as $p)\n\t\t{\n\t\t\tif (!in_array($p[\"id\"], $ipages_ids))\n\t\t\t{\n\t\t\t\t$options[$p[\"id\"]] = ilUtil::shortenText($p[\"title\"], 60, true);\n\t\t\t}\n\t\t}\n\t\tif (count($options) > 0)\n\t\t{\n\t\t\tinclude_once(\"./Services/Form/classes/class.ilSelectInputGUI.php\");\n\t\t\t$si = new ilSelectInputGUI($lng->txt(\"wiki_pages\"), \"imp_page_id\");\n\t\t\t$si->setOptions($options);\n\t\t\t$si->setInfo($lng->txt(\"\"));\n\t\t\t$ilToolbar->addInputItem($si);\n\t\t\t$ilToolbar->setFormAction($ilCtrl->getFormAction($this));\n\t\t\t$ilToolbar->addFormButton($lng->txt(\"add\"), \"addImportantPage\");\n\t\t}\n\n\n\t\t$ilTabs->activateTab(\"settings\");\n\t\t$this->setSettingsSubTabs(\"imp_pages\");\n\n\t\tinclude_once(\"./Modules/Wiki/classes/class.ilImportantPagesTableGUI.php\");\n\t\t$imp_table = new ilImportantPagesTableGUI($this, \"editImportantPages\");\n\n\t\t$tpl->setContent($imp_table->getHTML());\n\t}", "function main($content, $conf) {\n\n\t\t// some basic stuff:\n\t\t$ts = time();\n\t\t$base_url = $GLOBALS['TSFE']->tmpl->setup['config.']['baseURL'];\n\t\t$this->eventRecordPid = $conf['eventRecordPid'];\n\t\t\n\t\t$content = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n\t\t<rss version=\"2.0\" >\n\t\t<channel>';\n\t\t\n\t\t$content .= '<title>RSS Feed YOURWEBSITE.TLD</title>\n\t\t\t\t\t<link>http://www.YOURWEBSITE.TLD</link>\n\t\t\t\t\t<description>Alle Veranstaltungen im Ueberblick</description>';\n\t\t$content .= '<language>de-de</language>\n\t\t\t\t\t<copyright>'. date('Y') .' by YOURWEBSITE.TLD</copyright>';\n\t\t\n\t\t$content .= '<image>\n\t\t\t<title>Aktuelle Veranstaltungen</title>\n\t\t\t<url>http://YOURWEBSITE.TLD/typo3conf/ext/kb_eventboard/res/rss_icon_16x16.gif</url>\n\t\t\t<link>http://www.YOURWEBSITE.TLD/</link>\n\t\t\t<width>16</width>\n\t\t\t<height>16</height>\n\t\t\t<description>Aktuelle Veranstaltungen</description>\n\t\t</image>';\n\n\t\t\t\t\n\t\t\t\t$select_fields = '*';\n\t\t\t\t$from_table = 'tx_kbeventboard_events'; // table of your extension\n\t\t\t\t$where = \"pid = \".$this->eventRecordPid.\" AND deleted = 0 AND hidden = 0 AND datebegin > \".$ts.\"\";\n\t\n\t\t\t\t$group = '';\n\t\t\t\t$order = 'datebegin ASC';\n\t\t\t\t$limit = '40';\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select_fields, $from_table, $where, $group, $order, $limit);\n\t\t\t\t\n\t\t\t\t$sql = $GLOBALS['TYPO3_DB']->SELECTquery($select_fields, $from_table, $where, $group, $order, $limit);\n\n\n\t\t\t\t// now put in all the items:\n\t\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){\n\n\t\t\t\t\t$pubDate = date('D, d M Y H:i:s O', $row[\"datebegin\"]); // timestamp in the correct format for the rss feed\n\t\t\t\t\t$link_to_detailpage = $base_url . 'index.php?id='.$conf[\"singlePid\"].'&amp;tx_kbeventboard_pi1[evt]='.$row[\"uid\"]; // link to the page with the detail view\n\t\t\t\t\t$description = substr(strip_tags($row[\"eventdescription\"]), 0, $conf[\"maxChars\"]) . ' [...]';\n\t\t\t\t\t$eventTitle = strip_tags($row[\"eventname\"]);\n\t\t\t\t\t\n\t\t\t\t\t$filter = array(\n\t\t\t\t\t\t\t\t'&nbsp;'=>'', '&quote;'=>'\"', '& ' => ' +'\n\t\t\t\t\t);\n\n\t\t\t\t\tforeach ($filter as $from => $to) {\n\t\t\t\t\t\t$description = str_replace($from, $to, $description);\n\t\t\t\t\t\t$eventTitle = str_replace($from, $to, $eventTitle);\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t\t$content .= '<item>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<title>'.date('d-m-Y',$row[\"datebegin\"]).': '.$eventTitle.'</title>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<link>'.$link_to_detailpage.'</link>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<description>'.$description.'</description>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<guid>'.$link_to_detailpage.'</guid>' . \"\\n\";\n\t\t\t\t\t\t$content .= '<pubdate>'.$pubDate.'</pubdate>' . \"\\n\";\n\t\t\t\t\t$content .= '</item>';\n\t\t\t\t}\n\n\t\t\t$content .= '</channel>';\n\t\t$content .= '</rss>';\n\n\t\treturn $content;\n\t}", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\tif (($this->id && $access) || ($BE_USER->user[\"admin\"] && !$this->id))\t{\n\n\t\t\t\t// Draw the header.\n\t\t\t$this->doc = t3lib_div::makeInstance(\"bigDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t$this->doc->form='<form action=\"index.php?id='.$this->id.'\" method=\"POST\">';\n\n\t\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader(\"pages\",$this->pageinfo,$this->pageinfo[\"_thePath\"]).\"<br />\".$LANG->sL(\"LLL:EXT:lang/locallang_core.xml:labels.path\").\": \".t3lib_div::fixed_lgd_pre($this->pageinfo[\"_thePath\"],50);\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\t\n\t\t\texec('hostname',$ret);\n\t\t\t$ret=implode(\"\",$ret);\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\") .\" on: $ret\");\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section(\"\",$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,\"SET[function]\",$this->MOD_SETTINGS[\"function\"],$this->MOD_MENU[\"function\"])));\n\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section(\"\",$this->doc->makeShortcutIcon(\"id\",implode(\",\",array_keys($this->MOD_MENU)),$this->MCONF[\"name\"]));\n\t\t\t}\n\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t} else {\n\t\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\t}", "function page_articles() {\r\n \t\tglobal $admin_lang, $extern_action, $extern_sure, $extern_title, $extern_text, $extern_image, $extern_description, $extern_id, $_SERVER, $actual_user_id, $actual_user_showname;\r\n\t\t\r\n\t\tif(!isset($extern_action))\r\n\t\t\t$extern_action = '';\r\n\t\t\r\n\t\t$out = \"\\t\\t\\t<h3>\" . $admin_lang['articles'] . \"</h3><hr />\\r\\n\";\r\n\t\t\r\n\t\t//\r\n\t\t// delete the selected entrie\r\n\t\t//\r\n\t\tif($extern_action == \"delete\") {\r\n\t\t\tif(isset($extern_sure)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tif($extern_sure == 1)\r\n\t\t\t\t\tdb_result(\"DELETE FROM \" . DB_PREFIX . \"articles WHERE article_id=\" . $extern_id);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$result = db_result(\"SELECT * FROM \" . DB_PREFIX . \"articles WHERE article_id=\" . $extern_id);\r\n\t\t\t\t$row = mysql_fetch_object($result);\r\n\t\t\t\t$out .= \"Den News Eintrag &quot;\" . $row->article_title . \"&quot; wirklich löschen?<br />\r\n\t\t\t<a href=\\\"admin.php?page=articles&amp;action=delete&amp;id=\" . $extern_id . \"&amp;sure=1\\\" title=\\\"Wirklich Löschen\\\">ja</a> &nbsp;\r\n\t\t\t<a href=\\\"admin.php?page=articles\\\" title=\\\"Nicht Löschen\\\">nein</a>\";\r\n\t\t\t\r\n\t\t\t\treturn $out;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//\r\n\t\t// add a new entrie\r\n\t\t//\r\n\t\telseif($extern_action == \"new\") {\r\n\t\t\tif($extern_title != \"\" && $extern_description != \"\" && $extern_text) {\r\n\t\t\t\t$sql = \"INSERT INTO \".DB_PREFIX.\"articles\r\n\t\t\t\t\t(article_title, article_description, article_text, article_html, article_creator, article_date)\r\n\t\t\t\t\tVALUES ('$extern_title', '$extern_description', '$extern_text', '\" . convertToPreHtml($extern_text) . \"', '$actual_user_id', '\" . mktime() . \"')\";\r\n\t\t\t\tdb_result($sql);\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t//\r\n\t\t// update the selected entrie\r\n\t\t//\r\n\t\telseif($extern_action == \"update\") { \r\n\t\t\tif($extern_title != \"\" && $extern_description != \"\" && $extern_text != \"\" && $extern_id != 0) {\r\n\t\t\t\t$sql = \"UPDATE \".DB_PREFIX.\"articles SET \r\n\t\t\t\t\tarticle_title= '$extern_title', \r\n\t\t\t\t\tarticle_description= '$extern_description', \r\n\t\t\t\t\tarticle_text= '$extern_text',\r\n\t\t\t\t\tarticle_html= '\" . convertToPreHtml($extern_text) . \"',\r\n\t\t\t\t\tarticle_date= '\" . mktime() . \"' \r\n\t\t\t\t\tWHERE article_id=\".$extern_id;\r\n\t\t\t\tdb_result();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($extern_action != \"edit\") {\r\n\t\t\t$out .= \"\\t\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"articles\\\" />\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"new\\\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Titel: <span class=\\\"info\\\">Hier den Titel des Artikels eingeben</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"title\\\" maxlength=\\\"100\\\" value=\\\"\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Beschreibung: <span class=\\\"info\\\">Hier eine Zusammenfassung in einem Satz eingeben.</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"description\\\" maxlength=\\\"200\\\" value=\\\"\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Text: <span class=\\\"info\\\">Hier den gesammten Text des Artikels eingeben.</span></td>\r\n\t\t\t\t\t\t<td><textarea cols=\\\"60\\\" rows=\\\"6\\\" name=\\\"text\\\"></textarea></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Eingelogt als \" . $actual_user_showname . \" &nbsp;</td><td><input type=\\\"submit\\\" class=\\\"button\\\" value=\\\"Senden\\\" />&nbsp;<input type=\\\"reset\\\" class=\\\"button\\\" value=\\\"Zurücksetzen\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t<br />\r\n\t\t\t</form>\\r\\n\";\r\n\t\t}\r\n\t\t\r\n\t\tif(isset($extern_id) && $extern_action == \"edit\") {\r\n\t\t\t$sql = \"SELECT * FROM \" . DB_PREFIX . \"articles WHERE article_id=$extern_id\";\r\n\t\t\t$result = db_result($sql);\r\n\t\t\t$row = mysql_fetch_object($result);\r\n\t\t\t$out .= \"\\t\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"articles\\\" />\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"update\\\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Titel: <span class=\\\"info\\\">Hier den Titel des Artikels eingeben</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"title\\\" maxlength=\\\"10\\\" value=\\\"\" . $row->article_title . \"\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Beschreibung: <span class=\\\"info\\\">Hier eine Zusammenfassung in einem Satz eingeben.</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"description\\\" maxlength=\\\"60\\\" value=\\\"\" . $row->article_description . \"\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Text: <span class=\\\"info\\\">Hier den gesammten Text des Artikels eingeben.</span></td>\r\n\t\t\t\t\t\t<td><textarea cols=\\\"60\\\" rows=\\\"6\\\" name=\\\"text\\\">\" . $row->article_text . \"</textarea></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Eingelogt als \" . $actual_user_showname . \" &nbsp;</td><td><input type=\\\"submit\\\" class=\\\"button\\\" value=\\\"Speichern\\\" />&nbsp;<input type=\\\"reset\\\" class=\\\"button\\\" value=\\\"Zurücksetzen\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t<br />\r\n\t\t\t</form>\\r\\n\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\t$out .= \"\\t\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"articles\\\" />\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"update\\\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Titel:</td>\r\n\t\t\t\t\t\t<td>Beschreibung:</td>\r\n\t\t\t\t\t\t<td>Text:</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['date'] . \"</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['creator'] . \":</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['actions'] . \":</td>\r\n\t\t\t\t\t</tr>\\r\\n\";\r\n\t\t//\r\n\t\t// write all news entries\r\n\t\t//\r\n\t\t$result = db_result(\"SELECT * FROM \" . DB_PREFIX . \"articles\");\r\n\t\twhile($row = mysql_fetch_object($result)) {\r\n\t\t\tif($extern_id == $row->article_id && $extern_action == \"edit\") {\t}\r\n\t\t\t//\r\n\t\t\t// show only the entrie\r\n\t\t\t//\r\n\t\t\telse {\r\n\t\t\t\t$out .= \"\\t\\t\\t\\t\\t<tr ID=\\\"dateid\" . $row->article_id . \"\\\">\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . $row->article_title . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . $row->article_description . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . $row->article_html . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . date(\"d.m.Y\", $row->article_date) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . getUserByID($row->article_creator) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t\t<a href=\\\"admin.php?page=articles&amp;action=edit&amp;id=\" . $row->article_id . \"#dateid\" . $row->article_id . \"\\\" title=\\\"Bearbeiten\\\">Bearbeiten</a>\r\n\t\t\t\t\t\t\t&nbsp;<a href=\\\"admin.php?page=articles&amp;action=delete&amp;id=\" . $row->article_id . \"\\\" title=\\\"Löschen\\\">Löschen</a>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\\r\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$out .= \"\\t\\t\\t\\t</table>\r\n\t\t\t</form>\";\r\n\t\r\n\t\treturn $out;\r\n \t}", "function messaging_inbox_page_output() {\n\tglobal $wpdb, $wp_roles, $current_user, $user_ID, $current_site, $messaging_official_message_bg_color, $messaging_max_inbox_messages, $messaging_max_reached_message, $wp_version;\n\n\tif (isset($_GET['updated'])) {\n\t\t?><div id=\"message\" class=\"updated fade\"><p><?php echo stripslashes(sanitize_text_field($_GET['updatedmsg'])) ?></p></div><?php\n\t}\n\n\t$action = isset($_GET[ 'action' ]) ? $_GET[ 'action' ] : '';\n\n\techo '<div class=\"wrap\">';\n\tswitch( $action ) {\n\t\t//---------------------------------------------------//\n\t\tdefault:\n\t\t\tif ( isset($_POST['Remove']) ) {\n\t\t\t\tmessaging_update_message_status(intval($_POST['mid']),'removed');\n\t\t\t\techo \"\n\t\t\t\t<SCRIPT LANGUAGE='JavaScript'>\n\t\t\t\twindow.location='admin.php?page=messaging&updated=true&updatedmsg=\" . urlencode(__('Message removed.', 'messaging')) . \"';\n\t\t\t\t</script>\n\t\t\t\t\";\n\t\t\t}\n\t\t\tif ( isset($_POST['Reply']) ) {\n\t\t\t\techo \"\n\t\t\t\t<SCRIPT LANGUAGE='JavaScript'>\n\t\t\t\twindow.location='admin.php?page=messaging&action=reply&mid=\" . intval($_POST['mid']) . \"';\n\t\t\t\t</script>\n\t\t\t\t\";\n\t\t\t}\n\t\t\t$tmp_message_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"messages WHERE message_to_user_ID = %d AND message_status != %s\", $user_ID, 'removed'));\n\t\t\t$tmp_unread_message_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"messages WHERE message_to_user_ID = %d AND message_status = %s\", $user_ID, 'unread'));\n\t\t\t$tmp_read_message_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"messages WHERE message_to_user_ID = %d AND message_status = %s\", $user_ID, 'read'));\n\t\t\t?>\n <h2><?php _e('Inbox', 'messaging') ?> <a class=\"add-new-h2\" href=\"admin.php?page=messaging_new\"><?php _e('New Message', 'messaging') ?></a></h2>\n <?php\n\t\t\tif ($tmp_message_count == 0){\n\t\t\t?>\n <p><?php _e('No messages to display', 'messaging') ?></p>\n <?php\n\t\t\t} else {\n\t\t\t\t?>\n\t\t\t\t<h3><?php _e('Usage', 'messaging') ?></h3>\n <p>\n\t\t\t\t<?php _e('Maximum inbox messages', 'messaging') ?>: <strong><?php echo $messaging_max_inbox_messages; ?></strong>\n <br />\n <?php _e('Current inbox messages', 'messaging') ?>: <strong><?php echo $tmp_message_count; ?></strong>\n </p>\n <?php\n\t\t\t\tif ($tmp_message_count >= $messaging_max_inbox_messages){\n\t\t\t\t?>\n <p><strong><center><?php _e($messaging_max_reached_message, 'messaging') ?></center></strong></p>\n\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\tif ($tmp_unread_message_count > 0){\n\t\t\t\t?>\n\t\t\t\t<h3><?php _e('Unread', 'messaging') ?></h3>\n\t\t\t\t<?php\n\t\t\t\t$query = $wpdb->prepare(\"SELECT * FROM \" . $wpdb->base_prefix . \"messages WHERE message_to_user_ID = %s AND message_status = %s ORDER BY message_ID DESC\", $user_ID, 'unread');\n\t\t\t\t$tmp_messages = $wpdb->get_results( $query, ARRAY_A );\n\t\t\t\techo \"\n\t\t\t\t<table cellpadding='3' cellspacing='3' width='100%' class='widefat'>\n\t\t\t\t<thead><tr>\n\t\t\t\t<th scope='col'>\" . __(\"From\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'>\" . __(\"Subject\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'>\" . __(\"Recieved\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'>\" . __(\"Actions\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'></th>\n\t\t\t\t<th scope='col'></th>\n\t\t\t\t</tr></thead>\n\t\t\t\t<tbody id='the-list'>\n\t\t\t\t\";\n\t\t\t\t$class = '';\n\t\t\t\tif (count($tmp_messages) > 0){\n\t\t\t\t\t$class = ('alternate' == $class) ? '' : 'alternate';\n\t\t\t\t\tforeach ($tmp_messages as $tmp_message){\n\t\t\t\t\tif ($tmp_message['message_official'] == 1){\n\t\t\t\t\t\t$style = \"'style=background-color:\" . $messaging_official_message_bg_color . \";'\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$style = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t//=========================================================//\n\t\t\t\t\techo \"<tr class='\" . $class . \"' \" . $style . \">\";\n\t\t\t\t\tif ($tmp_message['message_official'] == 1){\n\t\t\t\t\t\t$tmp_username = $wpdb->get_var($wpdb->prepare(\"SELECT user_login FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\t$tmp_display_name = $wpdb->get_var($wpdb->prepare(\"SELECT display_name FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\tif ( $tmp_display_name == '' ) {\n\t\t\t\t\t\t\t$tmp_display_name = $tmp_username;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tmp_user_url = messaging_user_primary_blog_url($tmp_message['message_from_user_ID']);\n\t\t\t\t\t\tif ($tmp_user_url == ''){\n\t\t\t\t\t\t\techo \"<td valign='top'><strong>\" . $tmp_display_name . \"</strong></td>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"<td valign='top'><strong><a href='\" . $tmp_user_url . \"'>\" . $tmp_display_name . \"</a></strong></td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"<td valign='top'><strong>\" . stripslashes($tmp_message['message_subject']) . \"</strong></td>\";\n\t\t\t\t\t\techo \"<td valign='top'><strong>\" . date_i18n(get_option('date_format') . ' ' . get_option('time_format'),$tmp_message['message_stamp']) . \"</strong></td>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$tmp_username = $wpdb->get_var($wpdb->prepare(\"SELECT user_login FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\t$tmp_display_name = $wpdb->get_var($wpdb->prepare(\"SELECT display_name FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\tif ( $tmp_display_name == '' ) {\n\t\t\t\t\t\t\t$tmp_display_name = $tmp_username;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tmp_user_url = messaging_user_primary_blog_url($tmp_message['message_from_user_ID']);\n\t\t\t\t\t\tif ($tmp_user_url == ''){\n\t\t\t\t\t\t\techo \"<td valign='top'>\" . $tmp_display_name . \"</td>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"<td valign='top'><a href='\" . $tmp_user_url . \"'>\" . $tmp_display_name . \"</a></td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"<td valign='top'>\" . stripslashes($tmp_message['message_subject']) . \"</td>\";\n\t\t\t\t\t\techo \"<td valign='top'>\" . date_i18n(get_option('date_format') . ' ' . get_option('time_format'),$tmp_message['message_stamp']) . \"</td>\";\n\t\t\t\t\t}\n\t\t\t\t\tif ($tmp_message_count >= $messaging_max_inbox_messages){\n\t\t\t\t\t\techo \"<td valign='top'><a class='edit'>\" . __('View', 'messaging') . \"</a></td>\";\n\t\t\t\t\t\techo \"<td valign='top'><a class='edit'>\" . __('Reply', 'messaging') . \"</a></td>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<td valign='top'><a href='admin.php?page=messaging&action=view&mid=\" . $tmp_message['message_ID'] . \"' rel='permalink' class='edit'>\" . __('View', 'messaging') . \"</a></td>\";\n\t\t\t\t\t\techo \"<td valign='top'><a href='admin.php?page=messaging&action=reply&mid=\" . $tmp_message['message_ID'] . \"' rel='permalink' class='edit'>\" . __('Reply', 'messaging') . \"</a></td>\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"<td valign='top'><a href='admin.php?page=messaging&action=remove&mid=\" . $tmp_message['message_ID'] . \"' rel='permalink' class='delete'>\" . __('Remove', 'messaging') . \"</a></td>\";\n\t\t\t\t\techo \"</tr>\";\n\t\t\t\t\t$class = ('alternate' == $class) ? '' : 'alternate';\n\t\t\t\t\t//=========================================================//\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</tbody></table>\n\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t//=========================================================//\n\t\t\t\tif ($tmp_read_message_count > 0){\n\t\t\t\t?>\n\t\t\t\t<h3><?php _e('Read', 'messaging') ?></h3>\n\t\t\t\t<?php\n\t\t\t\t$query = $wpdb->prepare(\"SELECT * FROM \" . $wpdb->base_prefix . \"messages WHERE message_to_user_ID = %d AND message_status = %s ORDER BY message_ID DESC\", $user_ID, 'read');\n\t\t\t\t$tmp_messages = $wpdb->get_results( $query, ARRAY_A );\n\t\t\t\techo \"\n\t\t\t\t<table cellpadding='3' cellspacing='3' width='100%' class='widefat'>\n\t\t\t\t<thead><tr>\n\t\t\t\t<th scope='col'>\" . __(\"From\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'>\" . __(\"Subject\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'>\" . __(\"Recieved\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'>\" . __(\"Actions\", 'messaging') . \"</th>\n\t\t\t\t<th scope='col'></th>\n\t\t\t\t<th scope='col'></th>\n\t\t\t\t</tr></thead>\n\t\t\t\t<tbody id='the-list'>\n\t\t\t\t\";\n\t\t\t\t$class = '';\n\t\t\t\tif (count($tmp_messages) > 0){\n\t\t\t\t\t$class = ('alternate' == $class) ? '' : 'alternate';\n\t\t\t\t\tforeach ($tmp_messages as $tmp_message){\n\t\t\t\t\tif ($tmp_message['message_official'] == 1){\n\t\t\t\t\t\t$style = \"'style=background-color:\" . $messaging_official_message_bg_color . \";'\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$style = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t//=========================================================//\n\t\t\t\t\techo \"<tr class='\" . $class . \"' \" . $style . \">\";\n\t\t\t\t\tif ($tmp_message['message_official'] == 1){\n\t\t\t\t\t\t$tmp_username = $wpdb->get_var($wpdb->prepare(\"SELECT user_login FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\t$tmp_display_name = $wpdb->get_var($wpdb->prepare(\"SELECT user_login FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\tif ( $tmp_display_name == '' ) {\n\t\t\t\t\t\t\t$tmp_display_name = $tmp_username;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tmp_user_url = messaging_user_primary_blog_url($tmp_message['message_to_user_ID']);\n\t\t\t\t\t\tif ($tmp_user_url == ''){\n\t\t\t\t\t\t\techo \"<td valign='top'><strong>\" . $tmp_display_name . \"</strong></td>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"<td valign='top'><strong><a href='\" . $tmp_user_url . \"'>\" . $tmp_display_name . \"</a></strong></td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"<td valign='top'><strong>\" . stripslashes($tmp_message['message_subject']) . \"</strong></td>\";\n\t\t\t\t\t\techo \"<td valign='top'><strong>\" . date_i18n(get_option('date_format') . ' ' . get_option('time_format'),$tmp_message['message_stamp']) . \"</strong></td>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$tmp_username = $wpdb->get_var($wpdb->prepare(\"SELECT user_login FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\t$tmp_display_name = $wpdb->get_var($wpdb->prepare(\"SELECT display_name FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message['message_from_user_ID']));\n\t\t\t\t\t\tif ( $tmp_display_name == '' ) {\n\t\t\t\t\t\t\t$tmp_display_name = $tmp_username;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tmp_user_url = messaging_user_primary_blog_url($tmp_message['message_to_user_ID']);\n\t\t\t\t\t\tif ($tmp_user_url == ''){\n\t\t\t\t\t\t\techo \"<td valign='top'>\" . $tmp_display_name . \"</td>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"<td valign='top'><a href='\" . $tmp_user_url . \"'>\" . $tmp_display_name . \"</a></td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"<td valign='top'>\" . stripslashes($tmp_message['message_subject']) . \"</td>\";\n\t\t\t\t\t\techo \"<td valign='top'>\" . date_i18n(get_option('date_format') . ' ' . get_option('time_format'),$tmp_message['message_stamp']) . \"</td>\";\n\t\t\t\t\t}\n\t\t\t\t\tif ($tmp_message_count >= $messaging_max_inbox_messages){\n\t\t\t\t\t\techo \"<td valign='top'><a class='edit'>\" . __('View', 'messaging') . \"</a></td>\";\n\t\t\t\t\t\techo \"<td valign='top'><a class='edit'>\" . __('Reply', 'messaging') . \"</a></td>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<td valign='top'><a href='admin.php?page=messaging&action=view&mid=\" . $tmp_message['message_ID'] . \"' rel='permalink' class='edit'>\" . __('View', 'messaging') . \"</a></td>\";\n\t\t\t\t\t\techo \"<td valign='top'><a href='admin.php?page=messaging&action=reply&mid=\" . $tmp_message['message_ID'] . \"' rel='permalink' class='edit'>\" . __('Reply', 'messaging') . \"</a></td>\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"<td valign='top'><a href='admin.php?page=messaging&action=remove&mid=\" . $tmp_message['message_ID'] . \"' rel='permalink' class='delete'>\" . __('Remove', 'messaging') . \"</a></td>\";\n\t\t\t\t\techo \"</tr>\";\n\t\t\t\t\t$class = ('alternate' == $class) ? '' : 'alternate';\n\t\t\t\t\t//=========================================================//\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</tbody></table>\n\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t\t//---------------------------------------------------//\n\t\tcase \"view\":\n\t\t\t$tmp_total_message_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"messages WHERE message_to_user_ID = %d\", $user_ID));\n\t\t\t$tmp_message_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d AND message_to_user_ID = %d\", $_GET['mid'], $user_ID));\n\t\t\tif ($tmp_message_count > 0){\n\t\t\t\tif ($tmp_total_message_count >= $messaging_max_inbox_messages){\n\t\t\t\t\t?>\n\t\t\t\t\t<p><strong><center><?php _e($messaging_max_reached_message, 'messaging') ?></center></strong></p>\n\t\t\t\t\t<?php\n\t\t\t\t\t} else {\n\t\t\t\t\tmessaging_update_message_status(intval($_GET['mid']),'read');\n\t\t\t\t\t$tmp_message_subject = stripslashes($wpdb->get_var($wpdb->prepare(\"SELECT message_subject FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid'])));\n\t\t\t\t\t$tmp_message_content = stripslashes($wpdb->get_var($wpdb->prepare(\"SELECT message_content FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid'])));\n\t\t\t\t\t$tmp_message_from_user_ID = $wpdb->get_var($wpdb->prepare(\"SELECT message_from_user_ID FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid']));\n\t\t\t\t\t$tmp_username = $wpdb->get_var($wpdb->prepare(\"SELECT user_login FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message_from_user_ID));\n\t\t\t\t\t$tmp_message_status = $wpdb->get_var($wpdb->prepare(\"SELECT message_status FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid']));\n\t\t\t\t\t$tmp_message_status = ucfirst($tmp_message_status);\n\t\t\t\t\t$tmp_message_status = __($tmp_message_status, 'messaging');\n\t\t\t\t\t$tmp_message_stamp = $wpdb->get_var($wpdb->prepare(\"SELECT message_stamp FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid']));\n\t\t\t\t\t?>\n\n\t\t\t\t\t<h2><?php _e('View Message: ', 'messaging') ?><?php echo intval($_GET['mid']); ?></h2>\n\t\t\t\t\t<form name=\"new_message\" method=\"POST\" action=\"admin.php?page=messaging\">\n\t\t\t\t\t<input type=\"hidden\" name=\"mid\" value=\"<?php echo intval($_GET['mid']); ?>\" />\n\t\t\t\t\t<h3><?php _e('Sent', 'messaging') ?></h3>\n\t\t\t\t\t<p><?php echo date_i18n(get_option('date_format') . ' ' . get_option('time_format'),$tmp_message_stamp); ?></p>\n\t\t\t\t\t<h3><?php _e('Status', 'messaging') ?></h3>\n\t\t\t\t\t<p><?php echo $tmp_message_status; ?></p>\n\t\t\t\t\t<h3><?php _e('From', 'messaging') ?></h3>\n\t\t\t\t\t<p><?php echo $tmp_username; ?></p>\n\t\t\t\t\t<h3><?php _e('Subject', 'messaging') ?></h3>\n\t\t\t\t\t<p><?php echo $tmp_message_subject; ?></p>\n\t\t\t\t\t<h3><?php _e('Content', 'messaging') ?></h3>\n\t\t\t\t\t<p><?php echo $tmp_message_content; ?></p>\n <p class=\"submit\">\n\t\t\t\t\t<input class=\"button button-secondary\" type=\"submit\" name=\"Submit\" value=\"<?php _e('Back', 'messaging') ?>\" />\n\t\t\t\t\t<input class=\"button button-secondary\" type=\"submit\" name=\"Remove\" value=\"<?php _e('Remove', 'messaging') ?>\" />\n\t\t\t\t\t<input class=\"button button-primary\" type=\"submit\" name=\"Reply\" value=\"<?php _e('Reply', 'messaging') ?>\" />\n </p>\n\t\t\t\t\t</form>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t?>\n <p><?php _e('You do not have permission to view this message', 'messaging') ?></p>\n <?php\n\t\t\t}\n\t\tbreak;\n\t\t//---------------------------------------------------//\n\t\tcase \"remove\":\n\t\t\t//messaging_update_message_status($_GET['mid'],'removed');\n\t\t\tmessaging_remove_message(intval($_GET['mid']));\n\t\t\techo \"\n\t\t\t<SCRIPT LANGUAGE='JavaScript'>\n\t\t\twindow.location='admin.php?page=messaging&updated=true&updatedmsg=\" . urlencode('Message removed.') . \"';\n\t\t\t</script>\n\t\t\t\";\n\t\tbreak;\n\t\t//---------------------------------------------------//\n\t\tcase \"reply\":\n\t\t\t$tmp_message_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d AND message_to_user_ID = %d\", $_GET['mid'], $user_ID));\n\t\t\tif ($tmp_message_count > 0){\n\t\t\t$tmp_message_from_user_ID = $wpdb->get_var($wpdb->prepare(\"SELECT message_from_user_ID FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid']));\n\t\t\t$tmp_username = $wpdb->get_var($wpdb->prepare(\"SELECT user_login FROM \" . $wpdb->users . \" WHERE ID = %d\", $tmp_message_from_user_ID));\n\t\t\t$tmp_message_subject = stripslashes($wpdb->get_var($wpdb->prepare(\"SELECT message_subject FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid'])));\n\t\t\t$tmp_message_subject = __('RE: ', 'messaging') . $tmp_message_subject;\n\t\t\t$tmp_message_content = stripslashes($wpdb->get_var($wpdb->prepare(\"SELECT message_content FROM \" . $wpdb->base_prefix . \"messages WHERE message_ID = %d\", $_GET['mid'])));\n\t\t\t//$tmp_message_content = \"\\n\\n\" . $tmp_username . __(' wrote:') . '<hr>' . $tmp_message_content;\n\n\t\t\t$rows = get_option('default_post_edit_rows');\n if (($rows < 3) || ($rows > 100)){\n $rows = 12;\n\t\t\t}\n $rows = \"rows='$rows'\";\n\n if ( user_can_richedit() ){\n add_filter('the_editor_content', 'wp_richedit_pre');\n\t\t\t}\n\t\t\t//\t$the_editor_content = apply_filters('the_editor_content', $content);\n ?>\n\t\t\t<h2><?php _e('Send Reply', 'messaging') ?></h2>\n\t\t\t<form name=\"reply_to_message\" method=\"POST\" action=\"admin.php?page=messaging&action=reply_process\">\n <input type=\"hidden\" name=\"message_to\" value=\"<?php echo $tmp_username; ?>\" class=\"messaging-suggest-user ui-autocomplete-input\" autocomplete=\"off\" />\n <input type=\"hidden\" name=\"message_subject\" value=\"<?php echo $tmp_message_subject; ?>\" />\n <table class=\"form-table\">\n <tr valign=\"top\">\n <th scope=\"row\"><?php _e('To', 'messaging') ?></th>\n <td><input disabled=\"disabled\" type=\"text\" name=\"message_to\" id=\"message_to_disabled\" style=\"width: 95%\" maxlength=\"200\" value=\"<?php echo $tmp_username; ?>\" />\n <br />\n <?php //_e('Required - seperate multiple usernames by commas Ex: demouser1,demouser2') ?></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><?php _e('Subject', 'messaging') ?></th>\n <td><input disabled=\"disabled\" type=\"text\" name=\"message_subject\" id=\"message_subject_disabled\" style=\"width: 95%\" maxlength=\"200\" value=\"<?php echo $tmp_message_subject; ?>\" />\n <br />\n <?php //_e('Required') ?></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><?php echo $tmp_username . __(' wrote', 'messaging'); ?></th>\n <td><?php echo $tmp_message_content; ?>\n <br />\n <?php _e('Required', 'messaging') ?></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><?php _e('Content', 'messaging') ?></th>\n <td>\n\t\t\t<?php if (version_compare($wp_version, \"3.3\") >= 0 && user_can_richedit()) { ?>\n\t\t\t\t<?php wp_editor('', 'message_content'); ?>\n\t\t\t<?php } else { ?>\n\t\t\t\t<textarea <?php if ( user_can_richedit() ){ echo \"class='mceEditor'\"; } ?> <?php echo $rows; ?> style=\"width: 95%\" name='message_content' tabindex='1' id='message_content'></textarea>\n\t\t\t<?php } ?>\n\n\t\t<br />\n <?php _e('Required', 'messaging') ?></td>\n </tr>\n </table>\n <p class=\"submit\">\n <input class=\"button button-primary\" type=\"submit\" name=\"Submit\" value=\"<?php _e('Send', 'messaging') ?>\" />\n </p>\n </form> <?php\n\t\t\t} else {\n\t\t\t?>\n\t\t\t<p><?php _e('You do not have permission to view this message', 'messaging') ?></p>\n\t\t\t<?php\n\t\t\t}\n\t\tbreak;\n\t\t//---------------------------------------------------//\n\t\tcase \"reply_process\":\n\t\t\tif ($_POST['message_to'] == '' || $_POST['message_subject'] == '' || $_POST['message_content'] == ''){\n\t\t\t\t$rows = get_option('default_post_edit_rows');\n\t\t\t\tif (($rows < 3) || ($rows > 100)){\n\t\t\t\t\t$rows = 12;\n\t\t\t\t}\n\t\t\t\t$rows = \"rows='$rows'\";\n\n\t\t\t\tif ( user_can_richedit() ){\n\t\t\t\t\tadd_filter('the_editor_content', 'wp_richedit_pre');\n\t\t\t\t}\n\t\t\t\t//\t$the_editor_content = apply_filters('the_editor_content', $content);\n\t\t\t\t?>\n\t\t\t\t<h2><?php _e('Send Reply', 'messaging') ?></h2>\n <p><?php _e('Please fill in all required fields', 'messaging') ?></p>\n\t\t\t\t<form name=\"reply_to_message\" method=\"POST\" action=\"admin.php?page=messaging&action=reply_process\">\n <input type=\"hidden\" name=\"message_to\" value=\"<?php echo sanitize_text_field($_POST['message_to']); ?>\" />\n <input type=\"hidden\" name=\"message_subject\" value=\"<?php echo stripslashes(sanitize_text_field($_POST['message_subject'])); ?>\" />\n\t\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('To', 'messaging') ?></th>\n\t\t\t\t\t<td><input disabled=\"disabled\" type=\"text\" name=\"message_to\" id=\"message_to_disabled\"\n\t\t\t\t\t\tclass=\"messaging-suggest-user ui-autocomplete-input\" autocomplete=\"off\"\n\t\t\t\t\t\tstyle=\"width: 95%\" maxlength=\"200\"\n\t\t\t\t\t\tvalue=\"<?php echo sanitize_text_field($_POST['message_to']); ?>\" />\n\t\t\t\t\t<br />\n\t\t\t\t\t<?php //_e('Required - seperate multiple usernames by commas Ex: demouser1,demouser2') ?></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Subject', 'messaging') ?></th>\n\t\t\t\t\t<td><input disabled=\"disabled\" type=\"text\" name=\"message_subject\" id=\"message_subject_disabled\" style=\"width: 95%\" maxlength=\"200\" value=\"<?php echo stripslashes(sanitize_text_field($_POST['message_subject'])); ?>\" />\n\t\t\t\t\t<br />\n\t\t\t\t\t<?php //_e('Required') ?></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Content', 'messaging') ?></th>\n\t\t\t\t\t<td><textarea <?php if ( user_can_richedit() ){ echo \"class='mceEditor'\"; } ?> <?php echo $rows; ?> style=\"width: 95%\" name='message_content' tabindex='1' id='message_content'><?php echo wp_kses_post($_POST['message_content']); ?></textarea>\n\t\t\t\t\t<br />\n\t\t\t\t\t<?php _e('Required', 'messaging') ?></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n <p class=\"submit\">\n <input class=\"button button-primary\" type=\"submit\" name=\"Submit\" value=\"<?php _e('Send', 'messaging') ?>\" />\n </p>\n\t\t\t\t</form>\n\t\t<?php\n\t\t\t\t\tif ( user_can_richedit() ){\n\t\t\t\t\t\twp_print_scripts( array( 'wpdialogs-popup' ) );\n\t\t\t\t\t\twp_print_styles('wp-jquery-ui-dialog');\n\n\t\t\t\t\t\trequire_once ABSPATH . 'wp-admin/includes/template.php';\n\t\t\t\t\t\trequire_once ABSPATH . 'wp-admin/includes/internal-linking.php';\n\t\t\t\t\t\t?><div style=\"display:none;\"><?php wp_link_dialog(); ?></div><?php\n\t\t\t\t\t\twp_print_scripts('wplink');\n\t\t\t\t\t\twp_print_styles('wplink');\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//==========================================================//\n\t\t\t\t$tmp_usernames = sanitize_text_field($_POST['message_to']);\n\t\t\t\t//$tmp_usernames = str_replace( \",\", ', ', $tmp_usernames );\n\t\t\t\t//$tmp_usernames = ',,' . $tmp_usernames . ',,';\n\t\t\t\t//$tmp_usernames = str_replace( \" \", '', $tmp_usernames );\n\t\t\t\t$tmp_usernames_array = explode(\",\", $tmp_usernames);\n\t\t\t\t$tmp_usernames_array = array_unique($tmp_usernames_array);\n\n\t\t\t\t$tmp_username_error = 0;\n\t\t\t\t$tmp_error_usernames = '';\n\t\t\t\t$tmp_to_all_uids = '|';\n\n\t\t\t\tforeach ($tmp_usernames_array as $tmp_username){\n\t\t\t\t\t$tmp_username = trim($tmp_username);\n\t\t\t\t\tif ($tmp_username != ''){\n\t\t\t\t\t\t$tmp_username_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->users . \" WHERE user_login = %s\", $tmp_username));\n\t\t\t\t\t\tif ($tmp_username_count > 0){\n\t\t\t\t\t\t\t$tmp_user_id = $wpdb->get_var($wpdb->prepare(\"SELECT ID FROM \" . $wpdb->users . \" WHERE user_login = %s\", $tmp_username));\n\t\t\t\t\t\t\t$tmp_to_all_uids = $tmp_to_all_uids . $tmp_user_id . '|';\n\t\t\t\t\t\t\t//found\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$tmp_username_error = $tmp_username_error + 1;\n\t\t\t\t\t\t\t$tmp_error_usernames = $tmp_error_usernames . $tmp_username . ', ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$tmp_error_usernames = trim($tmp_error_usernames, \", \");\n\t\t\t\t//==========================================================//\n\t\t\t\tif ($tmp_username_error > 0){\n\t\t\t\t\t$rows = get_option('default_post_edit_rows');\n\t\t\t\t\tif (($rows < 3) || ($rows > 100)){\n\t\t\t\t\t\t$rows = 12;\n\t\t\t\t\t}\n\t\t\t\t\t$rows = \"rows='$rows'\";\n\t\t\t\t\t?>\n\t\t\t\t\t<h2><?php _e('Send Reply', 'messaging') ?></h2>\n\t\t\t\t\t<p><?php _e('The following usernames could not be found in the system', 'messaging') ?> <em><?php echo $tmp_error_usernames; ?></em></p>\n <form name=\"new_message\" method=\"POST\" action=\"admin.php?page=messaging&action=reply_process\">\n <input type=\"hidden\" name=\"message_to\" value=\"<?php echo sanitize_text_field($_POST['message_to']); ?>\" />\n <input type=\"hidden\" name=\"message_subject\" value=\"<?php echo stripslashes(sanitize_text_field($_POST['message_subject'])); ?>\" />\n <table class=\"form-table\">\n <tr valign=\"top\">\n <th scope=\"row\"><?php _e('To', 'messaging') ?></th>\n <td><input disabled=\"disabled\" type=\"text\" name=\"message_to\" id=\"message_to_disabled\"\n \tclass=\"messaging-suggest-user ui-autocomplete-input\" autocomplete=\"off\"\n \tstyle=\"width: 95%\" tabindex='1' maxlength=\"200\"\n \tvalue=\"<?php echo sanitize_text_field($_POST['message_to']); ?>\" />\n <br />\n <?php //_e('Required - seperate multiple usernames by commas Ex: demouser1,demouser2') ?></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><?php _e('Subject', 'messaging') ?></th>\n <td><input disabled=\"disabled\" type=\"text\" name=\"message_subject\" id=\"message_subject_disabled\" style=\"width: 95%\" tabindex='2' maxlength=\"200\" value=\"<?php echo stripslashes(sanitize_text_field($_POST['message_subject'])); ?>\" />\n <br />\n <?php //_e('Required') ?></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><?php _e('Content', 'messaging') ?></th>\n <td><textarea <?php if ( user_can_richedit() ){ echo \"class='mceEditor'\"; } ?> <?php echo $rows; ?> style=\"width: 95%\" name='message_content' tabindex='3' id='message_content'><?php echo wp_kses_post($_POST['message_content']); ?></textarea>\n\t\t\t<br />\n <?php _e('Required', 'messaging') ?></td>\n </tr>\n </table>\n <p class=\"submit\">\n <input class=\"button button-primary\" type=\"submit\" name=\"Submit\" value=\"<?php _e('Send', 'messaging') ?>\" />\n </p>\n </form>\n\t\t <?php\n\t\t\t\t\tif ( user_can_richedit() ){\n\t\t\t\t\t\twp_print_scripts( array( 'wpdialogs-popup' ) );\n\t\t\t\t\t\twp_print_styles('wp-jquery-ui-dialog');\n\n\t\t\t\t\t\trequire_once ABSPATH . 'wp-admin/includes/template.php';\n\t\t\t\t\t\trequire_once ABSPATH . 'wp-admin/includes/internal-linking.php';\n\t\t\t\t\t\t?><div style=\"display:none;\"><?php wp_link_dialog(); ?></div><?php\n\t\t\t\t\t\twp_print_scripts('wplink');\n\t\t\t\t\t\twp_print_styles('wplink');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t//everything checked out - send the messages\n\t\t\t\t\t?>\n\t\t\t\t\t<p><?php _e('Sending message(s)...', 'messaging') ?></p>\n <?php\n\t\t\t\t\tforeach ($tmp_usernames_array as $tmp_username){\n\t\t\t\t\t\tif ($tmp_username != ''){\n\t\t\t\t\t\t\t$tmp_to_uid = $wpdb->get_var($wpdb->prepare(\"SELECT ID FROM \" . $wpdb->users . \" WHERE user_login = %s\", $tmp_username));\n\t\t\t\t\t\t\tmessaging_insert_message($tmp_to_uid,$tmp_to_all_uids,$user_ID, stripslashes(sanitize_text_field($_POST['message_subject'])), wp_kses_post($_POST['message_content']), 'unread', 0);\n\t\t\t\t\t\t\tmessaging_new_message_notification($tmp_to_uid,$user_ID, stripslashes(sanitize_text_field($_POST['message_subject'])), wp_kses_post($_POST['message_content']));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tmessaging_insert_sent_message($tmp_to_all_uids,$user_ID, sanitize_text_field($_POST['message_subject']),wp_kses_post($_POST['message_content']),0);\n\t\t\t\t\techo \"\n\t\t\t\t\t<SCRIPT LANGUAGE='JavaScript'>\n\t\t\t\t\twindow.location='admin.php?page=messaging&updated=true&updatedmsg=\" . urlencode('Reply Sent.') . \"';\n\t\t\t\t\t</script>\n\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t\t//---------------------------------------------------//\n\t\tcase \"test\":\n\t\tbreak;\n\t\t//---------------------------------------------------//\n\t}\n\techo '</div>';\n}", "function get_content() {\n global $CFG, $OUTPUT;\n // First check if we have already generated, don't waste cycles\n if ($this->contentgenerated === true) {\n return true;\n }\n $this->page->requires->yui2_lib('dom');\n // JS for navigation moved to the standard theme, the code will probably have to depend on the actual page structure\n // $this->page->requires->js('/lib/javascript-navigation.js');\n // Navcount is used to allow us to have multiple trees although I dont' know why\n // you would want to trees the same\n\n block_global_navigation_tree::$navcount++;\n\n // Check if this block has been docked\n if ($this->docked === null) {\n $this->docked = get_user_preferences('nav_in_tab_panel_globalnav'.block_global_navigation_tree::$navcount, 0);\n }\n\n // Check if there is a param to change the docked state\n if ($this->docked && optional_param('undock', null, PARAM_INT)==$this->instance->id) {\n unset_user_preference('nav_in_tab_panel_globalnav'.block_global_navigation_tree::$navcount);\n $url = $this->page->url;\n $url->remove_params(array('undock'));\n redirect($url);\n } else if (!$this->docked && optional_param('dock', null, PARAM_INT)==$this->instance->id) {\n set_user_preferences(array('nav_in_tab_panel_globalnav'.block_global_navigation_tree::$navcount=>1));\n $url = $this->page->url;\n $url->remove_params(array('dock'));\n redirect($url);\n }\n\n // Set the expansionlimit if one has been set in block config\n if (!empty($this->config->expansionlimit) && $this->config->expansionlimit!='0') {\n $this->page->navigation->expansionlimit = $this->config->expansionlimit;\n }\n\n // Initialise (only actually happens if it hasn't already been done yet\n $this->page->navigation->initialise();\n\n // Remove empty branches if the user has selected to\n\n if (empty($this->config->showemptybranches) || $this->config->showemptybranches=='no') {\n $this->remove_empty_section_branches();\n }\n\n // Load the my courses branch if the user has selected to\n if (isset($CFG->navshowcategories) && empty($CFG->navshowcategories)) {\n $this->page->navigation->collapse_course_categories();\n }\n\n // Load the my courses branch if the user has selected to\n if (!empty($this->config->showmycourses) && $this->config->showmycourses=='yes') {\n $this->showmycourses();\n }\n\n if (!empty($this->config->showmyhistory) && $this->config->showmyhistory=='yes') {\n $this->showmyhistory();\n }\n\n // Get the expandable items so we can pass them to JS\n $expandable = array();\n $this->page->navigation->find_expandable($expandable);\n\n // Initialise the JS tree object\n $module = array('name'=>'block_navigation', 'fullpath'=>'/blocks/global_navigation_tree/navigation.js', 'requires'=>array('core_dock', 'io', 'node', 'dom', 'event-custom'));\n $arguments = array($this->instance->id, array('expansions'=>$expandable, 'instance'=>$this->instance->id, 'candock'=>$this->instance_can_be_docked()));\n $this->page->requires->js_init_call('M.block_navigation.init_add_tree', $arguments, false, $module);\n\n // Grab the items to display\n $this->content->items = array($this->page->navigation);\n\n $reloadlink = new moodle_url($this->page->url, array('regenerate'=>'navigation'));\n\n $this->content->footer .= $OUTPUT->action_icon($reloadlink, new pix_icon('t/reload', get_string('reload')), null, array('class'=>'customcommand'));\n\n // Set content generated to true so that we know it has been done\n $this->contentgenerated = true;\n return true;\n }", "public function lists_page()\n\t\t{\n\t\t\tif (!@include 'lists-page.php'):\n\t\t\t\tprintf(__('<div id=\"message\" class=\"updated fade\"><p>The lists page for the <strong>Mailgun</strong> plugin cannot be displayed. The file <strong>%s</strong> is missing. Please reinstall the plugin.</p></div>',\n\t\t\t\t\t'mailgun'), dirname(__FILE__) . '/lists-page.php');\n\t\t\tendif;\n\t\t}", "function CurrentPage ( )\n{\n return $this->_CurrentPage;\n}", "function _content($p){\n\t\t\n \tif($p[0] == 'about_us') \n\t\t\t\t$this->_aboutUs();\n\t\t\t\n\t\telse if($p[0] == 'our_team')\n\t\t\t\t$this->_team();\n\t\t\n\t\telse if($p[0] == 'contacts')\n\t\t\t\t$this->_contact();\n\t\t\n\t\telse if($p[0] == 'services')\n\t\t\t\t$this->_services();\n\t\t\n\t\telse if($p[0] == 'products')\n\t\t\t\t$this->_products();\n\t\t\n\t\telse if($p[0] == 'help')\n\t\t\t\t$this->_help();\n\t\t\n\t\telse if($p[0] == 'terms')\n\t\t\t\t$this->_terms();\n\t\t\n\t\telse if($p[0] == 'privacy')\n\t\t\t\t$this->_privacy();\n }", "function osg_singout_notifier_menu() {\n $items['osg/singout/notifier/contact/form'] = array(\n 'title' => 'STS Singout Notifier: contact form',\n 'page callback' => 'drupal_get_form',\n 'page arguments' => array('osg_singout_notifier_form'),\n 'access arguments' => array('access content'),\n );\n\t\n $items['osg/singout/notifier/unregistered/form'] = array(\n 'title' => 'STS Singout Notifier: Blast Unregistered',\n 'page callback' => 'drupal_get_form',\n 'page arguments' => array('osg_singout_notifier_blast_unregistered_form'),\n 'access arguments' => array('access content'),\n );\n\t$items['osg/singout/notifier/blast/unregistered'] = array(\n 'type' => MENU_CALLBACK,\n 'title' =>'STS Singout Notifier: Registration Needed',\n 'page callback' => 'osg_singout_notifier_registration_needed',\n 'access callback'=> TRUE,\n\n );\n\n return $items;\n}", "function wiki_special_associated_pages()\n{\n\tob_start();\n\n\t?>\n\n{wiki:associated_pages}\n\n{if no_results}\n<h3>No Articles Link to {article_title}</h3>\n{/if}\n\n{header}<h3>Articles that link to {article_title}</h3>\n<p>The following pages link to <a href=\"{path:view_orig_article}\">{article_title}</a>:</p>\n<ul>\n{/header}\n\n<li><a href=\"{path:view_article}\">{title}</a></li>\n\n{footer}</ul>{/footer}\n\n{/wiki:associated_pages}\n\n\t<?php\n\t\n\t$buffer = ob_get_contents();\n\tob_end_clean();\n\t\n\treturn $buffer;\n}", "public function getSysPage() {}", "public function question_content() {\r\n $this->check_permission(19);\r\n $content_data['add'] = $this->check_page_action(19, 'add');\r\n\r\n $this->quick_page_setup(Settings_model::$db_config['adminpanel_theme'], 'adminpanel', $this->lang->line('question_content'), 'operation/question_content', 'header', 'footer', '', $content_data);\r\n }", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\tif (($this->id && $access) || ($BE_USER->user[\"admin\"] && !$this->id))\t{\n\n\t\t\t// Draw the header.\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t$this->doc->form = '<form action=\"\" method=\"post\">';\n\n\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL) {\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . intval($this->id) . ';\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader(\"pages\",$this->pageinfo,$this->pageinfo[\"_thePath\"]).\"<br>\".$LANG->sL(\"LLL:EXT:lang/locallang_core.php:labels.path\").\": \".t3lib_div::fixed_lgd_pre($this->pageinfo[\"_thePath\"],50);\n\n\t\t\t$this->content .= $this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content .= $this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content .= $this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section(\"\",$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,\"SET[function]\",$this->MOD_SETTINGS[\"function\"],$this->MOD_MENU[\"function\"])));\n\t\t\t$this->content .= $this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content .= $this->doc->spacer(20).$this->doc->section(\"\",$this->doc->makeShortcutIcon(\"id\",implode(\",\",array_keys($this->MOD_MENU)),$this->MCONF[\"name\"]));\n\t\t\t}\n\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t} else {\n\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\t}", "private function content() {\n $this->checkPost();\n\n if (isset($_SESSION['CREATE'])) {\n\n switch ($_SESSION['CREATE']['page']) {\n case 0:\n $this->pageAgreement();\n break;\n case 1:\n $this->pageNameIntro();\n break;\n case 2:\n $this->pageMark();\n break;\n case 3:\n $this->pageFinal();\n break;\n default:\n echo '<h1>Error: Page Invalid<h1>';\n break;\n }\n\n }else\n echo '<h1>Error: Session invalid</h1>';\n }" ]
[ "0.6426189", "0.61783665", "0.61740893", "0.6159753", "0.6035149", "0.5961539", "0.59287024", "0.5913816", "0.5893083", "0.5886897", "0.5883166", "0.586579", "0.58375764", "0.5831956", "0.58304656", "0.5805987", "0.5792367", "0.57307786", "0.57180446", "0.56800026", "0.56630546", "0.5613786", "0.5605562", "0.56018656", "0.56012267", "0.55998033", "0.55819196", "0.55652696", "0.5559318", "0.5549048", "0.55462825", "0.5542492", "0.553957", "0.55347353", "0.5527774", "0.5524826", "0.55113363", "0.5508548", "0.55030394", "0.55019385", "0.54809636", "0.5480475", "0.5479526", "0.5479354", "0.5477748", "0.547457", "0.54595244", "0.5455299", "0.5453534", "0.5442782", "0.5441544", "0.5439941", "0.5433236", "0.5431578", "0.5427477", "0.5424514", "0.5421246", "0.5419675", "0.5413275", "0.540241", "0.53967845", "0.5395301", "0.53943145", "0.5392418", "0.539045", "0.53877443", "0.5380794", "0.53792125", "0.53746516", "0.5368294", "0.53679144", "0.5359411", "0.53585327", "0.5358021", "0.5348426", "0.53446454", "0.53398484", "0.5339419", "0.5325134", "0.53147894", "0.5304184", "0.53027195", "0.5300627", "0.53005415", "0.52989143", "0.529875", "0.52882606", "0.52868927", "0.52854675", "0.5284323", "0.52822095", "0.5267058", "0.5264688", "0.5263317", "0.52627647", "0.52619845", "0.5257187", "0.5254697", "0.5252401", "0.52509075", "0.52503806" ]
0.0
-1
Generate fake node or comment
function _notifications_content_test_generate_content($type) { $node = new Stdclass(); $title = t('Test title for @type', array('@type' => $type)); for ($i = 1; $i <= 5; $i++) { $body[] = t('Test body line @number for @type.', array('@number' => $i, '@type' => $type)); } if ($type == 'comment') { $node->subject = $title; $node->comment = implode("\n", $body); } else { $node->title = $title; $node->body = implode("\n", $body); $node->teaser = node_teaser($node->body); } return $node; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function phptemplate_comment_wrapper($content, $node) {\n if (!$content || $node->type == 'forum') {\n return '<div id=\"comments\">'. $content .'</div><a name=\"comments\"></a>';\n }\n else {\n return '<div id=\"comments\"><h2 class=\"comments\">'. t('Comments') .'</h2>'. $content .'</div><a name=\"comments\"></a>';\n }\n}", "public function generateDocblock();", "abstract public function comment();", "function newUnderComment();", "function test_rendering_comment_template() {\n\t\t$parsed_blocks = parse_blocks(\n\t\t\t'<!-- wp:comment-template --><!-- wp:comment-author-name /--><!-- wp:comment-content /--><!-- /wp:comment-template -->'\n\t\t);\n\n\t\t$block = new WP_Block(\n\t\t\t$parsed_blocks[0],\n\t\t\tarray(\n\t\t\t\t'postId' => self::$custom_post->ID,\n\t\t\t)\n\t\t);\n\n\t\t$this->assertSame(\n\t\t\tstr_replace( array( \"\\n\", \"\\t\" ), '', '<ol class=\"wp-block-comment-template\"><li id=\"comment-' . self::$comment_ids[0] . '\" class=\"comment even thread-even depth-1\"><div class=\"wp-block-comment-author-name\"><a rel=\"external nofollow ugc\" href=\"http://example.com/author-url/\" target=\"_self\" >Test</a></div><div class=\"wp-block-comment-content\"><p>Hello world</p></div></li></ol>' ),\n\t\t\tstr_replace( array( \"\\n\", \"\\t\" ), '', $block->render() )\n\t\t);\n\t}", "abstract public function generate();", "public function generate(ExpressionNode $expression);", "private function createTestNode($action = '') {\n $node = Node::create(\n array(\n 'nid' => NULL,\n 'type' => self::TEST_CONTENT_TYPE_ID,\n 'title' => 'Test Behavior Settings Node',\n )\n );\n if (isset($action)) {\n $node->set('rh_action', $action);\n }\n $node->save();\n return $node->id();\n }", "function phptemplate_comment_wrapper($content, $type = null) {\n static $node_type;\n if (isset($type)) $node_type = $type;\n\n if (!$content || $node_type == 'forum') {\n return '<div id=\"comments\">'. $content . '</div>';\n }\n else {\n return '<div id=\"comments\"><h2 class=\"comments\">'. t('Comments') .'</h2>'. $content .'</div>';\n }\n}", "function create_dom_node(&$dom, &$parent_node, $node_name, $node_value = NULL){\n\t\t$node = $dom->create_element($node_name);\n\t\t$new_node = $parent_node->append_child($node);\n\t\tif($node_value != NULL){\n\t\t\t$txt_node = $dom->create_text_node($node_value);\n\t\t\t$new_node->append_child($txt_node);\n\t\t}\n\t\treturn $new_node;\n\t}", "private function createNode($data)\n {\n return (new Node($data));\n }", "function create_node() {\n $type = drush_get_option('type');\n $title = drush_get_option('title');\n $body = drush_get_option('body');\n // get content types\n $contentTypes = \\Drupal::entityTypeManager()\n ->getStorage('node_type')\n ->loadMultiple();\n $types = [];\n foreach ($contentTypes as $contentType) {\n $types[$contentType->getOriginalId()] = $contentType->label();\n }\n if (!isset($type)) {\n $type = drush_choice($types, dt(\"Choose content type\"));\n }\n if (empty($type)) {\n return drush_user_abort();\n }\n if (!isset($title)) {\n $title = drush_prompt(\"Enter node title\", NULL, TRUE);\n }\n if (!isset($body)) {\n $body = drush_prompt(\"Enter node body\", NULL, TRUE);\n }\n try {\n $data = ['type' => $type, 'title' => $title, 'body' => $body];\n $nodeManager = new NodeManager();\n if ($link = $nodeManager->createNode($data)) {\n return drush_log(dt('Node created with title !title, click on !link link to open.', ['!title' => $title, '!link' => $link]), 'success');\n }\n }\n catch (Exception $ex) {\n return drush_set_error('mydrush', dt('Something went wrong while creating node.'));\n }\n}", "public function getNodeType()\n {\n return 'Example';\n }", "function buildJsNode( $appctx, $cms, $admin )\n\t{\n\t\t$id = $this->node->id ;\n\t\t$this->idx = $cms->addNodeInstance( $this ) ;\n\t\t$texte = str_replace( \"\\\"\", \"\\\\\\\"\", $this->texte ) ;\n\t\tif( $this->parent )\n\t\t{\n\t\t\t$parentidx = $this->parent->idx ;\n\t\t\t$appctx->Indent() ; echo( \"cmsnodes.push( new CmsLabel( \\\"$this->idx\\\", \\\"$id\\\", cmsnodes[$parentidx], $this->visible, $this->opacity, $this->x, $this->y, $this->z, \\\"$texte\\\", $this->size, $admin ) ) ;\\n\" ) ;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$appctx->Indent() ; echo( \"cmsnodes.push( new CmsLabel( \\\"$this->idx\\\", \\\"$id\\\", null, $this->visible, $this->opacity, $this->x, $this->y, $this->z, \\\"$texte\\\", $this->size, $admin ) ) ;\\n\" ) ;\n\t\t}\n\n\t\tforeach( $this->childs as $child )\n\t\t{\n\t\t\t$child->buildJsNode( $appctx, $cms, $admin ) ;\n\t\t}\n\t}", "protected function _emitComment($ast) {\n echo \"/{$ast['value']}/\\n\";\n }", "protected function _emitComment($ast) {\n echo \"/{$ast['value']}/\\n\";\n }", "public function getGeneratorComment(): string {\n\t\t\treturn $this->generatorComment;\n\t\t}", "public function generate() {}", "public function generate() {}", "public function generate() {}", "public function generate() {}", "public function generate() {}", "public function generate() {}", "public function generate() {}", "function generateComment(&$eventData, $comment)\n {\n $eventData['comment'] = \"-- $comment --<br>\\n\" . $eventData['comment'];\n }", "public function testCreateNode()\n {\n $this->uuidFactory->uuid4()->willReturn('1234');\n $this->nodeRegistry->registerNode(Argument::type(NodeInterface::class))->shouldBeCalled();\n\n $this->nodeManager->createNode('/path/to');\n }", "function drawNode ($item, $lastNode, $tree, $indentLevel)\n\t{\n\t\tif ($item->description == \"\")\n\t\t{\n\t\t\t$item->description = ' ';\n\t\t}\n\t\t$theDesc = wordwrap($item->description, 40, ' ', true);\n\t\t$resultString = '';\n\t\tif ($item->owner == $_SESSION['brimUsername'])\n\t\t{\n\t\t\t$resultString .= '<div id=\"item_'.$item->itemId.'\" \n\t\t\t\tclass=\"note draggable\">\n\t\t\t\t<div></div>\n\t\t\t\t<div id=\"name_'.$item->itemId.'\" class=\"noteHeader editableText\">'.$item->name.'</div>\n\t\t\t\t<br />\n\t\t\t\t<div id=\"description_'.$item->itemId.'\" class=\"noteDescription editableTextarea\">'.$theDesc.'</div>\n\t\t\t</div>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//\n\t\t\t// Hmmm.... this means that you cannot reposition items of other users..\n\t\t\t// TBD BARRY FIXME\n\t\t\t//\n\t\t\t$resultString .= '<div id=\"item_'.$item->itemId.'\" \n\t\t\t\tclass=\"note\">\n\t\t\t\t<div></div>\n\t\t\t\t<div id=\"name_'.$item->itemId.'\" class=\"noteHeader\">'.$item->name.'</div>\n\t\t\t\t<br />\n\t\t\t\t<div id=\"description_'.$item->itemId.'\" class=\"noteDescription\">'.$theDesc.'</div>\n\t\t\t</div>';\n\t\t}\n\t\treturn $resultString;\n\t}", "function toXML() {\n return \"<!-- \" . strval($this->content) . \"-->\";\n }", "abstract public function generateHtml();", "public function toStub(): string\n {\n $string = '';\n if (self::shouldAddDescriptionsToStubs()) {\n $description = (string)MarkupDescription::extractDescriptionFromDocComment($this);\n if ($description !== '') {\n if ($this->real_union_type->isEmptyOrMixed() && !$this->getUnionType()->isEmptyOrMixed()) {\n $description = \"@var {$this->getUnionType()} $description\";\n }\n $string .= MarkupDescription::convertStringToDocComment($description, ' ');\n }\n }\n $string .= ' ' . $this->getVisibilityName() . ' ';\n\n if ($this->isStatic()) {\n $string .= 'static ';\n }\n\n $string .= \"\\${$this->name}\";\n $string .= ';';\n\n return $string;\n }", "function geshi_delphi_common(&$context)\n{\n $context->addChild('single_comment');\n $context->addChild('multi_comment');\n $context->addChild('single_string', 'string');\n\n}", "public function describe()\n {\n # create new node builder\n $nodeBuilder = new NodeBuilder('weightSelectorBuilder',$this->eventDispatcher,$this->repo,$this->utilities,$this->generator,$this->locale,$this->database,$this->templateLoader);\n \n # bind this definition as the parent of nodebuilder\n $nodeBuilder->setParent($this);\n \n # return node builder to continue chain\n return $nodeBuilder;\n }", "public function generate();", "public function generate();", "public function generate();", "public function generate();", "public function generate();", "public function getNodeFactory();", "function generate() ;", "function drawNode ($item, $lastNode, $tree, $indentLevel)\n\t{\n\t\t$resultString = '\n\t\t\t\t\t\t\t\t<tr><td>';\n\t\tfor ($i=0; $i<$indentLevel; $i++)\n\t\t{\n\t\t\t$resultString .= $this->configuration['icons']['bar'];\n\t\t}\n\t\tif ($lastNode)\n\t\t{\n\t\t\t$resultString .= $this->configuration['icons']['corner'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$resultString .= $this->configuration['icons']['tee'];\n\t\t}\n\t\t$resultString .= $this->configuration['icons']['node'];\n\n\t\t$resultString .= '<a href=\"';\n\t\t$resultString .= $item->locator;\n\t\t$resultString .= '\" alt=\"'. $this->stringUtils->gpcAddSlashes ($item->name) . '\">';\n\t\t$resultString .= $this->stringUtils->gpcAddSlashes ($item->name);\n\t\t$resultString .= '</a>';\n\t\t$resultString .= '</td></tr>';\n\t\treturn $resultString;\n\t}", "public function generate()\n\t{\n\t\treturn parent::generate();\n\t}", "protected function getRandomizeComment()\n {\n return '<p>'. __('Randomizer feature is available. The construction like [Buy||Order||Purchase] will use a randomly picked word.').'<br>'.__('\n Also randomizers can be used within other template variables, ex: [Name:||Title: {landing_page}]. Number of randomizers blocks is not limited within the template.').'<br>';\n }", "public function generate()\n {\n return 'discard;';\n }", "public function example()\n {\n// $docblock = new Docblock();\n// vd($docblock);\n\n\n /*\n * b) Create from string:\n */\n// $docblock = new Docblock('/**\n// * Short Description.\n// *\n// * Long Description.\n// *\n// * @author gossi\n// */'\n// );\n// vd($docblock);\n\n /*\n * 2 Manipulate tags\n * Get the tags:\n */\n// $docblock = new Docblock();\n// $tags = $docblock->getTags();\n// vd($tags);\n\n /*\n * Get tags by name:\n */\n// $docblock = new Docblock();\n// $tags = $docblock->getTags('author');\n// vd($tags);\n\n\n /*\n * Append a tag:\n */\n// $docblock = new Docblock();\n// $author = new AuthorTag();\n// $author->setName('gossi');\n// $docblock->appendTag($author);\n// vd($docblock);\n\n\n /*\n * or with fluent API:\n */\n// $docblock = new Docblock();\n// $docblock->appendTag(AuthorTag::create()\n// ->setName('gossi'));\n// vd($docblock);\n\n\n /*\n * Check tag existence:\n */\n// $docblock = new Docblock();\n// $docblock->hasTag('author');\n// vd($docblock);\n\n\n /*\n * 3. Get back the string\n * Call toString():\n */\n// $docblock = new Docblock();\n// $docblock->toString();\n// vd($docblock);\n\n\n }", "public function testProfilePrototypeCreateComments()\n {\n\n }", "public function testNode()\n {\n $nids = $this->queryNode();\n\n // $items = $this->readNodes($nids);\n // return [\n // '#theme' => 'item_list',\n // '#items' => $items\n // ];\n\n // exemple de mise à jour d'un article\n //$this->updateNode();\n\n // exemple de suppression d'un article\n //$this->deleteNode();\n\n // le retour de renderNode est un render array\n // traité par le moteur de rendu Drupal\n return $this->renderNode();\n \n\n $arrNids = [];\n foreach ($nids as $nid) {\n array_push($arrNids, intval($nid));\n }\n //var_dump($arrNids);\n\n return new Response($this->readNode($arrNids[0]));\n }", "public function nodeHi();", "public function generate()\n {\n return parent::generate();\n }", "abstract public function createNode(NodeInterface $left, NodeInterface $right, $lineNumber = -1, $flags = 0x00);", "public static function comment($inline = null)\n {\n if ($inline === null) {\n $inline = (rand(0, 1) === 0);\n }\n\n $comment = Html::comment()->setInline($inline);\n\n if ($inline) {\n $comment->append(Ipsum::str(rand(6, 10)));\n } else {\n $comment->append([\n Ipsum::str(rand(6, 30)),\n '',\n self::random(1, ['ul' => 1, 'ol' => 1, 'p' => 1, 'bq' => 1, 'figure' => 1, 'img' => 1,]),\n '',\n Ipsum::str(rand(6, 30))\n ]);\n }\n\n return $comment;\n }", "function maennaco_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">' . t('Comments') . '</h2>' . $vars['content'];\n }\n}", "private function _writeComment()\n {\n $connectionTime = time() - $this->start;\n if ($connectionTime % $this->keepAliveTime === 0) {\n $comment = sprintf(': %s', sha1(mt_rand()) . PHP_EOL);\n\n echo $comment . PHP_EOL;\n }\n }", "public function testCreateTaskComments()\n {\n }", "public function testCreateNewCommentRoute()\n {\n \t$response = $this->post('/post-comment', [\n \t\t'content' => 'Lorem Ipsum',\n\t\t\t'parent_id' => null,\n\t\t\t'post_id' => 1,\n\t\t\t'level' => 1\n \t]);\n\n $response->assertStatus(200);\n }", "function getMention(): string\n\t{\n\t\treturn \"<@\".$this->id.\">\";\n\t}", "private function seedRealNodes ()\n {\n\n $ips = [\n '144.202.64.60', '104.238.147.40', '2001:19f0:6401:78d:5400:1ff:fea1:df87'\n ];\n\n $realNode = new \\App\\Node();\n $realNode->id = 101;\n $realNode->ip = $ips[0];\n $realNode->port = 6024;\n $realNode->friendly_name = 'Real Test Node 1';\n $realNode->protocol = 'http';\n $realNode->access_token = 'spectero:_Bv80f4--_oTG-_N';\n $realNode->install_id = '23d0a0c4-dc91-4960-b6fc-2d874fb9f50f';\n $realNode->status = \\App\\Constants\\NodeStatus::CONFIRMED;\n $realNode->market_model = \\App\\Constants\\NodeMarketModel::LISTED_SHARED;\n $realNode->user_id = 6;\n $realNode->price = 15.99;\n $realNode->asn = 133535;\n $realNode->city = 'Seattle';\n $realNode->cc = 'US';\n $realNode->version = \\App\\Constants\\DaemonVersion::ZERO_ONE_ALPHA;\n $realNode->system_data = json_decode('{\"CPU\":{\"Model\":\"Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz\",\"Cores\":4,\"Threads\":40,\"Cache Size\":\"8192 KB\"},\"Memory\":{\"Physical\":{\"Used\":222289920,\"Free\":851451904,\"Total\":1073741824}},\"Environment\":{\"Hostname\":\"daemon-test-0\",\"OS Version\":{\"Platform\":4,\"ServicePack\":\"\",\"Version\":{\"Major\":2,\"Minor\":6,\"Build\":32,\"Revision\":42,\"MajorRevision\":0,\"MinorRevision\":42},\"VersionString\":\"Unix 2.6.32.42\"},\"64-Bits\":true}}', true);\n $realNode->app_settings = json_decode('{\n\t\t\t\"BlockedRedirectUri\": \"https://blocked.spectero.com/?reason={0}&uri={1}&data={2}\",\n\t\t\t\"DatabaseFile\": \"Database/db.sqlite\",\n\t\t\t\"AuthCacheMinutes\": 5.0,\n\t\t\t\"LocalSubnetBanEnabled\": true,\n\t\t\t\"Defaults\": null,\n\t\t\t\"PasswordCostLowerThreshold\": 10,\n\t\t\t\"JWTTokenExpiryInMinutes\": 60,\n\t\t\t\"JWTRefreshTokenDelta\": 30,\n\t\t\t\"PasswordCostCalculationIterations\": 10,\n\t\t\t\"PasswordCostCalculationTestTarget\": \"srU/Lz4RYsz}U[D-e-5Tv+>\\'$TwT=\\'dvV?68\",\n\t\t\t\"PasswordCostTimeThreshold\": 100.0,\n\t\t\t\"RespectEndpointToOutgoingMapping\": true,\n\t\t\t\"BindToUnbound\": true,\n\t\t\t\"LoggingConfig\": \"nlog.config\",\n\t\t\t\"DefaultOutgoingIPResolver\": \"https://api.ipify.org/\",\n\t\t\t\"InMemoryAuth\": true,\n\t\t\t\"InMemoryAuthCacheMinutes\": 1,\n\t\t\t\"AutoStartServices\": true,\n\t\t\t\"LogCommonProxyEngineErrors\": false,\n\t\t\t\"IgnoreRFC1918\": true,\n\t\t\t\"HaltStartupIfServiceInitFails\": true,\n\t\t\t\"JobsConnectionString\": \"Data Source=Database/jobs.sqlite;\"\n\t\t}', true);\n $realNode->system_config = json_decode('[\n\t\t\t{\n\t\t\t\t\"key\": \"sys.id\",\n\t\t\t\t\"value\": \"23d0a0c4-dc91-4960-b6fc-2d874fb9f50f\",\n\t\t\t\t\"id\": 1,\n\t\t\t\t\"createdDate\": \"2018-07-10T06:54:24.6464592\",\n\t\t\t\t\"updatedDate\": \"2018-07-10T06:54:24.6464592\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"key\": \"cloud.connect.status\",\n\t\t\t\t\"value\": \"False\",\n\t\t\t\t\"id\": 2,\n\t\t\t\t\"createdDate\": \"2018-07-10T06:54:24.6702596\",\n\t\t\t\t\"updatedDate\": \"2018-07-10T06:54:24.6702596\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"key\": \"http.config\",\n\t\t\t\t\"value\": \"{\\\"listeners\\\":[{\\\"Item1\\\":\\\"23.158.64.30\\\",\\\"Item2\\\":10240},{\\\"Item1\\\":\\\"23.158.64.31\\\",\\\"Item2\\\":10240},{\\\"Item1\\\":\\\"23.158.64.32\\\",\\\"Item2\\\":10240},{\\\"Item1\\\":\\\"23.158.64.33\\\",\\\"Item2\\\":10240},{\\\"Item1\\\":\\\"23.158.64.34\\\",\\\"Item2\\\":10240},{\\\"Item1\\\":\\\"23.158.64.35\\\",\\\"Item2\\\":10240},{\\\"Item1\\\":\\\"23.158.64.36\\\",\\\"Item2\\\":10240},{\\\"Item1\\\":\\\"23.158.64.37\\\",\\\"Item2\\\":10240},{\\\"Item1\\\":\\\"23.158.64.38\\\",\\\"Item2\\\":10240},{\\\"Item1\\\":\\\"23.158.64.39\\\",\\\"Item2\\\":10240},{\\\"Item1\\\":\\\"23.158.64.40\\\",\\\"Item2\\\":10240},{\\\"Item1\\\":\\\"23.158.64.41\\\",\\\"Item2\\\":10240},{\\\"Item1\\\":\\\"23.158.64.42\\\",\\\"Item2\\\":10240},{\\\"Item1\\\":\\\"23.158.64.43\\\",\\\"Item2\\\":10240}],\\\"allowedDomains\\\":null,\\\"bannedDomains\\\":null,\\\"proxyMode\\\":\\\"Normal\\\"}\",\n\t\t\t\t\"id\": 3,\n\t\t\t\t\"createdDate\": \"2018-07-10T06:54:24.6827009\",\n\t\t\t\t\"updatedDate\": \"2018-07-10T06:54:24.6827009\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"key\": \"auth.password.cost\",\n\t\t\t\t\"value\": \"10\",\n\t\t\t\t\"id\": 4,\n\t\t\t\t\"createdDate\": \"2018-07-10T06:54:37.5479749\",\n\t\t\t\t\"updatedDate\": \"2018-07-10T06:54:37.5479749\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"key\": \"crypto.jwt.key\",\n\t\t\t\t\"value\": \"b96rU_Y2-5gj5r1Kfx40M51Qz-_1ps_PH19_--__E_9-_7vH\",\n\t\t\t\t\"id\": 5,\n\t\t\t\t\"createdDate\": \"2018-07-10T06:54:37.5581235\",\n\t\t\t\t\"updatedDate\": \"2018-07-10T06:54:37.5581235\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"key\": \"crypto.ca.password\",\n\t\t\t\t\"value\": \"8_31AhKHPL0CXMPMg4u41R-37-07-8-W1_5_wFHejs9r1KnE\",\n\t\t\t\t\"id\": 6,\n\t\t\t\t\"createdDate\": \"2018-07-10T06:54:40.0057876\",\n\t\t\t\t\"updatedDate\": \"2018-07-10T06:54:40.0057876\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"key\": \"crypto.server.password\",\n\t\t\t\t\"value\": \"_CeA__KEE4Pk-pFmUoX4_yg_O_X_22NnYa15-_k_OBB9-_bE\",\n\t\t\t\t\"id\": 7,\n\t\t\t\t\"createdDate\": \"2018-07-10T06:54:40.0124663\",\n\t\t\t\t\"updatedDate\": \"2018-07-10T06:54:40.0124663\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"key\": \"crypto.ca.blob\",\n\t\t\t\t\"value\": \"MIIKSQIBAzCCCg8GCSqGSIb3DQEHAaCCCgAEggn8MIIJ+DCCBK8GCSqGSIb3DQEHBqCCBKAwggScAgEAMIIElQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQI8oH9XGcSp6cCAggAgIIEaM7J8GQyqiv/svA/AOuIIcPAvrVmSJKjvFWpEAenb9sAb5MDvOK1RX/zH4iHkPv+gIvTusUNlX2K8DEtkmbFuehRmnIZ5IsMeT58Y8iN/UPeR6ZCTxXiSdDbo+RQGq+badI5DztT+KnrQ4z/kAyxxPS+rGhXW0Ffsw+zV2b1bPXG6i2JYJKiY942qJFnE9tB0ullX42RGZXZJ0zFHOPxqor4I2Olpp8fYpL5FlhkpwGz5q+fhEKUPKkSdWcfFhS/NP/NuRHPelQoqLt3mkZgjM33WgOV0cQKppT4Gjb8vwOtJdlVkL0t19GVLT4z/fFT3QXa5oqrF5Tkk2P7Nw7BnTer4n34eoIYPrJWdLp3ByZPBK579VSQibwE5H1tpIh7JpF3/Pxz3S7wL/jte3bF4TJ+hXotThYQhvpI4rHdFEEWQu7kQxijXiQdmXRIQu5TZbDP2NB5aFSeSV0LoBaTDSQ5NsyYHSIwTwif63IWfgYsm46DRDFBEa/gQmObSfI/0s4XNCwcDcChVUEpGUlLr1MtBT4eSzMcfrga+c0s813GgQbhVgI9IQpTmYYRmJM7itmk/m9VYlgYoJMrAfcpgUwwz8MM8sVvb0VMHFnBM3sVAIp8uUGs4FKoz0DDeWX6G3VsAr9+ad7WSbhVS//fyaVuXINA37vmLU5jFPidd8R/XOPGLXc58RS1JipVEdv19VezRHorG1NX8d83HtioOpR9GKWzmnKMz4BeS4ACrMNqIvBvORnnv5mLJ7gYR3KI8unsscZtmjehubpc6k4xOWs/DaCJfqM5oUFs1+vtSB7QObaA1BYj67rckxhmHqUn7ev2GSIvb5Iq1FJCR1gaCU88PXvvWZwqF0vrEGs7ytEAAqn1sC7tlgR178eWnyWmWQWcXoutoILlzmH4olPjnGQe/Gduf9IW/pKNBnzxtfI9ieiZo7cd2szrj/SqCRUfQg6rJcsOHOebPdALpoJSJQGiC5ToUiLs8Q+FhAQ5E9FEaykORWtsc4c9E4iZ7q+rFU3DPRq5PQLwvn/NPfAZhF14uEJgQQqGt/hT6vf+BrpeSxmvsMMiFQi/g7jL6YBICsut1v+3NwiMO+u/2pWcXAtxCYm6uyyslIEBi/FsL9ZdidKkfovyyNGwbTVddcBSp9XQxwshGREVpjb3uBCKK25MgqdplW7I5deoQrCT47txGwdI/GWueHDHOTw2JJP1013dF9oiylptzMJUVXFBIGDpFHNfEZBLk1+2A/3YbMTOXIOmdC0FbnzsES9UU0ZTJJxG0rkhfelAwHcukWrhkT+1NMW0hGFi2kFDTS9eAyB7oy4IWQzFYS/bbsL0BuTRuoAz1y/lClL+9JKhfEZFvmIPkoe7CAgD92unXffXwMwTknd4P5OUKIhvPEeCw57whv3+Hwf2pTljmgc304EyoGGypYrnLIpxy775xDrp1EI94qyXV353rl+ADfXOuRC4kkWP+G+wqNFyU6cFLoC5CI0+iiFTBhL8GjCCBUEGCSqGSIb3DQEHAaCCBTIEggUuMIIFKjCCBSYGCyqGSIb3DQEMCgECoIIE7jCCBOowHAYKKoZIhvcNAQwBAzAOBAh77an+kMyNewICCAAEggTIKbsXjUZCrPqVSLBkiop/2zausMcnU+1iDVm/KvZg01Yr/LC8HqzvmfVV3/JJwA4zlzHo9QDTKLCRf9j0D5d+/X0lm9xf/ZrWlK3Z9utN986sCQXZG0HnYuMcO7OzJguW3aWO1LJwjHdzQDkyf+C0QehEWD+GTg86Qqza3cHNXYorlKCQu2qrrdIY6lWmhjsR79qN8ncWh8GKU0xEUXkA4OkeAn9m1Z+zWc3V4hAjh4tAXWADWmC0oVKo+P3CqtPC6mGpmockh7GdBTGnNtn8k9hH3xV8IKLy+C7Z8YC4j4wUyn880Kwxqs8FsrNGUk8xcNGpfB4ddmRL8SzgNmmfQm+aFzEvjhzFaknROzQ4iH/6HyR/S4MWCPQwmUGzN7UVktlPw2bfxyZMjoGtzhbRCGUPTL/LqXY2nGu1Fsj4NhOT0rKRInH0CREaa6wyquIDktOrN/JgKoUzP4k5Tkob5Apc7pnz3QICeEoX2mtbq2M2lveyzfiVppGbANSwoiYw0Ofo7/igFGtBtT2Rccii1a/k6xOkm5p3FH3QpCUTiHAAZ/Caiux6SWRnHYCWjx4SuMjICYTkcwJqiIBAKc/7+uUyXGGrKXXQbDOYaNeatFR4MjjI2paHUzMMMgXfkQSn1ZMlpwziMFMhJ1ft7mgKidIB3gnl8/MzjZE5Ua+WG24voxhlpNdbBFG1xNsPjSMtxwl1IrnYsBeY+9c/4OWQmyNLyAldPy1S1jgElw+grfVyEHWTiMJtZa8jbQzIeYc33CQiI3SEQCbrDdZRwg4yOpM8faG/fmWP4lAtpgU1mObxr0oeEdCndoQUY98AmYz9J2Tmuzf7cjqkC/cvJDCMr+/zx+du9Gnn5tBjhk+6CQdnVL/7tXyt1LDsgYE/IrFil4KxNUocAQtGGmzzjiw9/Y4be7zRGI53ZA/PAngnby7h3yVsverH0iKtl8FvMClWGBzQ+YkXuN1IfUQPByrJEPNImtTb0Uwk6m+MyyytSw6poKYCRPUuIS/22QB1d3ne49d3sWdNQNve3VW4UHR9AH+imrRebuMVlXttNJvtxbE7yynkEEKRyI4ezMzvwROxx/AeSnMPODVFQCakWLlo/B8v0WRqz3NZ14gv+ogSBlcCS2sUC569sylNMCmLmWlxk/TRSI8EqPbmmpnk3xU9jYnFOn618R/y1NzbAZJwONp456h9e+3Og3JzAO2n2pWeRpQRl0EMC5rCdUwNLv6jGGwAh5z4LVQu4nRKsJ6qzNViyHLWvyFnx5ONUb1ukruFZZcEt1JL32sRGZ8MTJ8BiMNA5cGuNAeZDpChvgA97ijM2e6/Ybqa3BwDZV69BkDelmb/dBSS23Q4pjdJzmbPlfPZad/GKWhpl1FibcgKJlV6cZJZkXK62TQknXW0M2SWd61sL8zhdip3XfTOVH5d+fzMHpRHxcVgpRPoDobi+KSnvm/kKDWYSyrDp/HSQwqG+s6WCCeddSWTvowq7V4RW+XQzyycoWKNKMZsIqpkOLqBzZt7yWGj/h5fceFf5UVuEo8cd2QloanfzI6/7J6PYbpIUcYpKkACp4bw8Ni6/XgqwZ8OUjVQcIIiWE2q2Tpwuzx8bu2gEE5nvDYexxPVS+QhcpddGUZzMSUwIwYJKoZIhvcNAQkVMRYEFNt7G/M5RwfiH140T51QF49jsYwJMDEwITAJBgUrDgMCGgUABBRyXitFofQ1ytmq23CLG2DtxfNjQwQIPpiLkrwmXJMCAggA\",\n\t\t\t\t\"id\": 8,\n\t\t\t\t\"createdDate\": \"2018-07-10T06:54:40.0189212\",\n\t\t\t\t\"updatedDate\": \"2018-07-10T06:54:40.0189212\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"key\": \"crypto.server.blob\",\n\t\t\t\t\"value\": \"MIIKUQIBAzCCChcGCSqGSIb3DQEHAaCCCggEggoEMIIKADCCBLcGCSqGSIb3DQEHBqCCBKgwggSkAgEAMIIEnQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIJFFEsVGSz0ECAggAgIIEcIJdp49aZCRrhTWjTaF3icUlbFz4/+ro8/RQ8YOFvC/7FefKRJSLOc2akcOPePSkff245wlRab/wXW9jEdVXf3y6qe1jAJfkpZpLls/0IfU4pvK29ZsAXScxTogCb7agRMSiSftK/l49FAmbYvkMfIg0ZtoUentkEKDcOCS1EylZDGTiGGjdojxmMu8WGGVAYsxqBV9XOtOtyvRlFzRevxL7yup7zvVtdWK/WgdDbH17SbgAtIdxkXkfYRm0QcFx+JY4Rj1p/sYy6JIhipvRJxXpYcWCJujOEd0fU6+CZfd6pC1teJa4CbckyCmHumTxEt7SMTjsPXQTOb6C/+MZqIaz2uEAWIiISUl0cZWrLBdhGDHk7L3dgQpwlmbQFDke6D7vrVqZMbNvzC+gjUwFCOWksR7fAXe0EmwVUUgqfP1dvOeJrfxErV2YEXkd7a67Db4KatyJjEhAm3nfTqe9P1BUB5UD3FO1z9szSq/ALrUwC83NDzL9tveIVSNVM2sDorw3h/qob8RuFtx5uYg19OyFcylfzNl4alx/b/9LGsmEpeDiReriq9mi1O0bJbG2AwurcjzIHWe4OaNojuRSp0EqUs+1+z+BzUEhf/9debN/h+TcWyhPeT97GKhpYp03Uuv8TZvnX+Xahklprs261p61pBSvMw/f6ox9SrTTLhjaB3WJSeH3hXTgJ4Ihj/q/KHtutOUCFmejUYht28n1YDhl+Gj92hOZMU7VzCjXFlvMKum9ECl7gYGmcqCpfIVAUUY0l0E8IBOtEBy9rUXH9D30CZIl7j7cJnR6/9FNbAdDsDixDm0xobrioaCm0s0D/pgZUUqKuvxbsFRQh1eAp36hUZqoWpe/j7D2N7YMwd/8o8a1JkhR0z3zuPV59PRbvhFuoiPw2AY9ESDFLvMdqwXhDTy/CNwYkOEFmeMvnohl3x4V6zJbfC71apfBmO3efe84odu8Tmj+r+b8XviRaCU7Wi1f9HQ4QF7siS2SDKvwBIo0fa5I6GX70t4KhbVzGjffRv9ECmedNeclaUXCARl9qT8C1Lsp3El4lK7S905aJI+PbcqNzZXThDlm/48uJLVYWPWPsf1FjXNeXyuHhLCkFE13CTaODSfL1lLEPyPzPerCj0cwnWbpQQWzeL4X6GRmBCUNhUl89LPbYLxPciOeOYbe5pMneEsbfTEqLHiys4au3poxRNRX6Z1+Hn8yrR0LkymEtOhy1LR2e0714HFW0I6Pj+UvyQORTQD/A1rF0urEP8q2CRh+r4TtqTkWeWiH50hrS6KZcLbp6L0xMUbAvWkL7MHPUiy6QWQqOEnMbnVyIr8UNMEmVYjQtpLNLSybClMdjKocfxXUtxjtDIQxD0SEbwCMS2Cauo/uKjtzv9TfCyqEqfpOI3bkVnQGqrHef1XPXX3tCui3S6HHfk9mqAx2lJqomDWW/v6FHW7sr1Snvqn/HTbj9tYfQwDEGxTDP3F4J6NmEVflbExW+d41Pw8T0YBOl9Tql2uPqEKCMIIFQQYJKoZIhvcNAQcBoIIFMgSCBS4wggUqMIIFJgYLKoZIhvcNAQwKAQKgggTuMIIE6jAcBgoqhkiG9w0BDAEDMA4ECJFNnaXO48sNAgIIAASCBMj2FVQwrSm5G9euGz0EDhSaQm6nWLnJO48T23/7BOSQS4bjjxdCDLb/bLb6XC0dUjWe9xpanvPH7uqmVpS8BjnSylY606URiGsYQ0+ZueX8FTQ93ER4BzOpP9TH0AFG8ggpqOWJqHBqeNPoCLuOHq56NWxE6MhULKhMarFO9bc4eeyvH4Z8YxqVnkYarOOUe4AMlQAIROvRLoFqwiAJPyp4URxvF1XiU3JOfrJwQmJZZPRJRSRKXb+yFnvrjLf/gstGx2Vdg4KEyzPU+TN3kQ/nVEpB9LAZqAIrkfQ0Wtee6qcMy2yreM9ttHxTcX09+DtiwyBCNOg+TdrAZBKhB1OS9RUKIxKzvZ0atrFD0DueSVPjWeicw+NSW1ftBqiZeRoTZX6hcFwxntPe45faCjSky602967W7o0gcgwv7Man0v+725MCOZIPu9mlI7i/Um7Peg1UwHLGKsyZbo/CRYtvzQmy3cTZA4N3VLWuJcDX/T8+mTnGc5fNtXjhu2+/Tb5spHbQMsIh/BGFsHVLoglrhONRZHuxJLAk3/68K0teCpM8qPi4y8Xdg4r76XCgUWOpVm2qGHz1bF3ih/XshztswjAxCGm6f/aJ4plFJ4T04tfqq9YO/JHAcl9eMJw/49/4oq/pAmNt2D5SRQavsU+HwTbt4EHVRNip3S0GlYBue/06NeuMiwW5ex5+qXwfkALRCV8bpon9WDYjSFHvfdDf8lLMBktGPMmobzhH0S3ap3LHcpDjgZby1v1HElvfhTrhvvqDW71vGn7lOrcZYKytN7PVN5FPxgO4E6HvwZC3VVdmGoSgMlyvxedh6sdfiqjQHabPCpcKG8QdMUGs52a/1M07dLxQ9dz6MQbqbxfa8i3GSxhw5We7sXGu/GoZnmorvmi0ThupeYoY4asGhREV8HNxxSqNywUhliO9cviISy37k1HKf5DvfcgAlOis1qIbaiUyJP6oeMDhQYbJi68VChSmrqd0j54qYhIJ0t5iKG1EXvumO0EFe/awcC7rwGyVb9s0Vy5D2x59t+AgnT+mfPOJdgJGveamKb8LS4/yloe49zgcHnOttOsxyyZi4Xo9agVpuKrkEZk6fq4tDX7kl1wIbe9V01eYQl8q2WnDaY9sNjjnZb6Mp/u4NP/+4iFdluYs/7ij7NBOYzD0YN451UDvMAkYzJ2ns00kSK4V/107BKqPVk4GUCsZz/PnxLLUhL4Wpw0rBAChq7G243714Uvaavt2h3L5bi5Rn6CVlhA0emum2N62wHyw9DTjiEas2aDCwAcBrK7SvjN0NOejzqvqStXqqbrb5kcX3JppTFRZP4FHxF7MyP9doloXV8V8IBIFpPkPQwY+cf4+NXGN/ErqlWErgxDbdk+2VXhcU/PZvD83CI8HOQRgeZjV///ZzuMI/Yrt+rOLuaUqRsFmsxv4TiYIsoDzRDfO0oi+fecnqE74bjBIEQHSg5lVXpF5Ua0JILSbcQzPhRg7Z2R3576/jFW0R+iCNc1hy0mUMLv/puM4KAdRiU5RRO7zKElN3YxrzwjGCPGU4t0owTWVkL/nbiOFDRq3X+wgBPBLAjJU2z4h6kJECOTZzwCR3WK2qpuWUdgKf0KjmC3aOyENRqp4Jo8AUSgxJTAjBgkqhkiG9w0BCRUxFgQU0DO2rnvkRHb2gJdc1pPNAZTAEoIwMTAhMAkGBSsOAwIaBQAEFCWtFCCv1EkvdsVopQnstkQlC2DEBAiCQuZREDDoIAICCAA=\",\n\t\t\t\t\"id\": 9,\n\t\t\t\t\"createdDate\": \"2018-07-10T06:54:40.0235747\",\n\t\t\t\t\"updatedDate\": \"2018-07-10T06:54:40.0235747\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"key\": \"crypto.server.chain\",\n\t\t\t\t\"value\": \"MIIN2QIBAzCCDZ8GCSqGSIb3DQEHAaCCDZAEgg2MMIINiDCCCD8GCSqGSIb3DQEHBqCCCDAwgggsAgEAMIIIJQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIFM4+FO6OcUsCAggAgIIH+Ob6jQeqdFveuEz6C0tsYFUVbQqXAlcp0BnLuZqRk5YvXixEZz3CXbS1R+1BC8yc+qJQ7JoZJWgY2hFL6NAGhKpAMRliphrfVIF6MuKT0rHiKi++e/T1jV5ZFfRZX8vbRgkkBxfgrnFS27mge+tpXIGji72rlx8fmKEQixgauy+xbR6APnqLQyCcsm+SX9yTjE6eL1v67JZb4YY8qozNDJmbTsF59t17vtDL7pO+r7OVnD5ellYAXm33NYZopSZlXeiGQS9jZ5PdhydFrNpSbdCjkBs0Qg7uzHgJquCHPHqeZFYvo+E2RmD6AR3MGb86WZjC8bv6q5mRObG+xCSE37ihcyuYW8OfgKmQ8YbEdR3YwWiMuZPAaL4WsapJv50NgvdYbreIMHJVrznkeScniYimOUlAkFe6iaVu/ZGtGQswW9oyWJpdvtSM89oyia7f8qbALuGMd4A15llN0CKJSvQe/J0omxa+QzSC+z10AxA1JVjsRn8DcloY7pkaUmx6JsNNBPuFWEFO9Ao6ffjIhT13Gw6kHzofIuHJVfWoYxmsf2OFY7f1RgunBCww27NjdTuHb1hnD9WFoTZ0SY5pSM98dXLjfBD27ZKDXhK7n2s45mhU3nASGE0rdTY/KwhMKF8j/Cu00SQ784fHuvMvn6i07ORZ5tUEGCcdAgXXuXdKveLHUf+4oPIYeRJX/zAAJH1AlD80AIL+9rzKzRo9gHXJaEciEmo/bZFWBSZpy4cx7sddxwmwWjJ79IvOwEDvqvaJwLEUJyN2aq70q1W/y98tfOHZmGHDtkM2xjzppbk0JaCqorx3Y32gTDRZBCDTGXU26UkgP7PtnSEiKMpTDRJ0bDu+wO17fMvAvp0s5YTaS3XHizc3LVvcMKKevZNjWodVeUnSveW6WMxm2qTYaiX6kEdse7rqZuALggLVVXYEe8X2S+9SBQS6obZcGdI9guy3kmM/5MUT90ft47MAkII1Zc+rc9nBzXm2cnwOytytWIv+0Xb22Ac7//zcGC1uStPJ4G9SOWpV23UAkpeRGEFqzwMpENDR4iTnc8LFRlceXYIdxVmLz8HUH4wkXnx9NLy7/XbUhRNju4Q0CQ3jETLINkGD8fBQer8tzff+BlTwILQLg06abDUc3FnBYavIsRMsfH63e64IrM4+lRaTZxqqeagZFsFRt62X1DF489iVXVZZostAreDBdX2YuWKkcJUTvN7TTkz5gDnXCgLe6nW50PJtMqRirugpA8waOp1zzaM0BJHDxEIyOlPAUZfoqAabWiCua2FlZHR+XfedFSoqHdMpGCufpMCLRwQT071e2Om7N9llDBphEZfwnMvgKFZOHSlB73YGGN4b5vaIYZOtr97qopYpSzHY1KOr+KskhBMRrsqU0egI1cMkWn3v9I1Tnz+qR80IhtY2Tn0OIZGIPzwbLi0KikS6o38Rqga+d2lriOw1z5kxA47jT21TxiyhNdm4dVpH0/pC2/74PovrMwmX6SvSMq1oZwdB+gJI98RrXqBBRas+1cMT74xVtaVGPZAt0B8XxEBEYxpEAtybLc5XehwZFppCesPlbUeh2hm0j3DA+LPinSiNxlPd7n5E2mi7wZ2xGYJEIW424QewS5yM+oOrT3D5LLdnjyBackU7/6gqufYvuTFQR3ZOyCYaQkpf6uENKuWdDOOE5bBgViIPAgf0D+Sqf6k4G+9BuOUwYGv+08svMjBAAmX/ROh/Yb+9BU0qZ1A79q3OkrrqAhjN5XTvVZZTQ/wPNLz/2KQOGUc93bSxMFJ/1qhUTzV/sdUxnGNWk+cTKtxr2ZB24lgFfJawukCFOzufKDSAglAWzLLBm+DOnkmapsWtj3knMFJHTbR5PI6/rujLfPKeXU7l4flAybheh3aa5mGf4YSsoZDMPqwqXOWWxrKWk4uQQdjZxTX17qe5Sdx5COIBjbza+xgPmbmUZoQ9Ion34B1DJ3VIwvm7EjYkmQfaHiCXtD7+VmUeZoTzlQzzawdw1JgN3X8Vf8kSrVOkSgz+LVCtenKXM/tx2c5CruShcW9uiwYIq0O3XUvpqm/vFHUlg7vOoatjw7tqyrPaXG/HUzpXvwa27gcNXqdeZSalTeKpFWy5FgB+l9QzkjpDBrF/s7FB+LXIxt++ZiNKnkIrmAjufSGHM2+Yhp7jqsx8BI1VMPe8yUKG/P1QBH1jLUuSq+u9k3R2UzmAiIuKSrhhp2ZqLJd3ZmUmsZGibfj6rwMsHbOK6iRiFGwjhqKG2E5X6cCwnp5yjFTi3U33/iMfqrgFunviuhJ8EjeRwMYYerBsilftAyoIAimdOAk+Ue73Ir7oOSgsALKMMy9t4hUITSjGlYzhmXMrxfB/CK8DXvxY6wSyMNnRdfUCItN3QmnXR6Z3Ov20NBle0qqsJXBcwQIW6D8GP3ceA8pvPcE6QHqZEfQWez351MzLFZiwf4B+Sf3TQg50pta8d5V81GSc75JDuQ/7LHOQ9h7cX0PUyZh8eNjXfcBvlNZREmTlpZoEC6gdu9F9CS0JdCb7c6nBR1zsBT/qk39jGLYsFkBtlm2fd45z86qoM/pPLVf+EXjyGW5ORG/GivtqHKSA+Kv5/aOQkELTpzpmVK6XB/WqdeavZ9hIwOfefrkE7TZ7fFELnaCVeQ1fMs3+nJj/inv7+yh+9PHp9Hdl0PZl0P+UPA0RbTL2NdQneEWmQuOu7bpWLCLzoTIyVTCCBUEGCSqGSIb3DQEHAaCCBTIEggUuMIIFKjCCBSYGCyqGSIb3DQEMCgECoIIE7jCCBOowHAYKKoZIhvcNAQwBAzAOBAhhE7NCxkTQIAICCAAEggTIsa2cjpsI/B0HmOEIbolYZ72ZiKRoSD1cSbo7NoNrGfxxytX5uVP1Bg9gl9QrGvzwFENYTZJwTcLH9KYjgUahRpPElzqzXILKwnn6IbPOjW70qTsONcz64ZCO4M9TJ8btPQnrTckQmIbtCVyUUk9uAL8oTtpyFK+gLdz1F8vp1sINZySe5smu22D/nCsP9vHrBFOCMYbWLN0pfceotOvMVhahrMCEc+YzP71233dDi18EwyJovzUq4wanujHCNtCAzpWk6qyi7mEc1m0bOumLuLYx83B0HjU6c/dMwwnNi8h4DrK9YDzPvjFDbRC9jGXVksJ9gmoYvqO5IWFbnWeczf0FiyQn/aHNiGWWig6v00Caqtk/AZYf7crn3ysLvAT+7BaM04km28UuE4fcPtDj5hzj/WOSegX0D+JVX4jjhRuOFBgN+Jf+yldHqQIPAQG7Xu1CmK4msnbtS92pWDdDP0a8AzZgE4Av1RRplDqNC4dq+T6Uc41PGdN3V0o/VWRrmkvO5tsT2ML5Fry4SJnjz/nL+3coFwrwDTtU6s0gIX29ZyowVxn7TAOzgdInILAAfWzkDozvvYOZ7czPUtih5icrkGInwDDV/vutDRsyhjIeKcEmF+dtEwbLygjsOiZk6X6vi+v95pwot4PL4pHv5GPnpI/XkdWVkyzOlGeTkBe63DmqGVueo//ZjbvAn9YPJDq6Lzx/nfWKYCa1c6IHZklBuabG9XvIVklF7TZ2BGWGbGS0jtPTlUdDrXYDJ8ndNgHwNhT74bBlWEddi2sj4I1ydd26KWhvkzL7nVIsMMpDxShFn9LhkIsysdYAy1VVKliz+d1KXf6ofEXaARmZDWAv0RQdGiTTY4R11qb9IUmhxzZPJpWrdergKSc9lDKQ8AvmGSeu7bWsSBn7QCZIrycxFCgkb3YhvQNun9oG6+PAecyqEO9uRzhjZ/Vw3iOE1ZIG3mqiPF8wvh9vfozwjJAEwcnJE1Bc3dzvahdCS9RV/No7mtlkirLO00So3m9wRdbx0y5dQnK0FPoQ9KJvtMno8wzsygpBqQZdJEW5AH6SqLKaGX/hcIXb/xpvX8VNIC6mvPYXU7LiuKuqOKKdiXZ3EIRDFpJtKH7nH1JBVPBvtAAlj68+d418MgBwdNcFl/pabX9QtNf8BwtXGhb8NQYT7bo34x2ci+o/9Rpa8BVeKmtpr/OGA2+U8tVfcCzFPQw/KKyL9N7gKnwbtvvkzIbSfcYbJ2McmjGMqO6jMCMPGw2MBcW7vF9AMOl6A66dzhi9Fyc4kSoxU2Cw04y1Czz0x1JseQ5NkiioRwgBbLFZFEYv03GaupofUW0ULK85Ee21Il2jU999rOdwCMhKJqVdA1zWhqhj7TTfTF1T0dbzYYiWlWjZ/uyELURXxC0im8HsI07Fp6hpv+lN+PKYWpWjtHwoU7YoQY2w0tbTLy3kE0N2pM3q4V0F78nG+1Bm3AT9CmffGD08mwwvli+oBfcrSVo3LviqMSt8aK3ZTDbRRCnwPRN6V3eLsHRD33kYIWKZ7mgMjJLfZYezpP5zUWBIgqcsl4uPJMkz1booosX/MCC20HLl3Zr5TdkMWLfpBAWfVmTYkPr9EejXs9Lrt6uko9zWlGq/MSUwIwYJKoZIhvcNAQkVMRYEFNAztq575ER29oCXXNaTzQGUwBKCMDEwITAJBgUrDgMCGgUABBSaMLPF6iHovw9Z2YytXog/QI+NcwQIZBaRVssXkIECAggA\",\n\t\t\t\t\"id\": 10,\n\t\t\t\t\"createdDate\": \"2018-07-10T06:54:40.0301352\",\n\t\t\t\t\"updatedDate\": \"2018-07-10T06:54:40.0301352\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"key\": \"vpn.openvpn.config.listeners\",\n\t\t\t\t\"value\": \"[{\\\"IPAddress\\\":\\\"0.0.0.0\\\",\\\"Port\\\":1194,\\\"ManagementPort\\\":35100,\\\"Protocol\\\":\\\"TCP\\\",\\\"Network\\\":\\\"172.16.224.0/24\\\"},{\\\"IPAddress\\\":\\\"0.0.0.0\\\",\\\"Port\\\":1194,\\\"ManagementPort\\\":35101,\\\"Protocol\\\":\\\"UDP\\\",\\\"Network\\\":\\\"172.16.225.0/24\\\"}]\",\n\t\t\t\t\"id\": 11,\n\t\t\t\t\"createdDate\": \"2018-07-10T06:54:40.0379566\",\n\t\t\t\t\"updatedDate\": \"2018-07-10T06:54:40.0379566\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"key\": \"vpn.openvpn.config.template\",\n\t\t\t\t\"value\": \"{\\\"Listener\\\":null,\\\"AllowMultipleConnectionsFromSameClient\\\":false,\\\"ClientToClient\\\":false,\\\"DhcpOptions\\\":[],\\\"MaxClients\\\":1024,\\\"PushedNetworks\\\":[],\\\"RedirectGateway\\\":[\\\"Def1\\\"]}\",\n\t\t\t\t\"id\": 12,\n\t\t\t\t\"createdDate\": \"2018-07-10T06:54:40.0485107\",\n\t\t\t\t\"updatedDate\": \"2018-07-10T06:54:40.0485107\"\n\t\t\t}\n\t\t]', true);\n\n $realNode->saveOrFail();\n\n foreach ($ips as $ip)\n {\n $stub = new \\App\\NodeIPAddress();\n $stub->ip = $ip;\n $stub->node_id = $realNode->id;\n $stub->asn = 20336;\n $stub->city = 'Dallas';\n $stub->cc = 'US';\n\n $stub->saveOrFail();\n }\n\n $this->createServices($realNode);\n }", "function parallax_child_add_meta_tag(){\n\n//global $current_user;\n // get_currentuserinfo();\n\n//$facebookName = get_user_meta($user_ID, 'facebook');\n\n$myCode = \"doggie\";\n\n//echo '<!-- ' . $current_user->get('facebook') . ', ' . $myCode . ', this is an html comment -->';\n\n}", "public function testLabelWithElement()\n {\n $input = new Formulaic\\Text;\n $label = new Formulaic\\Label('Label', $input);\n yield assert(\"$label\" == <<<EOT\n<label>Label</label>\n<input type=\"text\">\nEOT\n );\n }", "public function markup(): string;", "protected function generateHtml()\n\t{\n\t}", "function roots_no_generator() { return ''; }", "public function testNodeShowHelpText() {\n // Check the node add form.\n $this->drupalGet('node/add/' . $this->testType);\n $this->assertSession()->statusCodeEquals(200);\n $this->assertSession()->pageTextContains($this->testText);\n\n // Create node and check the node edit form.\n $node = $this->drupalCreateNode(['type' => $this->testType]);\n $this->drupalGet('node/' . $node->id() . '/edit');\n $this->assertSession()->statusCodeEquals(200);\n $this->assertSession()->pageTextContains($this->testText);\n }", "function _splurgh_do_node($map,$node,$chain,&$fulltable,$nest)\n{\n\t$fulltable[$node]=1;\n\n\t$title=$map[$node]['title'];\n\t$children=$map[$node]['children'];\n\n\t$out=strval($node).'!'.str_replace('[','&#91;',str_replace(']','&#93;',str_replace(',','&#44;',$title))).',';\n\tif (count($children)>0)\n\t{\n\t\t$out.='[';\n\t\tforeach ($children as $child)\n\t\t{\n\t\t\tif ((!array_key_exists($child,$fulltable)) && (array_key_exists($child,$map)))\n\t\t\t\t$out.=_splurgh_do_node($map,$child,$chain.strval($node).'~',$fulltable,$nest+1);\n\t\t}\n\t\t$out.='],';\n\t}\n\n\treturn $out;\n}", "abstract public function generate() : string;", "function render_block_core_comment_template($attributes, $content, $block)\n {\n }", "function register_block_core_comment_template()\n {\n }", "public function templateComment()\n {\n // just showing how powerful can commenting be with extension\n }", "public function __toString()\n {\n return '/creativestofollow';\n }", "function write_domaine( $domaine ) {\r\n global $CFG;\r\n // initial string;\r\n $expout = \"\";\r\n // add comment\r\n // $expout .= \"\\n\\n<!-- domaine: $domaine->id -->\\n\";\r\n\t\t//\r\n\t\tif ($domaine){\r\n\t\t\t$id = $this->writeraw( $domaine->id );\r\n $code = $this->writeraw( trim($domaine->code_domaine) );\r\n $description_domaine = $this->writetext(trim($domaine->description_domaine));\r\n $ref_referentiel = $this->writeraw( $domaine->ref_referentiel );\r\n\t\t\t$num_domaine = $this->writeraw( $domaine->num_domaine );\r\n\t\t\t$nb_competences = $this->writeraw( $domaine->nb_competences );\r\n\r\n\t\t\t$type_domaine = $this->writeraw( trim($domaine->type_domaine));\r\n\t\t\t$seuil_domaine = $this->writeraw( trim($domaine->seuil_domaine));\r\n\r\n\t\t\t$minima_domaine = $this->writeraw( trim($domaine->minima_domaine));\r\n\r\n $expout .= \" <domaine>\\n\";\r\n\t\t\t// $expout .= \" <id>$id</id>\\n\";\r\n\t\t\t$expout .= \" <code_domaine>$code</code_domaine>\\n\";\r\n $expout .= \" <description_domaine>\\n$description_domaine</description_domaine>\\n\";\r\n $expout .= \" <type_domaine>$type_domaine</type_domaine>\\n\";\r\n $expout .= \" <seuil_domaine>$seuil_domaine</seuil_domaine>\\n\";\r\n $expout .= \" <minima_domaine>$minima_domaine</minima_domaine>\\n\";\r\n // $expout .= \" <ref_referentiel>$ref_referentiel</ref_referentiel>\\n\";\r\n $expout .= \" <num_domaine>$num_domaine</num_domaine>\\n\";\r\n $expout .= \" <nb_competences>$nb_competences</nb_competences>\\n\\n\";\r\n\r\n\t\t\t// LISTE DES COMPETENCES DE CE DOMAINE\r\n\t\t\t$compteur_competence=0;\r\n\t\t\t$records_competences = referentiel_get_competences($domaine->id);\r\n\t\t\tif ($records_competences){\r\n\t\t\t\t// DEBUG\r\n\t\t\t\t// echo \"<br/>DEBUG :: COMPETENCES <br />\\n\";\r\n\t\t\t\t// print_r($records_competences);\r\n\t\t\t\tforeach ($records_competences as $record_c){\r\n\t\t\t\t\t$expout .= $this->write_competence( $record_c );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$expout .= \" </domaine>\\n\\n\";\r\n }\r\n return $expout;\r\n }", "public function testGetOriginalNode()\n {\n $node = new Fluent();\n $node->test = 'test';\n $this->response->setNode($node);\n $this->assertEquals($node, $this->response->getOriginalNode());\n }", "function pmi_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">'. t('Comments') .'</h2>'. $vars['content'];\n }\n}", "public function testAddSnippet()\n {\n\n }", "public static function generate()\n {\n return self::build_crumb(\n text::random('alnum', 16), \n microtime(true)\n );\n }", "public function render(): string\n {\n $string = str_repeat('#', intval($this->attributes['header'])) . ' ';\n if ($this->hasChildren() === true) {\n\n foreach ($this->children() as $child) {\n $string .= $child->render();\n }\n }\n $string .= \"{$this->escape($this->insert)}\";\n\n return $string;\n\n\n\n /*return str_repeat('#', intval($this->attributes['header'])) .\n \" {$this->escape($this->insert)}\";*/\n }", "public function testProfilePrototypeLinkComments()\n {\n\n }", "function smarty_function_randgen_generator_tree($params, &$smarty)\n{\n $tree = $params['tree'];\n $htmltag = '<div class=\"well\"><em class=\"title\">%s</em> : %s';\n $depth = 0;\n $html = '';\n foreach(array_keys($tree['description']) as $key){\n $currentDepth = $tree['depth'][$key];\n $description = nl2br(htmlspecialchars($tree['description'][$key], ENT_QUOTES, 'UTF-8'));\n if($depth == $currentDepth){\n $html .= \"</div>\";\n $html .= sprintf($htmltag, $tree['title'][$key], $description);\n }\n elseif($depth > $currentDepth){\n for($i=0;$i<$depth-$currentDepth;$i++){\n $html .= \"</div>\";\n }\n $html .= sprintf($htmltag, $tree['title'][$key], $description);\n $depth = $currentDepth;\n }\n elseif($depth < $currentDepth){\n $html .= sprintf($htmltag, $tree['title'][$key], $description);\n $depth = $currentDepth;\n }\n }\n for($i=0;$i<$currentDepth;$i++){\n $html .= \"</div>\";\n }\n\n return $html;\n}", "protected function getRandomizerComment()\n {\n return '<br><p>' . __('Randomizer feature is available. The construction like [Buy||Order||Purchase] will use a randomly picked word for each next item when applying a template.') . '<br>' .\n __('Also randomizers can be used within other template variables, ex: ') . '[for only||for {price}] .' .\n __('Number of randomizers blocks is not limited within the template.') . '<br>';\n }", "private function createTree() {\n\t\t$html = $this->getSpec();\n\t\t$html .= '<div class=\"tal_clear\"></div>';\n\t\t$html .= $this->getSkills();\n\n\t\treturn $html;\n\t}", "function charangoten_custom_comment(&$a1, $op) {\n if ($op == 'insert' || $op == 'update') {\n if ($a1['stream_publish']) {\n //dpm($a1, \"dff_custom_comment, publishing to stream\");\n $node = node_load($a1['nid']);\n \n // http://wiki.developers.facebook.com/index.php/Attachment_(Streams)\n $attachment = array(\n 'name' => $a1['subject'],\n 'href' => url('node/' . $a1['nid'], array('absolute' => TRUE, 'fragment' => 'comment-' . $a1['cid'])),\n 'description' => $a1['comment'],\n 'properties' => array(t('In reply to') => array('text' => $node->title, 'href' => url(\"node/\" . $node->nid, array('absolute' => TRUE)))),\n );\n\n $user_message = t('Check out my latest comment on !site...',\n array('!site' => variable_get('site_name', t('my Drupal for Facebook powered site'))));\n $actions = array();\n $actions[] = array('text' => t('Read More'),\n 'href' => url('node/'.$a1['nid'], array('absolute' => TRUE)),\n );\n fb_stream_publish_dialog(array('user_message' => $user_message,\n 'attachment' => $attachment,\n 'action_links' => $actions,\n ));\n }\n }\n\n}", "function cellar_door_preprocess_comment(&$vars) {\n /*$comment = $vars['elements']['#comment'];\n $vars['picture'] = theme('user_picture', array('account' => $comment));*/\n}", "protected function emitCommentCreated(NodeInterface $commentNode, NodeInterface $postNode) {}", "function garland_preprocess_comment_wrapper(&$vars) {\n if ($vars['content'] && $vars['node']->type != 'forum') {\n $vars['content'] = '<h2 class=\"comments\">'. t('Comments') .'</h2>'. $vars['content'];\n }\n}", "public function generate($inside = '')\n {\n if(!empty($this->labelNote))\n {\n $labelNote = ' <span>' . $this->labelNote . '</span>';\n }\n \n return \"<label>\\n<strong>\" . $this->label . \":</strong>\\n\" . $inside . $labelNote . \"</label>\\n\";\n }", "public function getComment(): string;", "function no_generator() { return ''; }", "function no_generator() { return ''; }", "function createNote();", "public function generate(): string;", "public function generate(): string;", "public static function nodeStub() {\n $webform['redirect_url'] = 'node/167';\n $webform['components'][1] = array(\n 'cid' => '1',\n 'form_key' => 'first_name',\n 'name' => 'First name',\n 'type' => 'textfield',\n 'value' => '%get[p3]',\n 'extra' => array(),\n );\n $webform['components'][2] = array(\n 'cid' => '2',\n 'form_key' => 'last_name',\n 'name' => 'Last name',\n 'type' => 'textfield',\n 'value' => '%get[p4]',\n 'extra' => array(),\n );\n $webform['components'][3] = array(\n 'cid' => '3',\n 'pid' => '0',\n 'form_key' => 'email',\n 'name' => 'Mail ',\n 'type' => 'email',\n 'value' => '%get[p5]',\n 'extra' => array(),\n );\n $webform['components'][4] = array(\n 'cid' => '4',\n 'pid' => '0',\n 'form_key' => 'your_message',\n 'name' => 'Your message',\n 'type' => 'fieldset',\n 'value' => '',\n 'extra' => array(),\n );\n $webform['components'][6] = array(\n 'cid' => '6',\n 'pid' => '4',\n 'form_key' => 'email_subject',\n 'name' => 'Subject',\n 'type' => 'textfield',\n 'value' => 'subject default value',\n 'extra' => array(),\n );\n $webform['components'][7] = array(\n 'cid' => '7',\n 'pid' => '4',\n 'form_key' => 'email_body',\n 'name' => 'Your email',\n 'type' => 'textarea',\n 'value' => 'body default value',\n 'extra' => array(),\n );\n return (object) array('webform' => $webform);\n }", "public function getPhpcrNode();", "private function get_atozsites_comment_generator()\n {\n return new CommentIQ_Generator_atozsitesCommentGenerator($this->plugin_path . 'assets/templates/atozsites-comment.php', $this->get_supported_post_types());\n }", "private function createXmlComment($user, $comment = null){\n if($comment == null){\n $comment = new Comment;\n if(isset($user->text) && isset($user->date)){ //objekty user aj comment su zlucene do jedneho\n $comment->text = $user->text;\n $comment->date = $user->date;\n $comment->id = $user->id;\n }\n }\n $xml_part = '<comment>';\n $xml_part .= '<id>';\n $xml_part .= $comment->id;\n $xml_part .= '</id>';\n $xml_part .= '<fullname>';\n $xml_part .= $user->fullname;\n $xml_part .= '</fullname>';\n $xml_part .= '<link>';\n $xml_part .= Yii::app()->params->homePath.'/'.Yii::app()->language.'/user/view/'.$user->username;\n $xml_part .= '</link>';\n\n $xml_part .= '<picture>';\n if($user->profile_picture != '' && ($pic = $this->getPicture($user->profile_picture, 'profile-picture'))!= null){\n $xml_part .= $pic;\n }\n else{\n $xml_part .= Yii::app()->request->baseUrl.'/images/photo-default-'.$user->gender.'.png';\n }\n $xml_part .= '</picture>';\n\n $xml_part .= '<text>';\n $xml_part .= $comment->text;\n $xml_part .= '</text>';\n $xml_part .= '<date>';\n $xml_part .= date('G:i, d. m. Y',strtotime($comment->date));\n $xml_part .= '</date>';\n $xml_part .= '</comment>';\n \n return $xml_part;\n }", "private function makeNode($tagName, $tagContent, $attributes = null)\n\t{ \n\t\t$nodeText = '';\n\t\t$attrText = '';\n\n\t\tif(is_array($attributes))\n\t\t{\n\t\t\tforeach ($attributes as $key => $value) \n\t\t\t{\n\t\t\t\t$attrText .= \" $key=\\\"$value\\\" \";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(is_array($tagContent) && $this->version == RSS1)\n\t\t{\n\t\t\t$attrText = ' rdf:parseType=\"Resource\"';\n\t\t}\n\t\t\n\t\t\n\t\t$attrText .= (in_array($tagName, $this->CDATAEncoding) && $this->version == ATOM)? ' type=\"html\" ' : '';\n\t\t$nodeText .= (in_array($tagName, $this->CDATAEncoding))? \"<{$tagName}{$attrText}><![CDATA[\" : \"<{$tagName}{$attrText}>\";\n\t\t \n\t\tif(is_array($tagContent))\n\t\t{ \n\t\t\tforeach ($tagContent as $key => $value) \n\t\t\t{\n\t\t\t\t$nodeText .= $this->makeNode($key, $value);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$nodeText .= (in_array($tagName, $this->CDATAEncoding))? $tagContent : htmlentities($tagContent);\n\t\t} \n\t\t\t\n\t\t$nodeText .= (in_array($tagName, $this->CDATAEncoding))? \"]]></$tagName>\" : \"</$tagName>\";\n\n\t\treturn $nodeText . PHP_EOL;\n\t}", "private function generateOptional()\n {\n $elements = array( 'author', 'link', 'category',\n 'contributor', 'generator', 'icon',\n 'image', 'copyright', 'description', 'language' );\n\n if ( $this->link !== null )\n {\n $this->checkLinks( $this->channel, $this->link );\n }\n\n foreach ( $elements as $element )\n {\n $data = $this->$element;\n\n if ( !is_null( $data ) )\n {\n switch ( $element )\n {\n case 'contributor':\n foreach ( $this->contributor as $person )\n {\n $this->generatePerson( $this->channel, 'contributor', $person );\n }\n break;\n\n case 'author':\n foreach ( $this->author as $person )\n {\n $this->generatePerson( $this->channel, 'author', $person );\n }\n break;\n\n case 'generator':\n $this->generateGenerator( $this->channel, $this->generator );\n break;\n\n case 'link':\n foreach ( $data as $dataNode )\n {\n $this->generateLink( $this->channel, $dataNode );\n }\n break;\n\n case 'category':\n foreach ( $data as $dataNode )\n {\n $this->generateCategory( $this->channel, $dataNode );\n }\n break;\n\n case 'description':\n $this->generateTextNode( $this->channel, 'subtitle', $data );\n break;\n\n case 'copyright':\n $this->generateTextNode( $this->channel, 'rights', $data );\n break;\n\n case 'image':\n $this->generateMetaData( $this->channel, 'logo', $data );\n break;\n\n case 'icon':\n $this->generateMetaData( $this->channel, 'icon', $data );\n break;\n \n case 'language':\n $this->generateLanguage( $this->channel, $data );\n break;\n }\n }\n }\n }", "public function getDocComment();", "public function testEvaluateReturnsNode() {\n\t\t$this->assertTrue(TRUE);\n\t}", "public function testEvaluateReturnsNode() {\n\t\t$this->assertTrue(TRUE);\n\t}", "function test_render_block_core_comment_content_converts_to_html() {\n\t\t$comment_id = self::$comment_ids[0];\n\t\t$new_content = \"Paragraph One\\n\\nP2L1\\nP2L2\\n\\nhttps://example.com/\";\n\t\tself::factory()->comment->update_object(\n\t\t\t$comment_id,\n\t\t\tarray( 'comment_content' => $new_content )\n\t\t);\n\n\t\t$parsed_blocks = parse_blocks(\n\t\t\t'<!-- wp:comment-template --><!-- wp:comment-content /--><!-- /wp:comment-template -->'\n\t\t);\n\n\t\t$block = new WP_Block(\n\t\t\t$parsed_blocks[0],\n\t\t\tarray(\n\t\t\t\t'postId' => self::$custom_post->ID,\n\t\t\t\t'comments/inherit' => true,\n\t\t\t)\n\t\t);\n\n\t\t$expected_content = \"<p>Paragraph One</p>\\n<p>P2L1<br />\\nP2L2</p>\\n<p><a href=\\\"https://example.com/\\\" rel=\\\"nofollow ugc\\\">https://example.com/</a></p>\\n\";\n\n\t\t$this->assertSame(\n\t\t\t'<ol class=\"wp-block-comment-template\"><li id=\"comment-' . self::$comment_ids[0] . '\" class=\"comment even thread-even depth-1\"><div class=\"wp-block-comment-content\">' . $expected_content . '</div></li></ol>',\n\t\t\t$block->render()\n\t\t);\n\t}", "public static function makeNode($data, $node, $options = array())\n {\n $decl = self::declaration($options);\n $pre = self::offset($options);\n $wrap = '';\n if (isset($options['wrap']) && $options['wrap'] && isset($options['offset']) && $options['offset']) {\n if ($pre) {\n $wrap = $pre;\n } else {\n $wrap = \"\\n\";\n }\n }\n $inner = '';\n if ($node === null) {\n $inner = $data;\n } else {\n $node = self::normalizeNode($node);\n $inner = '<' . $node . '>' . $data . $wrap . '</' . $node . '>';\n }\n return $decl . $pre . $inner;\n }" ]
[ "0.5808416", "0.5742724", "0.5672647", "0.54830205", "0.546262", "0.54484177", "0.5412146", "0.5377637", "0.5370624", "0.53688645", "0.5353552", "0.5351659", "0.5337464", "0.531917", "0.5315884", "0.5315884", "0.5277507", "0.52661645", "0.52661645", "0.5266145", "0.5266145", "0.5266145", "0.5266145", "0.5266145", "0.5259946", "0.5239392", "0.5225729", "0.52058965", "0.5176568", "0.51723266", "0.5171546", "0.51645255", "0.5164336", "0.5164336", "0.5164336", "0.5164336", "0.5164336", "0.51515853", "0.5148754", "0.51481247", "0.512672", "0.5124078", "0.51142365", "0.5111339", "0.5106279", "0.5089103", "0.50778425", "0.50725657", "0.5070232", "0.50437623", "0.5040596", "0.5036281", "0.50296956", "0.50171995", "0.5009133", "0.50045687", "0.5001577", "0.49920404", "0.49904543", "0.4989888", "0.4989017", "0.4988287", "0.4987402", "0.4984432", "0.49763095", "0.49721563", "0.4954005", "0.49466607", "0.4945364", "0.49333286", "0.49194902", "0.4919219", "0.491765", "0.49098355", "0.4909359", "0.49090564", "0.4905668", "0.49007943", "0.4898483", "0.48970467", "0.4896328", "0.4895733", "0.48858288", "0.48715678", "0.48699096", "0.48699096", "0.48688018", "0.48633328", "0.48633328", "0.48596117", "0.4858719", "0.48581654", "0.48558083", "0.48547232", "0.48543796", "0.48516983", "0.48515067", "0.48515067", "0.48500073", "0.48406494" ]
0.55994403
3
Format resulting message array as table
function _notifications_content_test_format_message($message) { $rows = array(); foreach ($message as $key => $value) { $rows[] = array($key, is_array($value) ? _notifications_content_test_format_message($value) : '<pre>' . check_plain($value) . '</pre>'); } return theme('table', array(), $rows); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dumpTable($passedArray) {\n\t\n\techo '<br><table border=\"1\" cellpadding=\"3\" frame=\"border\" rules=\"all\">';\n\tforeach($passedArray as $row) {\n\t\techo '<tr><td>';\n\t\techo implode('</td><td>', $row);\n\t\techo '</td></tr>';\n\t}\n\techo '</table><br>';\n\t@ob_flush();\n\t@flush();\n\n\treturn;\n}", "function dumpTable($passedArray) {\n\techo '<br><table border=\"1\" cellpadding=\"3\" frame=\"border\" rules=\"all\">';\n\tforeach($passedArray as $row) {\n\t\techo '<tr><td>';\n\t\techo implode('</td><td>', $row);\n\t\techo '</td></tr>';\n\t}\n\techo '</table><br>';\n\t@ob_flush();\n\t@flush();\t\n\treturn;\n}", "function toPlainTable($data)\n{\n\t$keys = $data[0];\n\t$keys = array_flip($keys);\n\t$result = '';\n\tforeach($keys as $key)\n\t{\n\t\t$result .= $key . ' ';\n\t}\n\t$result .= \"\\n\";\n\tforeach($data as $item)\n\t{\n\t\tforeach($item as $value)\n\t\t{\n\t\t\t$result .= $value . ' ';\n\t\t}\n\t\t$result .= \"\\n\";\n\t}\n\treturn $result;\n}", "public function array2table($array, $table = true) {\n $out = '';\n foreach ($array as $key => $value) {\n if (is_array($value)) {\n\n /** if (!isset($tableHeader)) { \n $tableHeader =\n '<tr><th>' .\n implode('</th><th>', array_keys($value)) .\n '</th></tr>';\n } **/ \n array_keys($value);\n\n $out .= \"\\n<tr>\";\n $out .= $this->array2table($value, false);\n $out .= \"</tr>\\n\";\n } else {\n \n $out .= \"<td>$value</td>\";\n\n }\n }\n // build it up \n if ($table) { \n $sort_buttons = $this->BuildSortButtons(); \n \n return \"\\n<table>\\n\" . $sort_buttons . $out . \"\\n</table>\\n\";\n\n } else {\n \n return $out;\n } \n }", "public function format(array $message);", "function makeHTMLTable($array){\n\t\t // start table\n\t\t $html = '<table>';\n\t\t // header row\n\t\t $html .= '<tr>';\n\t\t // foreach($array[0] as $key=>$value){\n\t\t // $html .= '<th>' . htmlspecialchars($key) . '</th>';\n\t\t // }\n\t\t // $html .= '</tr>';\n\t\t // data rows\n\t\t foreach( $array as $key=>$value){\n\t\t $html .= '<tr>';\n\t\t foreach($value as $key2=>$value2){\n\t\t $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n\t\t }\n\t\t $html .= '</tr>';\n\t\t }\n\t\t // finish table and return it\n\t\t $html .= '</table>';\n\t\t return $html;\n\t\t\t}", "function buildTable($array){\n // start table\n $html = '<table class=\"table\">';\n // data rows\n foreach( $array as $key=>$value){\n $html .= '<tr>';\n foreach($value as $key2=>$value2){\n $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n }\n $html .= '</tr>';\n }\n\n // finish table and return it\n\n $html .= '</table>';\n return $html;\n}", "protected function _getDataAsTextTable(array $data) {\n\t\t\t// Dummy widths\n\t\t\t$table = new Zend_Text_Table(array('columnWidths' => array(1)));\n\t\t\t$widths = array();\n\t\t\tforeach ($data as $rowData) {\n\t\t\t\t$row = new Zend_Text_Table_Row();\n\t\t\t\tforeach ($rowData as $idx => $cell) {\n\t\t\t\t\t$width = mb_strlen($cell);\n\t\t\t\t\tif (!isset($widths[$idx]) || $widths[$idx] < $width) {\n\t\t\t\t\t\t$widths[$idx] = $width;\n\t\t\t\t\t}\n\t\t\t\t\t$row->appendColumn(new Zend_Text_Table_Column(strval($cell)));\n\t\t\t\t}\n\t\t\t\t$table->appendRow($row);\n\t\t\t}\n\t\t\t$table->setColumnWidths($widths);\t\t \n\t\t\treturn $table->render();\n\t\t}", "function arrayToTable($array_assoc):void {\n if (is_array($array_assoc)) {\n echo '<table class=\"table\">';\n echo '<thead>';\n echo '<tr>';\n list($table_title) = $array_assoc;\n foreach ($table_title as $key => &$value):\n echo '<th>' . $key . '</th>';\n endforeach;\n echo '</tr>';\n echo '</thead>';\n foreach ($array_assoc as &$master):\n echo '<tr>';\n foreach ($master as &$slave):\n echo '<td>' . $slave . '</td>';\n endforeach;\n echo '</tr>';\n endforeach;\n echo '</table>';\n }\n}", "function resultsToTable($results) {\n\t$html = \"<table border='1' cellspacing='0' cellpadding='2'>\\n\";\n\t$html .= \"<tr>\\n<th>ID</th>\\n<th>Name</th>\\n<th>Address</th>\\n<th></th>\\n\";\n\t$html .= \"<th>Region</th>\\n<th>State</th>\\n<th>Status</th>\\n\";\n\t$html .= \"<th>Deactivation Date</th>\\n<th>PWS Type</th>\\n</tr>\";\n\tforeach($results as $object) {\n\t\t$html .= \"\\n<tr>\\n<td>{$object->PWSID}</td>\\n<td>{$object->PWS_NAME}</td>\\n\";\n\t\t$html .= \"<td>{$object->ADDRESS_LINE1}</td>\\n<td>{$object->ADDRESS_LINE2}</td>\\n\";\n\t\t$html .= \"<td>{$object->EPA_REGION}</td>\\n\";\n\t\t$html .= \"<td>{$object->STATE_CODE}</th>\\n<td>{$object->SUBMISSION_STATUS_CODE}</td>\\n\";\n\t\t$html .= \"<td>{$object->PWS_DEACTIVATION_DATE}</td>\\n<td>{$object->PWS_TYPE_CODE}</td>\\n\";\n\t\t$html .= \"</tr>\\n\";\n\t}\n\treturn $html . \"</table>\\n\";\n}", "public function format(array $messages);", "function tabla02($array01){\n\t$i = '0';\n\t$array02[$i++] = \"<table border=\\\"1\\\">\";\n\tforeach( $array01 as $key => $value){\n\t\tif ( $key == 'id' or $key == 'ID' or $key == 'Id'){\n\t\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td><td> - </td></tr>\\n\";\n\t\t} else{\n\t\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td><td>\".$value.\"</td></tr>\\n\";\n\t\t}\n\t}\n\t$array02[$i++] = \"</table>\";\n\treturn $array02;\n}", "function _im_user_getmms_format() { \r\n\t$rows = _im_user_getmms(); \r\n $header = array(\"Code\", \"Description\");\r\n $output = '<div class =\"table-trans-replace\">';\r\n $output .= '<div id =\"table-second-save\">';\r\n $output .= theme('table', array('header' => $header, 'rows' => $rows, ));\r\n $output .= '</div></div>';\r\n return $output;\r\n}", "function render_subscriber_table($table) {\n $s = '<table>';\n $s .= '<tr><th>Id</th><th>Name</th><th>Email</th></tr>';\n foreach($table as $row) {\n $id = \"$row[id]\";\n $name = \"<b>$row[name]</b>\";\n $email = \"$row[email]\";\n $s .= \"<tr><td>$id</td><td>$name</td><td>$email</td></tr>\";\n }\n $s .= '</table>';\n return $s;\n }", "public function toTable(){\r\n\t\t$datas = array();\r\n\t\tforeach ($this as $key => $value) {\r\n\t\t\tif(!in_array($key, $this->arraysis)){\r\n\t\t\t\t$datas[$key] = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $datas;\r\n\t}", "function table($text) {\n\t\t$output = \"\";\n\t\tif (!empty($text)) {\n\t\t\t$output .= '<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"100%\">';\n\t\t\t$array = explode(\"\\n\", $text);\n\t\t\tfor ($i=0; $i<count($array); $i++) {\n\t\t\t\tif (!empty($array[$i])) {\n\t\t\t\t\t$row = explode(\":\", $array[$i], 2);\n\t\t\t\t\t$title = isset($row[0]) ? $row[0] : '';\n\t\t\t\t\t$data = isset($row[1]) ? $row[1] : '';\n\t\t\t\t\tif ($i%2 == 0) {\n\t\t\t\t\t\t$output .= '<tr class=\"row_ab_a\"><td class=\"form_title\" width=\"30%\">'.$title.'</td><td bgcolor=\"#EBF1F6\" width=\"70%\">'.$data.'</td></tr>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$output .= '<tr class=\"row_ab_b\"><td class=\"form_title\">'.$title.'</td><td bgcolor=\"#FFFFFF\">'.$data.'</td></tr>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$output .= '</table>';\n\t\t}\n\n\t\treturn $output;\n\t}", "private function formatTable (array $detectedFiles) : array\n {\n $rows = [];\n\n foreach ($detectedFiles as $type => $data)\n {\n $rows[] = [\n \"<fg=yellow>{$type}</>\",\n $data[\"fileName\"],\n $data[\"digest\"],\n ];\n }\n\n return $rows;\n }", "function makeMultiDimTable($array)\n {\n $totalkeys = 0;\n $totalvalues = 0;\n echo \"<table>\";\n echo \"<thead><tr><td>Keys</td><td>Values</td></tr></thead>\";\n echo \"<tbody>\";\n foreach($array as $key => $value)\n {\n echo \"<tr><td>\" . $key . \"</td><td>\" . $value . \"</td></tr>\";\n $totalkeys += $key;\n $totalvalues += $value;\n }\n echo \"<tr><td colspan=2>Totals</td></tr>\";\n echo \"<tr><td>\" . $totalkeys . \"</td><td>\" . $totalvalues . \"</td></tr>\";\n echo \"</tbody>\";\n }", "public static function genarateTableFromArray($array)\r\n {\r\n if ($array != null) {\r\n $tableGen = '<table class=\"table table-hover\">';\r\n $tableGen .= \\utility\\htmlTableGeneratorHelper::getTableHead();\r\n $tableGen .= \\utility\\htmlTableGeneratorHelper::getTableBody($array);\r\n $tableGen .= '</table>';\r\n return $tableGen;\r\n }\r\n }", "function printTable($arg_array)\r\n\t\t{\r\n\t\techo \"<table border=1>\";\r\n\t\tforeach($arg_array[0] as $key=>$value)\r\n\t\t\t{\r\n\t\t\techo \"<th>\".$key.\"</th>\";\r\n\t\t\t}\r\n\t\techo \"<tr>\";\r\n\t\tforeach($arg_array as $row =>$record)\r\n\t\t\t{\r\n\t\t\tforeach($record as $column_head => $value)\r\n\t\t\t\t{\r\n\t\t\t\techo \"<td>\".$value.\"</td>\";\r\n\t\t\t\t}\r\n\t\t\techo \"</tr>\";\t\r\n\t\t\t}\r\n\t\techo \"</table>\";\r\n\t\t}", "function formatReport($array,$string){\n\t\n\t\t$total = 0.0;\n\t\t$table = '<h3 class=\"text-success\">'. $string .'</h3>\n\t\t\t\t<table class=\"table table-striped table-hover\">\n\t\t\t\t<tHead>\n\t\t\t\t<tr>\n\t\t\t\t<th>Name</th>\n\t\t\t\t<th>Bill Description</th>\n\t\t\t\t<th>Bill Amount</th>\n\t\t\t\t<th>Bill Category</th>\n\t\t\t\t<th>Bill Date</th>\n\t\t\t\t</tr>\n\t\t\t\t</tHead>\n\t\t\t\t<tBody>';\n\t\tforeach ($array as $value){\n\t\t\t$total += floatval($value['BillAmount']);\n\t\t\t$shortDate = explode(\" \", $value['BillDate']);\n\t\t\t$shortDate = $shortDate[0];\n\t\t\t$table .= '<tr>\n\t\t\t\t\t<td>'. $value['FirstName'].' '.$value['LastName'] .'</td>\n\t\t\t\t\t<td>'. $value['BillDesc'] .'</td>\n\t\t\t\t\t<td>'. $value['BillAmount'] .'</td>\n\t\t\t\t\t<td>'. $value['BillCategory'] .'</td>\n\t\t\t\t\t<td>'. $shortDate .'</td>\n\t\t\t\t\t</tr>';\n\t\t}\n\t\t$table .= '\n\t\t\t\t<tr class=\"danger\">\n\t\t\t\t<td></td>\n\t\t\t\t<th class=\"text-right\">Total:</th><th>$'.$total.'</th><td></td><td></td>\n\t\t\t\t</tr>\n\t\t\t\t</tBody></table>';\n\t\n\t\treturn $table;\n\t}", "public function do_review_logs($p_metadata, $p_messages) {\n\n if(empty($p_messages))\n {\n $m_string = 'No logs are stored at the moment.';\n }\n else\n {\n $i = 0;\n $arr[] = array();\n $tab_output = '<p class=\"lead\" id=\"ret_home\"><a href=\"homepage\">&#8592; Return Home</a></p>';\n $tab_output .= '\n <table id=\"table\" class=\"table table-bordered table-hover\">\n <thead>\n <tr>\n ';\n foreach ($p_metadata as $key1 => $value1) {\n $arr[$i] = $value1;\n $tab_output .= '<th scope=\"col\">'. $value1 .'</th>';\n $i++;\n }\n\n $tab_output .= '</tr></thead><tbody>';\n $i = 0;\n // $m_string = '';\n\n foreach ($p_messages as $key => $value) {\n $tab_output .= '<tr>';\n foreach ($value as $key2 => $value2){\n $tab_output .= '<td>' . $value2 . '</td>';\n $i++;\n }\n $tab_output .= '</tr>';\n $i = 0;\n }\n $tab_output .= '</tbody></table><br /><br />';\n }\n\n\n $this->c_review_logs = $tab_output;\n\n}", "function createTable($array,$summary,$caption,$id='',$class='') {\n\tif(!is_array($array) || empty($summary) || empty($caption)) return false;\n\t\n\t$thead_text = '';\n\t$tbody_text = '';\n\n\t$header_total = count($array['header']);\n\tforeach($array['header'] as $key => $header) {\n\t\tif(!is_array($header)) $header = array('text' => $header);\n\t\t$thead_text .= '<th scope=\"col\"'.addAttributes(@$header['title'],$header['id'],@$header['class']).'>'.formatText($header['text']).'</th>'.\"\\n\";\n\t}\n\n\t$i=0;\n\tforeach($array['rows'] as $key => $row_array) {\n\t\t$tbody_row = '';\n\t\tif(empty($row_array['class'])) $row_array['class'] = array();\n\t\telseif(!is_array($row_array['class'])) $row_array['class'] = array($row_array['class']);\n\t\tif(!isEven($i)) $row_array['class'][] = 'odd';\n\n\t\tif(count($row_array['value'])!=$header_total) continue; // if the number of rows don't match header rows...\n\t\tforeach($row_array['value'] as $key => $row) {\n\t\t\tif(!is_array($row)) $row = array('text' => $row);\n\t\t\t$tbody_row .= '<td headers=\"'.$array['header'][$key]['id'].'\"'.addAttributes('',@$row['id'],@$row['class']).'>'.$row['text'].'</td>'.\"\\n\";\n\t\t}\n\t\t$tbody_text .= '<tr'.addAttributes('',@$row_array['id'],@$row_array['class']).'>'.\"\\n\".$tbody_row.'</tr>'.\"\\n\";\n\t\t$i++;\n\t}\n\tif(empty($tbody_text)) return false;\n\t\n\t$table = '<table summary=\"'.formatText($summary).'\"'.addAttributes('',$id,$class).'>\n\t\t<caption>'.formatText($caption).'</caption>\n\t\t<thead>'.\"\\n\".'<tr>'.\"\\n\".$thead_text.'</tr>'.\"\\n\".'</thead>\n\t\t<tbody>'.\"\\n\".$tbody_text.'</tbody>\n\t</table>'.\"\\n\";\n\t\n\treturn $table;\n}", "public function format(array $record);", "function multiple_arrayDisplay($multiple_array)\n{\n $r = '';\n $r .= '<style> td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n foreach ($multiple_array[0] as $key => $value) {\n $r .= '<th>'.$key.'</th>';\n }\n $r .= '</tr>';\n foreach ($multiple_array as $key => $value) {\n $r .= '<tr>';\n foreach ($value as $key1 => $value1) {\n if ($key1 == 'price') {\n $r .= '<td> $'.$value1.' </td>';\n } else {\n $r .= '<td>'.$value1.' </td>';\n }\n }\n $r .= '</tr>';\n }\n $r .= '</table>';\n\n return $r;\n}", "function multiple_arrayDisplay($multiple_array)\n{\n $r = '';\n $r .= '<style> td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n foreach ($multiple_array[0] as $key => $value) {\n $r .= '<th>'.$key.'</th>';\n }\n $r .= '</tr>';\n foreach ($multiple_array as $key => $value) {\n $r .= '<tr>';\n foreach ($value as $key1 => $value1) {\n if ($key1 == 'price') {\n $r .= '<td> $'.$value1.' </td>';\n } else {\n $r .= '<td>'.$value1.' </td>';\n }\n }\n $r .= '</tr>';\n }\n $r .= '</table>';\n\n return $r;\n}", "function table_from_array(&$data_array, $has_header = TRUE, $class = \"\", $id = \"\", $text_limit_to_trim = null) {\n if ((count($data_array) == 0) || (count(current($data_array)) == 0)) {\n trigger_error(\"Array to build HTML table is empty\", E_USER_NOTICE);\n return FALSE;\n }\n $table_object = new html_classes\\table($class, $id);\n\n foreach ($data_array as $row_index => $row_data) {\n if ($has_header && ($row_index === 0)) {\n $thead = $table_object->append_thead();\n $tr = $thead->append_tr();\n } else {\n if (!isset($tbody)) {\n $tbody = $table_object->append_tbody();\n }\n $tr = $tbody->append_tr();\n }\n foreach ($row_data as $col_index => $col_value) {\n if ($has_header && ($row_index === 0)) {\n $tr->append_th($col_value);\n } else {\n if (!is_object($col_value)) {\n if (is_numeric($col_value)) {\n if (is_float($col_value)) {\n $col_value = number_format($col_value, 2);\n } else {\n $col_value = number_format($col_value);\n }\n }\n if (is_numeric($text_limit_to_trim) && strlen($col_value) > $text_limit_to_trim) {\n $col_value = substr($col_value, 0, $text_limit_to_trim) . \"...\";\n }\n } else {\n if (is_numeric($text_limit_to_trim) && strlen($col_value->get_value()) > $text_limit_to_trim) {\n $col_value->set_value(substr($col_value->get_value(), 0, $text_limit_to_trim) . \"...\");\n }\n// d($col_value->get_value());\n }\n $tr->append_td($col_value);\n }\n }\n }\n// \\var_dump($table_object);\n return $table_object;\n}", "function tabla01($array01){\n\t$i = '0';\n\t$array02[$i++] = \"<table id=\\\"one-column-emphasis\\\" >\\n\n <colgroup>\\n\n \t<col class=\\\"oce-first\\\" />\\n\n </colgroup>\\n\n <tbody>\\n\";\n\tforeach( $array01 as $key => $value){\n\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td></tr>\\n\";\n\t}\n\t$array02[$i++] = \"</tbody>\\n</table>\\n\";\n\treturn $array02;\n/*\n<table id=\\\"one-column-emphasis\\\" >\n <colgroup>\n \t<col class=\\\"oce-first\\\" />\n </colgroup>\n <tbody>\n \t<tr>\n \t<td></td>\n </tr>\n </tbody>\n</table>\n*/\n}", "function minitable($Array){\n\t$table='<table class=\"mini\">';\n\tforeach ($Array as $row=>$Cells){\n\t\t$table.='<tr>'.\"\\n\";\n\t\tforeach ($Cells as $column=>$value){\n\t\t\t$class=setclass($row,$column,$value);\n\t\t\t$value=htmlSafe($value);\n\t\t\tif (strlen($value)>1){$value='&nbsp;';}\n\t\t\tif (strlen($value)==0){$value='x';}\n\t\t\t$table.='<td class=\"'.$class.'\">'.$value.'</td>'.\"\\n\";\n\t\t}\n\t\t$table.='</tr>'.\"\\n\";\n\t}\n\t$table.='</table>';\n\treturn $table;\n}", "public function asTable($data) {\n if (!$data || !is_array($data) || !count($data)) {\n return 'Sorry, no matching data was found';\n }\n $data = collect($data);\n\n // output data\n $table = $this->outputTable($data);\n return $table;\n }", "protected function array2Html2ColTable($array,$width=300 ){\n\t\t$nodeHTML = array('<table width=\"'.$width.'\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">');\n\t\t$i=0;\n\t\tforeach( $array as $k=>$v ){\n\n\t\t\t$nodeHTML[] = '<tr style=\"background-color:'.(\n\t\t\t\t$i % 2 == 0 ? '#ffffff' : '#ececec'\n\t\t\t).';\" valign=\"top\"><td>'.$k.'</td><td>'.htmlspecialchars($v).'</td></tr>';\n\t\t\t$i++;\n\t\t}\n\t\t$nodeHTML[] = '</table>';\n\n\t\treturn implode('',$nodeHTML);\n\t}", "function as_table() \n {\n #$str = \"<table> \\n\";\n $str = \"\";\n foreach(get_object_vars($this) as $name => $obj) \n {\n if ($obj != NULL) \n {\n $str .= \"<tr>\\n\\t<td>\".$obj->label().\"</td>\\n\\t\";\n $str .= \"<td>\".$obj.\"</td>\\n</tr>\\n\";\n }\n }\n #$str .= \"</table>\\n\";\n return $str;\n }", "function outputFormat(array $headers, array $cells, $result, $content_name) {\necho '<h3>'.ucfirst($content_name).' Content</h3>';\necho '<table>';\nforeach ($headers as $val) {\necho '<th>'.$val.'</th>';\n}\nwhile($row = mysqli_fetch_array($result))\n {\n echo '<tr>';\n foreach ($cells as $val) {\n echo '<td>'.$row[$val].'</td>';\n }\n echo '</tr>';\n }\n echo '</table>';\n}", "function makeTemplateRowsForMsg($allMessage) {\n global $user;\n\n foreach($allMessage as $message) {\n $row = new Template(__DIR__ . '/../view/message.tpl');\n\n $login = $message['senderId'] === $user->getId() ? 'You' : '<b>SUPPORT</b>';\n $class = '';\n\n if ($message['senderId'] !== $user->getId()) {\n $class = $message['isRead'] == 0 ? \" class='notRead'\" : '';\n }\n\n foreach ($message as $key => $value) {\n $row->add($key, $value);\n $row->add('login', $login);\n $row->add('class', $class);\n }\n $rowsTemplateMsg[] = $row;\n }\n $rowsMessages = Template::joinTemplates($rowsTemplateMsg);\n return $rowsMessages;\n}", "function toTable($data)\n{\n//print_r($data);\n\t$keys = $data[0];\n\t$keys = array_flip($keys);\n\t$result = \"<table>\\n\\t<tr>\";\n\tforeach($keys as $key)\n\t{\n\t\t$result .= '<th>' . $key . '</th>';\n\t}\n\t$result .= \"</tr>\\n\";\n\t$counter = 0;\n\tforeach($data as $item)\n\t{\n\t\t$counter++;\n\t\tif ($counter % 2 == 1)\n\t\t{\n\t\t\t$result .= \"\\t<tr>\";\n\t\t} else\n\t\t{\n\t\t\t$result .= \"\\t<tr class=\\\"odd\\\">\";\n\t\t}\n\t\tforeach($item as $value)\n\t\t{\n\t\t\t$result .= '<td>' . $value . '</td>';\n\t\t}\n\t\t$result .= \"</tr>\\n\";\n\t}\n\t$result .= \"</table>\\n\";\n\treturn $result;\n}", "public function generateTable($myTableArrayBody) {\n\t\t\t $x = 0;\n\t\t\t $y = 0;\n\t\t\t $seTableStr = '<table><caption><h3>HAVANAO PAYMENT DETAILS</h3></caption><tbody>';\t\t \n\t\t\t foreach ($myTableArrayBody as $key => $value) {\n\t\t\t \t$seTableStr = $seTableStr.'<tr><th>'.strtoupper($key).'</th><td>'.$value.'</td></tr>';\n\t\t\t }\n\t\t\t $seTableStr .= '</tbody></table>';\n\t\t\t return $seTableStr;\n\t\t\t}", "function tabla03($array01){\n\t$i = '0';\n\t$array02[$i++] = \"<table border=\\\"0\\\">\";\n\tforeach( $array01 as $value ){\n\t\tforeach( $value as $key => $value){\n\t\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td></tr>\\n\";\n\t\t}\n\t\t// linea en blanco\n\t\t$array02[$i++] = \"<tr><td></td><td></td></tr>\\n\";\n\t}\n\t$array02[$i++] = \"</table>\";\n\treturn $array02;\n\n// foreach( $array02 as $value ){\n//\techo $value;\n//}\n}", "public function tableDataArray($in){\n $out = '';\n foreach($in as $k => $v){\n $out[$k] = '<td>'.$v.'</td>';\n }\n return($out);\n }", "public function formatErrors($array = array())\n {\n // validation de l'entity a échouée.\n $error_msg = [];\n foreach($array as $errors){\n if(is_array($errors)){\n foreach($errors as $error){\n $error_msg[] = \"<br> - \" . $error;\n }\n }else{\n $error_msg[] = \"<br> - \" . $errors;\n }\n }\n return $error_msg;\n }", "public function flush() {\n if (empty($this->_row) or empty($this->_row['line']['normal'])) {\n // Nothing to print - each line has to have at least number\n $this->_row = array();\n foreach ($this->columns as $col) {\n $this->_row[$col] = array('normal'=>'', 'info'=>'', 'warning'=>'', 'error'=>'');\n }\n return;\n }\n $ci = 0;\n $ri = 1;\n echo '<tr class=\"r'.$ri.'\">';\n foreach ($this->_row as $key=>$field) {\n foreach ($field as $type=>$content) {\n if ($field[$type] !== '') {\n $field[$type] = '<span class=\"uu'.$type.'\">'.$field[$type].'</span>';\n } else {\n unset($field[$type]);\n }\n }\n echo '<td class=\"cell c'.$ci++.'\">';\n if (!empty($field)) {\n echo implode('<br />', $field);\n } else {\n echo '&nbsp;';\n }\n echo '</td>';\n }\n echo '</tr>';\n foreach ($this->columns as $col) {\n $this->_row[$col] = array('normal'=>'', 'info'=>'', 'warning'=>'', 'error'=>'');\n }\n }", "private function parse(array $data)\n {\n // Constants\n $aStatus = [ ];\n $aStatus[\\Foundation\\Debug\\Variable\\CContainer::KEY_IDENTICAL] = [ 'status' => 'identical', 'class' => 'info' ];\n $aStatus[\\Foundation\\Debug\\Variable\\CContainer::KEY_UPDATED] = [ 'status' => 'updated', 'class' => 'warning' ];\n $aStatus[\\Foundation\\Debug\\Variable\\CContainer::KEY_DELETED] = [ 'status' => 'deleted', 'class' => 'error' ];\n $aStatus[\\Foundation\\Debug\\Variable\\CContainer::KEY_ADDED] = [ 'status' => 'added', 'class' => 'success' ];\n $sReturn = '<thead><tr><th>KEY</th><th>STATUS</th><th>START</th><th>END</th></tr></thead>'\n . '<tbody>';\n foreach ($data as $key => $value) {\n if ($key === 0) {\n continue;\n }\n $sReturn .= '<tr class =\"' . $aStatus[$value['status']]['class'] . '\" >'\n //$sReturn .= '<tr>'\n . '<td>' . htmlentities($key, ENT_QUOTES, 'UTF-8') . '</td>'\n . '<td class =\"' . $aStatus[$value['status']]['class'] . '\" >' . $aStatus[$value['status']]['status'] . '</td>';\n if ($value['status'] == \\Foundation\\Debug\\Variable\\CContainer::KEY_IDENTICAL) {\n // Identical\n $sReturn .= '<td colspan=\"2\">' . $this->format($value['values']['start']) . '</td>';\n } else {\n // Updated or deleted or added\n if ($value['values']['type'] == \\Foundation\\Debug\\Variable\\CContainer::VALUE_OTHERS) {\n // Scalar\n $sReturn .= '<td>' . $this->format($value['values']['start']) . '</td>'\n . '<td>' . $this->format($value['values']['end']) . '</td>';\n } else {\n // Arrays\n $sReturn .= '<td colspan=\"2\"><table class=\"table table-striped table-bordered\">'\n . $this->parse($value['values']['end']) . '</table></td>';\n }\n }\n $sReturn .= '</tr>';\n }//foreach(...\n $sReturn .= '</tbody>';\n return $sReturn . PHP_EOL;\n }", "function table_display($table)\n{\n $out = '';\n $out = '<style> td,th{border: solid 2px black;}</style>';\n if (count($table) == 0) {\n //table is empty\n return 'table is empty';\n }\n $out .= '<table>';\n\n //table header\n $col_names = array_keys($table[0]);\n $out .= '<tr>';\n foreach ($col_names as $col_name) {\n $out .= '<th>'.$col_name.'</th>';\n }\n $out .= '</tr>';\n //table data\n $out .= '</tr>';\n foreach ($table as $one_row) {\n $out .= '<tr>';\n foreach ($one_row as $key => $col_name) {\n if ($key == 'price' and gettype($key) != 'integer') {\n $out .= '<td> $'.$col_name.' </td>';\n } else {\n $out .= '<td>'.$col_name.' </td>';\n }\n }\n $out .= '</tr>';\n }\n $out .= '</table>';\n\n return $out;\n}", "function print_table($data)\n{\n\t$col_width = array();\n\n\t// pre-calculate column width\n\tforeach ($data as $row) {\n\t\tforeach ($row as $col => $value) {\n\t\t\t$col_width[$col] = max(@$col_width[$col], mb_strlen(var_export($value, true)));\n\t\t}\n\t}\n\n\t// include key width\n\tforeach ($col_width as $label => & $width) {\n\t\t$width = max(mb_strlen($label), $width);\n\t}\n\t\n\t// show table header\n\techo \"\\n \";\n\tforeach ($col_width as $label => $width) {\n\t\techo \"+\", str_repeat('-', $width + 2);\n\t}\n\techo \"+\\n \";\n\tforeach ($col_width as $label => $width) {\n\t\t$pad = ($width - mb_strlen($label)) / 2.;\n\t\techo \"| \", str_repeat(' ', floor($pad)), $label, str_repeat(' ', ceil($pad)), \" \";\n\t}\n\techo \"|\\n \";\n\tforeach ($col_width as $label => $width) {\n\t\techo \"+\", str_repeat('-', $width + 2);\n\t}\n\techo \"+\\n \";\n\n\t// show table\n\tforeach ($data as $row) {\n\t\tforeach ($row as $col => $value) {\n\t\t\t$value_str = var_export($value, true);\n\t\t\t$pad = $col_width[$col] - mb_strlen($value_str);\n\t\t\tif (is_numeric($value)) {\n\t\t\t\techo \"| \", str_repeat(' ', $pad), $value_str, \" \";\n\t\t\t} else {\n\t\t\t\techo \"| \", $value_str, str_repeat(' ', $pad), \" \";\n\t\t\t}\n\t\t}\n\t\techo \"|\\n \";\n\t}\n\n\tforeach ($col_width as $label => $width) {\n\t\techo \"+\", str_repeat('-', $width + 2);\n\t}\n\techo \"+\\n\\n\";\n}", "function result_to_table($result)\n\t{\n\n\t\techo \" <TD>\\n\";\n\t\techo \"<table border=1 BGCOLOR=\".\" >\\n\";\n\n\t\t//Header\n\t\t$field_num = mysql_num_fields($result);\n\t\techo \"<tr>\\n\";\n\t\techo \"\\t<td><b>ID</b></td>\\n\";\n\t\techo \"\\t<td><b>Name</b></td>\\n\";\n\t\techo \"\\t<td><b>Vorname</b></td>\\n\";\n\t\t// echo \"\\t<td><b>Orga</b></td>\\n\";\n\t\techo \"\\t<td><b>Charakter</b></td>\\n\";\n\t\techo \"\\t<td><b>email</b></td>\\n\";\n\t\techo \"\\t<td><b>Telefon</b></td>\\n\";\n\t\techo \"</tr>\\n\";\n\n\t\t//Daten\n\t\twhile ($row = mysql_fetch_row($result))\n\t\t{\n\t\t\techo \"<tr>\";\n\t\t\tfor ($i=0; $i<$field_num; $i++)\n\t\t\t{\n\t\t\t\t// if ($i==0) {\n\t\t\t\t//echo \"\\t<td><a href=\\\"\".$PHP_SELF.\"?op=detail&user_id=$row[$i]\\\">$row[$i]</a></td>\\n\";\n\t\t\t\t// }\n\t\t\t\t// echo \"\\t<td>\".$row[$i].\"&nbsp;</td>\\n\";\n\t\t\t\tif ($i==5)\n\t\t\t\t{\n\t\t\t\t\techo \"\\t<td><a href=\\\"mailto:$row[$i]\\\"> $row[$i]</a></td>\\n\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\techo \"\\t<td>\".$row[$i].\"&nbsp;</td>\\n\";\n\t\t\t\t};\n\t\t\t}\n\t\t\techo \"<tr>\\n\";\n\t\t}\n\t\techo \"</table>\\n\";\n\t\techo \" </TD>\\n\";\n\t}", "function createTable($result) {\n $table = \"<table class='table table-bordered'>\";\n $row = $result->fetch_assoc();\n $table .= \"<tr>\";\n foreach(array_keys($row) as $field) {\n $table .= \"<th class='text-center'>$field</th>\";\n }\n $table .= \"</tr>\";\n while($row) {\n $table .= \"<tr>\";\n foreach($row as $key => $value) {\n $table .= \"<td class='text-center'>\";\n if(strcmp($key, \"Price\") == 0 or strcmp($key, \"Revenue\") == 0) {\n $table.=\"\\$\" . number_format($value, 2, \".\", \"\");\n }\n else {\n $table .= $value;\n }\n $table.=\"</td>\";\n }\n $table .= \"</tr>\";\n $row = $result->fetch_assoc();\n }\n $table .= \"</table>\";\n return $table;\n }", "function SQL2HTML($query, $title=\"Table Summary\")\n{\n \n if (!$result = pp_run_query($query)) {\n $sRetVal = mysql_error();\n } else {\n $sRetVal = \"<table border='1'>\\n\";\n $sRetVal .= \"<tr><th colspan='\" . count($result[0]) . \"'>\";\n $sRetVal .= $title . \"</th></tr>\";\n $sRetVal .= \"<tr>\";\n $i=0;\n //while ($i < count($result[0])) {\n foreach(array_keys($result[0]) as $key){\n $sRetVal .= \"<th>\" . $key . \"</th>\";\n $i++;\n }\n $sRetVal .= \"</tr>\";\n foreach($result as $line){\n $sRetVal .= \"\\t<tr>\\n\";\n foreach($line as $col_value) {\n $sRetVal .= \"\\t\\t<td>$col_value</td>\\n\";\n }\n $sRetVal .= \"\\t</tr>\\n\";\n }\n $sRetVal .= \"</table>\\n\";\n }\n \n return($sRetVal);\n}", "private function getFormTableContent(){\n\t\t$s_style = 'font-size:'.$this->_emailFontSize.'; font-family:'.$this->_emailFontFamily.';';\n\t\t$bgCol1='#FFFFFF';\n\t\t$bgCol2='#e4edf9';\n\t\t$bgColDarkerBG='#cddaeb';\n\t\t$colOutline='#8a99ae';\n\t\t$rowCount=0;\n\t\t$NL=\"\\r\\n\";\n\t\t$s_ret='<table cellpadding=\"5\" cellspacing=\"0\" style=\"'.$s_style.'\">'.$NL;\n\t\tforeach($this->_formElements as $o_el){\n\t\t\tif(get_class($o_el)=='FormItBuilder_htmlBlock'){\n\t\t\t\t//do nothing\n\t\t\t}else{\n\t\t\t\tif($o_el->showInEmail()===true){\n\t\t\t\t\t\n\t\t\t\t\t$bgCol=$bgCol1;\n\t\t\t\t\tif($rowCount%2==0){\n\t\t\t\t\t\t$bgCol=$bgCol2;\n\t\t\t\t\t}\n\n\t\t\t\t\t$elType=get_class($o_el);\n\t\t\t\t\t$elId = $o_el->getId();\n\t\t\t\t\t\n\t\t\t\t\tswitch($elType){\n\t\t\t\t\t\tcase 'FormItBuilder_elementMatrix':\n\t\t\t\t\t\t\t$type = $o_el->getType();\n\t\t\t\t\t\t\t$cols = $o_el->getColumns();\n\t\t\t\t\t\t\t$rows = $o_el->getRows();\n\t\t\t\t\t\t\t$r_cnt=0;\n\t\t\t\t\t\t\t$s_val='<table cellpadding=\"5\" cellspacing=\"0\" style=\"'.$s_style.' font-size:10px;\"><tr><td>&nbsp;</td>';\n\t\t\t\t\t\t\t$c_cnt=0;\n\t\t\t\t\t\t\tforeach($cols as $column){\n\t\t\t\t\t\t\t\t$s_val.='<td style=\"'.($c_cnt==0?'border-left:1px solid '.$colOutline.'; ':'').'background-color:'.$bgColDarkerBG.'; border-right:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.'; border-top:1px solid '.$colOutline.';\"><em>'.htmlspecialchars($column).'</em></td>';\n\t\t\t\t\t\t\t\t$c_cnt++;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$s_val.='</tr>';\n\t\t\t\t\t\t\tforeach($rows as $row){\n\t\t\t\t\t\t\t\t$c_cnt=0;\n\t\t\t\t\t\t\t\t$s_val.='<tr><td style=\"'.($r_cnt==0?'border-top:1px solid '.$colOutline.'; ':'').'background-color:'.$bgColDarkerBG.'; border-right:1px solid '.$colOutline.'; border-left:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.';\"><em>'.htmlspecialchars($row).'</em></td>';\n\t\t\t\t\t\t\t\tforeach($cols as $column){\n\t\t\t\t\t\t\t\t\t$s_val.='<td style=\"text-align:center; border-right:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.';\">';\n\t\t\t\t\t\t\t\t\tswitch($type){\n\t\t\t\t\t\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t\t\t\t\t\t$s_val.=htmlspecialchars($_REQUEST[$elId.'_'.$r_cnt.'_'.$c_cnt]);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'radio':\n\t\t\t\t\t\t\t\t\t\t\t$s_val.=($c_cnt==$_REQUEST[$elId.'_'.$r_cnt]?'&#10004;':'-');\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'check':\n\t\t\t\t\t\t\t\t\t\t\tif(isset($_REQUEST[$elId.'_'.$r_cnt]) && in_array($c_cnt,$_REQUEST[$elId.'_'.$r_cnt])===true){\n\t\t\t\t\t\t\t\t\t\t\t\t$s_val.='&#10004;';\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t$s_val.='-';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$s_val.='</td>';\n\t\t\t\t\t\t\t\t\t$c_cnt++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$r_cnt++;\n\t\t\t\t\t\t\t\t$s_val.='</tr>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$s_val.='</table>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'FormItBuilder_elementFile':\n\t\t\t\t\t\t\tif(isset($_FILES[$elId])){\n\t\t\t\t\t\t\t\tif($_FILES[$elId]['size']==0){\n\t\t\t\t\t\t\t\t\t$s_val='None';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'FormItBuilder_elementDate':\n\t\t\t\t\t\t\t$s_val='[[+'.htmlspecialchars($o_el->getId()).'_0]] [[+'.htmlspecialchars($o_el->getId()).'_1]] [[+'.htmlspecialchars($o_el->getId()).'_2]]';\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$s_val='[[+'.htmlspecialchars($o_el->getId()).':nl2br]]';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$s_ret.='<tr valign=\"top\" bgcolor=\"'.$bgCol.'\"><td><b>'.htmlspecialchars($o_el->getLabel()).':</b></td><td>'.$s_val.'</td></tr>'.$NL;\n\t\t\t\t\t$rowCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$s_ret.='</table>'.$NL;\n\t\treturn $s_ret;\n\t}", "public static function htmlTable ($array, $tableHeadingSubstitutions = array (), $class = 'lines', $keyAsFirstColumn = true, $uppercaseHeadings = false, $allowHtml = false /* true/false/array(field1,field2,..) */, $showColons = false, $addCellClasses = false, $addRowKeyClasses = false, $onlyFields = array (), $compress = false, $showHeadings = true, $encodeEmailAddress = true)\r\n\t{\r\n\t\t# Check that the data is an array\r\n\t\tif (!is_array ($array)) {return $html = \"\\n\" . '<p class=\"warning\">Error: the supplied data was not an array.</p>';}\r\n\t\t\r\n\t\t# Return nothing if no data\r\n\t\tif (empty ($array)) {return '';}\r\n\t\t\r\n\t\t# Assemble the data cells\r\n\t\t$dataHtml = '';\r\n\t\tforeach ($array as $key => $value) {\r\n\t\t\tif (!$value || !is_array ($value)) {return $html = \"\\n\" . '<p class=\"warning\">Error: the supplied data was not a multi-dimensional array.</p>';}\r\n\t\t\t$headings = $value;\r\n\t\t\t$dataHtml .= \"\\n\\t\" . '<tr' . ($addRowKeyClasses ? ' class=\"' . htmlspecialchars ($key) . '\"' : '') . '>';\r\n\t\t\tif ($keyAsFirstColumn) {\r\n\t\t\t\t$thisCellClass = ($addCellClasses ? htmlspecialchars ($key) . ((is_array ($addCellClasses) && isSet ($addCellClasses[$key])) ? ' ' . $addCellClasses[$key] : '') : '') . ($keyAsFirstColumn ? ($addCellClasses ? ' ' : '') . 'key' : '');\r\n\t\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\\t\") . (strlen ($thisCellClass) ? \"<td class=\\\"{$thisCellClass}\\\">\" : '<td>') . \"<strong>{$key}</strong></td>\";\r\n\t\t\t}\r\n\t\t\t$i = 0;\r\n\t\t\tforeach ($value as $valueKey => $valueData) {\r\n\t\t\t\tif ($onlyFields && !in_array ($valueKey, $onlyFields)) {continue;}\t// Skip if not in the list of onlyFields if that is supplied\r\n\t\t\t\t$i++;\r\n\t\t\t\t$data = $array[$key][$valueKey];\r\n\t\t\t\t$thisCellClass = ($addCellClasses ? htmlspecialchars ($valueKey) . ((is_array ($addCellClasses) && isSet ($addCellClasses[$valueKey])) ? ' ' . $addCellClasses[$valueKey] : '') : '') . ((($i == 1) && !$keyAsFirstColumn) ? ($addCellClasses ? ' ' : '') . 'key' : '');\r\n\t\t\t\t$htmlAllowed = (is_array ($allowHtml) ? (in_array ($valueKey, $allowHtml)) : $allowHtml);\t// Either true/false or an array of permitted fields where HTML is allowed\r\n\t\t\t\t$cellContents = ($htmlAllowed ? $data : htmlspecialchars ($data));\r\n\t\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\\t\") . (strlen ($thisCellClass) ? \"<td class=\\\"{$thisCellClass}\\\">\" : '<td>') . ($encodeEmailAddress ? self::encodeEmailAddress ($cellContents) : $cellContents) . (($showColons && ($i == 1) && $data) ? ':' : '') . '</td>';\r\n\t\t\t}\r\n\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\") . '</tr>';\r\n\t\t}\r\n\t\t\r\n\t\t# Construct the heading HTML\r\n\t\t$headingHtml = '';\r\n\t\tif ($tableHeadingSubstitutions !== false) {\r\n\t\t\t$headingHtml .= \"\\n\\t\" . '<tr>';\r\n\t\t\tif ($keyAsFirstColumn) {$headingHtml .= \"\\n\\t\\t\" . '<th></th>';}\r\n\t\t\t$columns = array_keys ($headings);\r\n\t\t\tforeach ($columns as $column) {\r\n\t\t\t\tif ($onlyFields && !in_array ($column, $onlyFields)) {continue;}\t// Skip if not in the list of onlyFields if that is supplied\r\n\t\t\t\t$columnTitle = (empty ($tableHeadingSubstitutions) ? $column : (isSet ($tableHeadingSubstitutions[$column]) ? $tableHeadingSubstitutions[$column] : $column));\r\n\t\t\t\t$headingHtml .= \"\\n\\t\\t\" . ($addCellClasses ? '<th class=\"' . $column . ((is_array ($addCellClasses) && isSet ($addCellClasses[$column])) ? ' ' . $addCellClasses[$column] : '') . '\">' : '<th>') . ($uppercaseHeadings ? ucfirst ($columnTitle) : $columnTitle) . '</th>';\r\n\t\t\t}\r\n\t\t\t$headingHtml .= \"\\n\\t\" . '</tr>';\r\n\t\t}\r\n\t\t\r\n\t\t# Construct the overall heading\r\n\t\t$html = \"\\n\\n\" . \"<table class=\\\"{$class}\\\">\";\r\n\t\tif ($showHeadings) {$html .= $headingHtml;}\r\n\t\t$html .= $dataHtml;\r\n\t\t$html .= \"\\n\" . '</table>';\r\n\t\t\r\n\t\t# Return the HTML\r\n\t\treturn $html;\r\n\t}", "function getTable($array, $firstLineHeader = true, $lastLineFooter = true, $withTableStructure = true)\n{\n\t$ret = '';\n\n\t$rows = count($array);\n\t$cols = isset($array[0]) ? count($array[0]) : 0;\n\t$i = 0;\n\n\tif($firstLineHeader)\n\t{\n\t\t$ret .= '<tr class=\"tableHeaderRow\">';\n\t\tfor($j = 0; $j < $cols; $j++)\n\t\t{\n\t\t\tif($j == ($cols - 1))\n\t\t\t\t$ret .= '<td class=\"tableHeaderCellR\">';\n\t\t\telse if($j == 0)\n\t\t\t\t$ret .= '<td class=\"tableHeaderCellL\">';\n\t\t\telse\n\t\t\t\t$ret .= '<td class=\"tableHeaderCell\">';\n\n\t\t\t$ret .= $array[$i][$j] . '</td>' . \"\\n\";\n\t\t}\n\t\t$ret .= '</tr>' . \"\\n\";\n\n\t\t$i++;\n\t}\n\n\tfor(; $i < $rows; $i++)\n\t{\n\t\t$ret .= '<tr class=\"tableRow\">';\n\t\tfor($j = 0; $j < $cols; $j++)\n\t\t{\n\t\t\tif($j == ($cols - 1))\n\t\t\t{\n\t\t\t\tif($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t\t$ret .= '<td class=\"tableCellBR\">';\n\t\t\t\telse if($i == 0)\n\t\t\t\t\t$ret .= '<td class=\"tableCellTR\">';\n\t\t\t\telse\n\t\t\t\t\t$ret .= '<td class=\"tableCellR\">';\n\t\t\t}\n\t\t\telse if($j == 0)\n\t\t\t{\n\t\t\t\tif($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t\t$ret .= '<td class=\"tableCellBL\">';\n\t\t\t\telse if($i == 0)\n\t\t\t\t\t$ret .= '<td class=\"tableCellTL\">';\n\t\t\t\telse\n\t\t\t\t\t$ret .= '<td class=\"tableCellL\">';\n\t\t\t}\n\t\t\telse if($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t$ret .= '<td class=\"tableCellB\">';\n\t\t\telse if($i == 0)\n\t\t\t\t$ret .= '<td class=\"tableCellT\">';\n\t\t\telse\n\t\t\t\t$ret .= '<td class=\"tableCell\">';\n\n\t\t\t$ret .= $array[$i][$j] . '</td>' . \"\\n\";\n\t\t}\n\t\t$ret .= '</tr>' . \"\\n\";\n\t}\n\n\tif($withTableStructure)\n\t\t$ret = '<p/><table class=\"tableMain\">' . $ret . '</table>';\n\n\treturn $ret;\n}", "public function createtable()\n {\n return $this->_messages;\n }", "private static function pp_tbl(array &$arr) {\n\n if (empty($arr) || !self::$pretty_print)\n return;\n\n // Count rows\n $cols = substr_count(explode(\"\\n\", $arr[0])[0], \"|\");\n // And fill an array \n $cmax = array_fill(0, $cols, 0);\n\n // Loop through each entry in array\n foreach($arr as $key => $line) {\n $h = 0; // Last column separator position\n $col = 0;\n\n // And each character in entry\n for($i = 0; $i < strlen($line); $i++) {\n\n // To work with entries with several rows in an entry\n if ($line[$i] == \"\\n\") {\n $h = $i;\n continue;\n }\n\n // Hit column separator\n if ($line[$i] == \"|\") {\n\n // Find longes column\n if (($i-$h) > $cmax[$col % $cols])\n $cmax[$col % $cols] = ($i - $h - 1);\n\n $h = $i;\n $col++;\n }\n }\n }\n\n // Do the same as above\n foreach($arr as $key => $line) {\n $h = 0; // Last column separator position\n $col = 0;\n\n // Clear array entry\n $arr[$key] = \"\";\n\n for($i = 0; $i < strlen($line); $i++) {\n\n if ($line[$i] == \"\\n\") {\n $arr[$key] .= \"|\";\n $h = $i;\n continue;\n }\n\n if ($line[$i] == \"|\") {\n // Get the conten from $h to $i (content of column)\n $lead = substr($line, $h, $i - $h);\n\n // Check if it must be padded with spaces\n if (($i - $h) < $cmax[$col % $cols])\n $lead .= str_repeat(\" \", $cmax[$col % $cols] - ($i - $h) + 1);\n\n // Restore array entry\n $arr[$key] .= $lead . (($i + 1) == strlen($line) ? \"|\" : \"\");\n\n $h = $i;\n $col++;\n }\n }\n }\n }", "function array2table($array, $recursive = false, $return = false, $null = '&nbsp;')\n\t{\n\t // Sanity check\n\t if (empty($array) || !is_array($array)) {\n\t return false;\n\t }\n\n\t if (!isset($array[0]) || !is_array($array[0])) {\n\t $array = array($array);\n\t }\n\n\t // Start the table\n\t $table = \"<table>\\n\";\n\t\t$head = array_keys($array[0]);\n\tif (!is_numeric($head[0])) {\n\t // The header\n\t $table .= \"\\t<tr>\";\n\t // Take the keys from the first row as the headings\n\t foreach (array_keys($array[0]) as $heading) {\n\t $table .= '<th>' . $heading . '</th>';\n\t }\n\t $table .= \"</tr>\\n\";\n\t}\n\t // The body\n\t foreach ($array as $row) {\n\t $table .= \"\\t<tr>\" ;\n\t foreach ($row as $cell) {\n\t $table .= '<td>';\n\n\t // Cast objects\n\t if (is_object($cell)) { $cell = (array) $cell; }\n\n\t if ($recursive === true && is_array($cell) && !empty($cell)) {\n\t // Recursive mode\n\t $table .= \"\\n\" . $this->array2table($cell, true, true) . \"\\n\";\n\t } else {\n\t $table .= (strlen($cell) > 0) ?\n\t\t\t\t\thtmlspecialchars((string) $cell) :\n\t\t\t\t\t$null;\n\t }\n\n\t $table .= '</td>';\n\t }\n\n\t $table .= \"</tr>\\n\";\n\t }\n\n\t // End the table\n\t $table .= '</table>';\n\n\t // Method of output\n\t if ($return === false) {\n\t echo $table;\n\t } else {\n\t return $table;\n\t }\n\t}", "function getRenderData()\n{\n $data = getRawData();\n $items = [];\n foreach ($data as $row) {\n $columns = explode('|', $row);\n if (count($columns) == 2) {\n $items[] = [\n 'name' => $columns[0],\n 'message' => $columns[1],\n ];\n }\n }\n\n return array_reverse($items);\n}", "public function getOutput() {\n $output = array();\n $output[] = '<style>.rb-debug td, .rb-debug th { border: 1px solid #aaa; padding: 3px;}.rb-debug td { text-align: left; }.rb-debug th { font-weight: bold; background-color: #eee; vertical-align: top; }.rb-debug { border: 1px solid #aaa; }</style>';\n $output[] = '<table class=\"rb-debug\" cellspacing=\"0\">';\n\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.header'));\n\n if (!empty($this->query)) {\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.table'),$this->query->getTable());\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.query'),nl2br($this->query->toSql()));\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.pdo_query'),nl2br($this->query->toSql(false)));\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.params'),'<pre>'.var_export($this->query->getParams(),true).'</pre>');\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.total'),$this->total);\n }\n\n if (!empty($this->messages)) {\n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.messages'));\n foreach ($this->messages as $message) {\n $output[] = $this->renderRow('',$message);\n }\n }\n \n $output[] = $this->renderRow($this->modx->lexicon('rowboat.debug.results'));\n\n $idx = 0;\n foreach ($this->results as $result) {\n $row = array();\n $row[] = '<table>';\n foreach ($result as $col => $val) {\n $row[] = $this->renderRow($col,$val == '' ? ' ' : $val);\n }\n $row[] = '</table>';\n $output[] = $this->renderRow('#'.$idx,implode(\"\\n\",$row));\n $idx++;\n }\n $output[] = '</table>';\n return implode(\"\\n\",$output);\n }", "public function formatBatch(array $records);", "public function format_table_data_multi($table_data, $action = null, $data_properties = null){\n $table_rows = array();\n $header = array();\n $colors = array('w3-teal', 'w3-lime', 'w3-amber');\n if(!$table_data)\n return; \n $colors = array('w3-teal', 'w3-lime', 'w3-amber');\n $target = '';\n $position = 0;\n foreach($table_data[0] as $key => $value){\n if(isset($action) && array_key_exists($position, $action)){\n $header[] = ucwords(str_replace('_', ' ', $action[$position]['label']));\n }\n if(isset($data_properties) && array_key_exists('hidden', $data_properties[$key]))\n continue; \n $header[] = ucwords(str_replace('_', ' ', $key));\n $position++;\n }\n $table_rows['header'] = $header; \n $table_rows['values'] = array();\n foreach($table_data as $record){ \n $values = array();\n $position = 0;\n foreach($record as $field_name => $field_value){\n if(isset($action) && array_key_exists($position, $action)){\n $op = $action[$position][0];\n $op_url = $action[$position]['controller_method'].'?';\n $params = '';\n foreach($op['record_params'] as $url_param => $value_param){\n $params .= $url_param.'='.str_replace(\" \",\"_\", $record->$value_param).'&';\n }\n foreach($op['hard_coded_params'] as $url_param => $value_param){\n $params .= $url_param.'='.str_replace(\" \",\"_\", $value_param).'&';\n }\n $i = $position % sizeof($colors);\n $op_url .= $params;\n $values[] = array('properties' => '','value' => '<a href=\"'.$op_url.'\" \n target=\"'.$target.'\" class=\"w3-btn '.$colors[$i].'\">'.$action[$position]['label'].'</a>');\n }\n $position++;\n $prop = '';\n if(isset($data_properties) && array_key_exists($field_name, $data_properties)){ \n // data_properties are key value pairs\n if(array_key_exists('hidden', $data_properties[$field_name]))\n continue;\n foreach($data_properties[$field_name] as $prop_key => $prop_value){\n $prop .= $prop_key.'=\"'.$prop_value;\n if($prop_key == 'class')\n continue;\n $prop .= '\" ';\n }\n if(array_key_exists('class', $data_properties[$field_name]) && is_numeric($field_value)){\n $prop .= $prop_key.'=\"'.$prop_value;\n $prop .= 'w3-right-align';\n $field_value = $this->ind_numbr_format($field_value);\n $prop .= '\" ';\n } \n } else if(is_numeric($field_value)){\n $prop .= 'class=\"w3-right-align\" ';\n $field_value = $this->ind_numbr_format($field_value);\n }\n // Add extra info to html data-<<attribute>> property\n $values[] = array('value' => $field_value, 'properties' => $prop);\n }\n $table_rows['values'][] = $values;\n }\n return $table_rows;\n }", "static function dump_table ($rows)\n\t{\n\t\t$first_row = true;\n\t\t$keys = array();\n\t\t$lengths = array();\n\t\tforeach ($rows as $row) {\n\t\t\tforeach ($row as $key => $value) {\n\t\t\t\tif ($first_row) {\n\t\t\t\t\t$keys[] = $key;\n\t\t\t\t\t$lengths[$key] = strlen($key);\n\t\t\t\t}\n\t\t\t\t$val_len = strlen((string)$value);\n\t\t\t\tif ($val_len > $lengths[$key])\n\t\t\t\t\t$lengths[$key] = $val_len;\n\t\t\t}\n\t\t\t$first_row = false;\n\t\t}\n\t\tforeach ($keys as $i => $key) {\n\t\t\t$key_len = strlen($key);\n\t\t\tif ($key_len < $lengths[$key]) {\n\t\t\t\t$keys[$i] .= str_repeat(' ', $lengths[$key] - $key_len);\n\t\t\t}\n\t\t}\n\t\techo PHP_EOL;\n\t\techo implode(\"\\t\", $keys);\n\t\techo PHP_EOL;\n\t\tforeach ($rows as $i => $row) {\n\t\t\tforeach ($row as $key => $value) {\n\t\t\t\t$val_len = strlen((string)$value);\n\t\t\t\tif ($val_len < $lengths[$key]) {\n\t\t\t\t\t$row[$key] .= str_repeat(' ', $lengths[$key] - $val_len);\n\t\t\t\t}\n\t\t\t}\n\t\t\techo implode(\"\\t\", $row);\n\t\t\techo PHP_EOL;\n\t\t}\n\t}", "function dump_array($array)\n{\n\n\t$_str = \"<table bgcolor = '%s'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t%s\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table><br>\";\n\n\tif(is_array($array)){\n\n\t\t$size = count($array);\n\t\t$string = \"\";\n\n\t\tif($size) {\n\n\t\t\t$string .= \"{ <br>\";\n\n\t\t\tforeach($array as $a => $b) {\n\n\t\t\t\tif(is_array($b)) { $b = dump_array($b); }\n\t\t\t\tif(is_object($b)) { $b = dump_array(object_to_array($b)); }\n\t\t\t\t$string .= \"&nbsp;&nbsp;&nbsp;&nbsp;<b>$a = '$b'</b><br>\";\n\n \t\t}\n\n\t\t\t$string .= \" }<br>\";\n\t\t}\n\n\t\t$r = sprintf($_str, '#DACE0B', $string);\n\n\t\treturn $r;\n\n } else { return $array; }\n}", "public function getTable()\r\n {\r\n $this->calculateColumnWidth();\r\n\r\n $output = $this->border ? $this->getBorderLine() : '';\r\n foreach ($this->data as $y => $row) {\r\n if ($row === self::HR) {\r\n if (!$this->allBorders) {\r\n $output .= $this->getBorderLine();\r\n unset($this->data[$y]);\r\n }\r\n\r\n continue;\r\n }\r\n\r\n foreach ($row as $x => $cell) {\r\n $output .= $this->getCellOutput($x, $row);\r\n }\r\n $output .= PHP_EOL;\r\n\r\n if ($y === self::HEADER_INDEX) {\r\n $output .= $this->getBorderLine();\r\n } else {\r\n if ($this->allBorders) {\r\n $output .= $this->getBorderLine();\r\n }\r\n }\r\n }\r\n\r\n if (!$this->allBorders) {\r\n $output .= $this->border ? $this->getBorderLine() : '';\r\n }\r\n\r\n if (PHP_SAPI !== 'cli') {\r\n $output = '<pre>' . $output . '</pre>';\r\n }\r\n\r\n return $output;\r\n }", "protected function table($data, $is = true) {\n $columns = [];\n foreach ($data as $row_key => $row) {\n foreach ($row as $cell_key => $cell) {\n $length = strlen($cell);\n if (empty($columns[$cell_key]) || $columns[$cell_key] < $length) {\n $columns[$cell_key] = $length;\n }\n }\n }\n\n // Output table, padding columns\n $table = \"\";\n foreach ($data as $row_key => $row) {\n foreach ($row as $cell_key => $cell)\n $table .= str_pad($cell, $columns[$cell_key]) . (($is == false) ? \"\\t\" : \"\\t\");\n $table .= PHP_EOL;\n }\n return $table;\n\n }", "function printTable($array2d, $keys)\n\t{\n\t\t// Begin table\n\t\techo \"<table class='table table-hover'>\";\t\t// added table style\n\t\t\n\t\t// Add table head row from keys\n\t\techo \"<thead>\";\n\t\tforeach ($keys as $rowHead)\n\t\t{\n\t\t\t\techo \"<th class='success'>$rowHead</th>\";\t\t// added text color style\n\t\t}\n\t\techo \"</thead>\";\n\t\t\n\t\t// Add table rows of content for each event\n\t\tforeach ($array2d as $indexR=>$record)\n\t\t{\n\t\t\techo \"<tr>\";\n\t\t\t// Iterate through each array element's contents and place in a table cell\n\t\t\tforeach ($record as $indexF=>$field)\n\t\t\t{\t\n\t\t\t\tif ($indexF == \"Time\")\t\t\t// This seems like a bad practice have the keys as an parameter but hard code this statement\n\t\t\t\t\techo \"<td>\" . date('j M Y g:i a', $field) . \"</td>\";\n\t\t\t\telse\n\t\t\t\t\techo \"<td>$field</td>\";\n\t\t\t}\n\t\t\t\t\t\n\t\t\t// This seems like a bad practice to have the keys as a parameter but hard code this statement\n\t\t\t// If the current array element's eventId is the same as the session's userId, add an extra edit/delete option.\n\t\t\tif ($record['User ID'] == $_SESSION[\"userId\"])\n\t\t\t{\n\t\t\t\t$i = $record['Event ID'];\n\t\t\t\techo \"<td><a href='ecmain.php?action=EditEvent&EventId=$i'>edit</a>&nbsp;/&nbsp;<a href='ecmain.php?action=DeleteEvent&EventId=$i'>delete</a></td>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"<td></td>\";\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\techo \"</tr>\";\n\t\t}\n\t\t\n\t\t// End table\n\t\techo \"</table>\";\n\t}", "private function render_data()\n\t{\n\t\t// create if the headers exists\n\t\t// 2 header style table\n\t\tif(count($this->headers) == 2 && isset($this->headers[0][0]) && isset($this->headers[1][0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr><th></th>';\n\t\t\tforeach($this->headers[0] as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the row headers and the data\n\t\t\tfor($i=0; $i<count($this->headers[1]); $i++)\n\t\t\t{\n\t\t\t\t// the header\n\t\t\t\t$html .= \"<tr><th>{$this->headers[1][$i]}</th>\";\n\t\t\t\t\n\t\t\t\t// and now the data\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\t// 1 header style table\n\t\tif(count($this->headers) > 0 && isset($this->headers[0]) && !is_array($this->headers[0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr>';\n\t\t\tforeach($this->headers as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the data\n\t\t\tfor($i=0; $i<count($this->data); $i++)\n\t\t\t{\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\treturn '';\n\t}", "protected function format(array $message)\n\t{\n\t\t$output = self::DEFAULT_FORMAT_ECHO;\n\t\tforeach($message as $part => $value)\n\t\t{\n\t\t\tif('extra' == $part && count($value))\n\t\t\t{\n\t\t\t\t$value = $this->normalize($value);\n\t\t\t}\n\t\t\telse if('extra' == $part)\n\t\t\t{\n\t\t\t\t// Don't print an empty array\n\t\t\t\t$value = '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$value = $this->normalize($value);\n\t\t\t}\n\t\t\t$output = str_replace(\"%$part%\", $value, $output);\n\t\t}\n\t\treturn $output;\n\t}", "function _notifications_content_test_format_template($parts) {\n $rows = array();\n $header = array('msgkey' => t('Key'), 'type' => t('Template'), 'method' => t('Method'), 'message' => t('Text'), 'language' => t('Language'), 'format' => t('Format'));\n foreach ($parts as $key => $value) {\n $row = array();\n foreach (array_keys($header) as $field) {\n $row[] = isset($value->$field) ? check_plain($value->$field) : '';\n }\n $rows[] = $row;\n }\n return theme('table', array('header' => $header, 'rows' =>$rows));\n}", "function elastic_email_activity_log_table($form, &$form_state) {\n $output = '';\n\n $status = $form_state['input']['status'];\n $channel = $form_state['input']['channel'];\n $from_date_field = $form_state['input']['date_from'];\n $to_date_field = $form_state['input']['date_to'];\n\n $from_date = _elastic_email_format_date($from_date_field);\n $to_date = _elastic_email_format_date($to_date_field);\n\n try {\n $activity_log = ElasticEmailApiActivityLog::getInstance();\n $activity_log->setParams($status, $channel, $from_date, $to_date);\n $data = $activity_log->makeRequest(FALSE);\n }\n catch (ElasticEmailException $e) {\n drupal_set_message($e->getMessage(), 'error');\n return array();\n }\n\n if (count($data) < 1) {\n $data[] = array(\n array(\n 'data' => 'No records available.',\n 'colspan' => 5,\n )\n );\n }\n\n $activity_list = array();\n foreach ($data as $row) {\n // Remove message, bounce cat., msg-id, trans-id.\n unset($row[4], $row[5], $row[6], $row[7]);\n $activity_list[] = $row;\n }\n\n $table_data['header'] = array(\n 'to',\n 'status',\n 'channel',\n 'date',\n /*'message',\n 'bounce cat.',\n 'msg-id',\n 'trans-id',*/\n 'subject'\n );\n $table_data['rows'] = $activity_list;\n\n $output .= theme('table', $table_data);\n\n $element = $form['results']['wrapper'];\n $element['#markup'] = $output;\n return $element;\n}", "public function format(array $transactions)\n {\n $body = '<tr><td>' . parent::format($transactions) . '</td></tr>';\n\n return <<<EOC\n <table$this->tableProperties>\n <thead>\n <tr>\n <th>Type</th>\n <th>Date</th>\n <th>Amount</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n $body\n </tbody>\n </table>\nEOC;\n }", "function array_display($array_name)\n{\n $r = '';\n $r .= '<style> table,td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n $r .= '<th>Index/Key</th>';\n $r .= '<th>Value</th>';\n $r .= '</tr>';\n foreach ($array_name as $index => $value) {\n $r .= '<tr>';\n $r .= '<td> '.$index.' </td>';\n if ($index == 'price') {\n $r .= '<td> $'.$value.' </td>';\n $r .= '</tr>';\n } else {\n $r .= '<td>'.$value.' </td>';\n $r .= '</tr>';\n }\n }\n $r .= '</table>';\n\n return $r;\n}", "function array_display($array_name)\n{\n $r = '';\n $r .= '<style> table,td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n $r .= '<th>Index/Key</th>';\n $r .= '<th>Value</th>';\n $r .= '</tr>';\n foreach ($array_name as $index => $value) {\n $r .= '<tr>';\n $r .= '<td> '.$index.' </td>';\n if ($index == 'price') {\n $r .= '<td> $'.$value.' </td>';\n $r .= '</tr>';\n } else {\n $r .= '<td>'.$value.' </td>';\n $r .= '</tr>';\n }\n }\n $r .= '</table>';\n\n return $r;\n}", "function array_display($array_name)\n{\n $r = '';\n $r .= '<style> table,td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n $r .= '<th>Index/Key</th>';\n $r .= '<th>Value</th>';\n $r .= '</tr>';\n foreach ($array_name as $index => $value) {\n $r .= '<tr>';\n $r .= '<td> '.$index.' </td>';\n if ($index == 'price') {\n $r .= '<td> $'.$value.' </td>';\n $r .= '</tr>';\n } else {\n $r .= '<td>'.$value.' </td>';\n $r .= '</tr>';\n }\n }\n $r .= '</table>';\n\n return $r;\n}", "function print_friend_request_pure_table($query_result) {\n echo \"<table class=\\\"pure-table pure-table-bordered\\\">\";\n\n echo \"<thead><tr>\";\n echo \"<td>UID</td>\";\n echo \"<td>UID2</td>\";\n echo \"<td>First Name</td>\";\n echo \"<td>Last Name</td>\";\n echo \"<td>Age</td>\";\n echo \"<td>Gender</td>\";\n echo \"<td>Location</td>\";\n echo \"<td>Request Time</td>\";\n echo \"</tr></thead>\";\n\n // echo \"<thead><tr>\";\n // for ($i = 0; $i < pg_num_fields($query_result); $i++) {\n // $fieldname = pg_field_name($query_result, $i);\n // echo \"<th>$fieldname</th>\";\n // }\n // echo \"</tr></thead>\";\n echo \"<tbody>\";\n while ($row = pg_fetch_row($query_result)) {\n echo \"<tr>\";\n $num = pg_num_fields($query_result);\n for ($i = 0; $i < $num; $i++) {\n echo \"<td>$row[$i]</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</tbody>\";\n echo \"</table>\";\n }", "public function fullTableRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($in as $k => $v){\n if(!isset($v)) $v = 'n/a';\n $out .= '<td><a title=\"'.$k.'\">'.$v.'</a></td>';\n }\n return('<tr>'.$out.'</tr>');\n }", "function standardTableRowErrorMessages ($dictionary, $errors, $icons)\n{\n\t$result = '';\n\tif (!empty ($errors))\n\t{\n\t\t$result .= '<tr>';\n\t\t$result .= '<td>';\n\t\t$result .= $icons['warning'];\n\t\t$result .= '</td>';\n\t\t$result .= '<td>';\n\t\tforeach ($errors as $error)\n\t\t{\n\t\t\t$result .= $dictionary[$error].'<br />';\n\t\t}\n\t\t$result .= '</td>';\n\t\t$result .= '</tr>';\n\t}\n\treturn $result;\n}", "protected function doTransform($value)\n {\n $title = array_shift($value);\n // calculate maximum string lengths of each column\n $size = array_map('mb_strlen',$title);\n foreach (array_map('array_values',$value) as $row) {\n $size = array_map('max',$size,array_map('mb_strlen',$row));\n }\n // create formats to output data\n foreach ($size as $n) {\n $format[] = \"%-{$n}s\";\n $line[] = str_repeat('-',$n);\n }\n $format = '| '.implode(' | ',$format).\" |\".EOL;\n $line = '+-'.implode('-+-',$line).\"-+\".EOL;\n // build table from title, data and existing formats\n $table = $line.vsprintf($format,$title).$line;\n foreach ($value as $row) {\n $table .= vsprintf($format,$row);\n }\n if (count($value)>0) $table .= $line;\n return rtrim($table);\n }", "function drawTable($dataArray)\n{\n $dom = new DOMDocument();\n $table = $dom->createElement('table');\n $table->setAttribute('class', 'log-table');\n\n foreach ($dataArray as $row)\n {\n $tr = $dom->createElement('tr');\n $table->appendChild($tr);\n\n $td = $dom->createElement('td', $row);\n $tr->appendChild($td);\n\n $table->appendChild($tr);\n }\n\n $dom->appendChild($table);\n echo $dom->saveHTML();\n}", "public function getMessagefromArray($array){\n\t\tunset($array[0]);\n\t\treturn implode(' ', $array);\n\t}", "public function buildTable($data) {\n $table = '<table class=\"table\">'\n . '<thead>'\n . '<tr>'\n . '<th>Currency</th>'\n . '<th>Rate (%)</th>'\n . '</tr>'\n . '</thead>'\n . '<tbody>';\n\n foreach ($data as $key => $val) {\n if (floatval($val) >= 1) {\n $table .= '<tr class=\"alert alert-success\">';\n \n } elseif (floatval($val) < -1) {\n $table .= '<tr class=\"alert alert-danger\">';\n \n } elseif (floatval($val) < 0) {\n $table .= '<tr class=\"alert alert-warning\">';\n \n } else {\n $table .= '<tr>';\n }\n\n $table .= '<td>' . $key . '</td>'\n . '<td>' . $val . '</td>'\n . '</tr>';\n }\n\n $table .= '</tbody>'\n . '</table>';\n\n return $table;\n }", "function tablaConversiones() {\n \n $array = array();\n $contador = 0;\n $output = \"\";\n $output2 = \"\";\n $heading = array('Numero ','Contenido de $var ', 'isset($var) ', 'empty($var) ', '(bool) $var ', 'is_null($var)');\n $var = array(null, 0, true, false, \"0\", \"\", \"foo\", $array, 2);\n $funciones = array('llamarIsset', 'llamarEmpty', 'llamarBool', 'llamarIsnull');\n \n $output .= \"<table class='table table-bordered'>\";\n $output .= \"<tr>\";\n // imprimimos cabecera\n foreach ($heading as $value) {\n $output .= \"<th>\" . $value . \" </th>\";\n }\n $output .= \"</tr>\";\n foreach ($var as $valor) {\n \n $contador++;\n $output .= \"<th> {$contador} </th>\";\n \n if ($valor === null) {\n $output2 = \"null\";\n } elseif($valor === true) {\n $output2 = \"true\";\n } elseif($valor === 2) {\n $output2 = \"unset(\\$var)\";\n } elseif($valor === \"\") {\n $output2 = \"\\\"\\\"\";\n } elseif($valor === false) {\n $output2 = \"false\";\n }else {\n $output2 = $valor;\n }\n \n $output .= \"<th> \\$var= \". $output2 .\" </th>\";\n \n foreach ($funciones as $funcion) {\n \n if ($valor == 2) {\n unset($valor);\n }\n if ($funcion($valor)) {\n $output .= \"<td class='true'> True </td>\";\n } else {\n $output .= \"<td class='false'> False </td>\";\n }\n }\n $output .= \"<tr>\";\n }\n \n $output .= \"</table>\";\n\n echo $output;\n }", "public function messageSchema($rows) \n\t{\n\t\t$conv_model = FD::model('Conversations');\n\t\t$result = array();\n\t\t\n\t\tforeach($rows as $ky=>$row)\n\t\t{\n\t\t\tif(isset($row->id))\n\t\t\t{\n\t\t\t\t$item = new MessageSimpleSchema();\n\t\t\t\t$item->id = $row->id;\n\t\t\t\t$item->message = $row->message;\n\t\t\t\t$item->attachment = null;\n\t\t\t\t$item->created_by = $this->createUserObj($row->created_by);\n\t\t\t\t$item->created_date = $this->dateCreate($row->created);\n\t\t\t\t$item->lapsed = $this->calLaps($row->created);\n\t\t\t\t$item->isself = ($this->log_user == $row->created_by)?1:0;\n\t\t\t\t\t\t\t\n\t\t\t\t$result[] = $item;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "function printTable($resultFromSQL, $namesOfColumnsArray)\n{\n echo \"<br>Here is the output, nicely formatted:<br>\";\n echo \"<table>\";\n echo \"<tr>\";\n // iterate through the array and print the string contents\n foreach ($namesOfColumnsArray as $name) {\n echo \"<th>$name</th>\";\n }\n echo \"</tr>\";\n\n while ($row = OCI_Fetch_Array($resultFromSQL, OCI_BOTH)) {\n echo \"<tr>\";\n $string = \"\";\n\n // iterates through the results returned from SQL query and\n // creates the contents of the table\n for ($i = 0; $i < sizeof($namesOfColumnsArray); $i++) {\n $string .= \"<td>\" . $row[\"$i\"] . \"</td>\";\n }\n echo $string;\n echo \"</tr>\";\n }\n echo \"</table>\";\n}", "public function renderTableBody() {\n //$models = array_values($this->dataProvider->getModels());\n //$keys = $this->dataProvider->getKeys();\n $rows = [];\n \n foreach ($this->dataProvider as $model) {\n if (is_callable($this->beforeRow)) {\n $row = call_user_func($this->beforeRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows)) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n } else {\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }\n }", "public function toMessage(): array;", "function format($type, $row) {\n\n $row->RemittanceSequence = $this->transaction->RemittanceSequence;\n $row->CustomerOrgNumber = $this->transaction->CustomerOrgNumber;\n $row->NumTransactions = $this->transaction->NumTransactions;\n $row->TotalAmount = $this->transaction->TotalAmount;\n $row->Database = $this->transaction->Database;\n $row->Date = $this->transaction->Date;\n $row->VersionSoftware = $this->transaction->VersionSoftware;\n\n $this->transaction->RemittanceDaySequence++; #Starts at zero each day\n $this->transaction->NumRecords++; #Starts at zero each file\n \n $row->RemittanceDaySequence = $this->transaction->RemittanceDaySequence;\n $row->NumRecords = $this->transaction->NumRecords;\n\n #$html = \"$type\";\n foreach($this->formatH[$type] as $field => $column) {\n if($field != 'name') {\n #print_r($row);\n #print \"$field - field: \" . $column['field'] . \"<br>\\n\";\n\n $value = '';\n if(isset($column['field']) && $row->{$column['field']}) {\n $value = $row->{$column['field']};\n\n } elseif(isset($column['value']) && strlen($column['value'])) {\n $value = $column['value'];\n\n } else {\n $value = ' ';\n }\n $length = $column['stop'] - $column['start'] + 1;\n if($column['type'] == 'int' || $column['type'] == 'amount') {\n $pad = '0';\n $align = STR_PAD_LEFT;\n } elseif($column['type'] == 'text' || $column['type'] == 'date' || $column['type'] == 'bankaccount' || $column['type'] == 'monthdate') {\n $pad = ' ';\n $align = STR_PAD_RIGHT;\n } else {\n $pad = '*'; #Not defined \n $align = STR_PAD_LEFT;\n }\n $value = $this->{$column['type']}($value);\n $value = substr($value, 0, $length); #husk Œ klippe de totale datene til max lenge\n \n $html .= str_pad($value, $length, $pad, $align);\n #print \"field: $field: length: $length, value: <b>\" . str_pad($value, $length, $pad, $align) . \"</b>, pad: $pad, field: \" . $column['field'] . \", type: \" . $column['type'] . \"<br>\\n\";\n\n }\n }\n $html .= \"\\n\";\n return $html;\n }", "protected function formatColumns()\n {\n $output = '[';\n foreach ($this->incorrect as $column) {\n $output .= $column . ', ';\n }\n\n // Remove last delimiter, and close the bracket.\n $output = substr($output, 0, -2);\n $output .= ']';\n\n return $output;\n }", "public static function getResultInTable($result, $arr, $class=\"\") {\n $counter = 0;\n $arr_len = count($arr);\n \n $out= \"<table class='table table-sm table-hover \".$class.\"'>\";\n\n $out.= \"<thead class='thead-light'><tr>\";\n $out.= \"<th>\" . \"SNO\" . \"</th>\";\n for($i = 0; $i < $arr_len; $i++) {\n $out.= \"<th>\" . $arr[$i] . \"</th>\";\n }\n $out.= \"</tr></thead><tbody>\";\n\n while ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n $counter++;\n $out.= \"<tr>\";\n $out.= \"<td>\" . $counter . \"</td>\";\n for($i = 0; $i < $arr_len; $i++) {\n $out.= \"<td>\" . $row[$arr[$i]] . \"</td>\";\n }\n $out.= \"</tr>\";\n }\n\n $out.= \"</tbody></table>\";\n return array($counter,$out);\n }", "public function getRowsFormatted($input = array(), $data = array())\n\t{\n\t\t$rowsFormated = array();\n\t\t$rowsObj = $this->getRows();\n\t\n\t\n\t\t// Interate through row data and format\n\t\tforeach($rowsObj->rows as $row){\n\t\t\t\n\t\t\t$rowFormatted[] = \"The row \" . $row['some_column_name_here'] . \" is now formatted!\"; \n\t\t\t\n\t\t}\n\t\t\n\t\n // Return a formatted rows object\n $rowsFormattedObj = new stdClass;\n $rowsFormattedObj->rows = $rowsFormatted;\n \n return $rowsFormattedObj;\t\t\n\t\t\n\t}", "public function headerFields($fieldArr, $table, $out = [])\n {\n foreach ($fieldArr as $fieldName) {\n $ll = htmlspecialchars($this->getLanguageService()->sL($GLOBALS['TCA'][$table]['columns'][$fieldName]['label']));\n $out[$fieldName] = $ll ? $ll : '&nbsp;';\n }\n return $out;\n }", "protected function RenderTable()\n {\n if ($this->m_QueryONRender)\n if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule))\n return $this->ProcessDataObjError($ok);\n\n $records = array();\n $records[] = $this->m_RecordRow->RenderColumn();\n $counter = 0;\n while (true) {\n if ($this->m_Range != null && $this->m_Range > 0 && $counter > $this->m_Range)\n break;\n if ($this->CanShowData())\n $arr = $resultRecords[$counter];\n if (!$arr)\n break;\n $this->m_RecordRow->SetRecordArr($arr);\n $tblRow = $this->m_RecordRow->Render();\n $records[] = $tblRow;\n $counter++;\n }\n return $records;\n }", "protected function makeReturnTable()\n\t{\n\t\t$errors = [];\n\t\t$e = $this->lastException;\n\n\t\twhile (!empty($e))\n\t\t{\n\t\t\t$errors[] = $e->getMessage();\n\t\t\t$e = $e->getPrevious();\n\t\t}\n\n\t\treturn [\n\t\t\t'HasRun' => $this->currentState != self::STATE_FINISHED,\n\t\t\t'Domain' => $this->activeDomain,\n\t\t\t'Step' => $this->activeStep,\n\t\t\t'Substep' => $this->activeSubstep,\n\t\t\t'Error' => implode(\"\\n\", $errors),\n\t\t\t'Warnings' => [],\n\t\t\t'ErrorException' => $this->lastException,\n\t\t];\n\t}", "public function render()\r\n {\r\n $widths = $this->calculateWidths();\r\n\r\n $table = $this->renderHeaders($widths);\r\n $table .= $this->renderRows($widths);\r\n\r\n return $table;\r\n }", "public function format(array $record)\n {\n return $record['level_name'] . ': ' . $record['message'] . PHP_EOL;\n }", "function draw_table($rows) {\n \n echo \"<table border=1 cellspacing=1>\"; //Set up border and spacing\n echo \"<tr>\"; //Begin the table row insertion for header row\n \n foreach($rows[0] as $key => $item) {\n \n echo \"<th>$key</th>\";\n \n }\n \n echo \"</tr>\";\n \n // Insert data into each row\n foreach ($rows as $row) {\n \n echo \"<tr>\";\n \n foreach ($row as $key => $item) {\n \n echo \"<td>$item</td>\"; //Table data\n \n }\n \n echo \"</tr>\";\n \n }\n \n echo \"</table>\";\n \n }", "public static function build_table( $db_array ) {\n\n $display = self::formhead();\n \tforeach ( $db_array[0] as $column => $field ) {\n \t\t$display .= \"<th class='cell100 column1'>$column</th>\\n\";\n \t}\n \t$display .= \"</tr></thead></table></div>\\n\";\n $display .= \"<div class='table100-body '><table><tbody>\" ;\n \tforeach ( $db_array as $record ) {\n \t\t$display .= \"<tr class='row100 body'>\\n\";\n \t\tforeach ( $record as $field ) {\n \t\t\t$display .= \"<td class='cell100 column1'>$field</td>\\n\";\n \t\t}\n \t\t$display .= \"</tr>\\n\";\n \t}\n\n \t$display .= \"</tbody></table>\\n\";\n $display .= \"</div></div>\\n\";\n \t\n \treturn $display;\n }", "function MysqlResultsTable ($mysql_results, $table_id='') {\n while ($myrow = mysql_fetch_assoc($mysql_results)) {\n if (! ($headers))\n $headers = array_keys($myrow);\n $rows .= \" <tr>\\n\";\n foreach ($headers as $k)\n $rows .= \" <td class=$k>$myrow[$k]</td>\\n\";\n $rows .= \" </tr>\\n\";\n } // end while myrow\n $header = join(\"</th><th>\",$headers);\n $header = \"<tr><th>$header</th></tr>\\n\";\n if ($table_id != '') { $id = ' id=\"'.$table_id.'\"'; }\n $rows = \"<table$id>$header$rows</table>\\n\";\n return ($rows);\n}", "protected function generateSummaryTable(&$params)\n {\n \t$newFields = array($params[\"grouping_fields\"][0]);\n \t$newHeaders = array($params[\"headers\"][array_search($params[\"grouping_fields\"][0],$params[\"fields\"])]);\n \t$indices = array(array_search($params[\"grouping_fields\"][0],$params[\"fields\"]));\n \t$newParams = array(\"total\"=>array(false), \"type\"=>array(\"string\"));\n \tforeach($params[\"data_params\"]['total'] as $index => $value)\n \t{\n \t\tif($value === true)\n \t\t{\n \t\t\t$tempField = $params[\"fields\"][$index];\n \t\t $newFields[] = $tempField;\n \t\t $newHeaders[] = $params[\"headers\"][array_search($tempField,$params[\"fields\"])];\n \t\t $indices[] = array_search($tempField,$params[\"fields\"]);\n \t\t $newParams[\"total\"][] = true;\n \t\t $newParams[\"type\"][] = $params[\"data_params\"][\"type\"][$index];\n \t\t}\n \t}\n\n \t$filteredData = array();\n \t\n \tforeach($this->reportData as $data)\n \t{\n \t\t$row = array();\n \t\tforeach($indices as $index)\n \t\t{\n \t\t\t$row[] = $data[$index];\n \t\t}\n \t\t$filteredData[] = $row;\n \t}\n \t\n \t$summarizedData = array();\n \t$currentRow = $filteredData[0][0];\n \t\n \tfor($i = 0; $i < count($filteredData); $i++)\n \t{\n \t\t$row = array();\n \t\t$row[0] = $currentRow;\n \t\t$add = false;\n \t\twhile($filteredData[$i][0] == $currentRow)\n \t\t{\n \t\t\tfor($j = 1; $j < count($indices); $j++)\n \t\t\t{\n \t\t\t\t$add = true;\n \t\t\t\t$row[$j] += str_replace(\",\", \"\", $filteredData[$i][$j]);\n \t\t\t}\n \t\t\t$i++;\n \t\t}\n \t\tif($add) $summarizedData[] = $row;\n \t\t$currentRow = $filteredData[$i][0];\n $i--;\n \t}\n $table = new TableContent($newHeaders, $summarizedData, $newParams);\n $table->style[\"autoTotalsBox\"] = true;\n $params[\"report\"]->add($table);\n }", "function print_pure_table($query_result, $headers) {\n echo \"<table class=\\\"pure-table pure-table-bordered\\\">\";\n if ($headers) {\n echo $headers;\n } else {\n echo \"<thead><tr>\";\n for ($i = 0; $i < pg_num_fields($query_result); $i++) {\n $fieldname = pg_field_name($query_result, $i);\n echo \"<th>$fieldname</th>\";\n }\n echo \"</tr></thead>\";\n }\n \n echo \"<tbody>\";\n while ($row = pg_fetch_row($query_result)) {\n echo \"<tr>\";\n $num = pg_num_fields($query_result);\n for ($i = 0; $i < $num; $i++) {\n echo \"<td>$row[$i]</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</tbody>\";\n echo \"</table>\";\n }", "function _formatMessage($message, $level)\n {\n return sprintf(\"\\r\\n<tr align=\\\"center\\\"><td>%s</td><td>%s</td><td>%s</td></tr>\",\n $this->getTime(),\n $this->levelToString($level),\n nl2br(htmlspecialchars($message)).'<br />');\n }", "function arrayMessage($array){\n $l = \"[\";\n $x = 0;\n while($x < count($array)){\n $l = $l.$array[$x];\n $x++;\n if($x != count($array)){\n $l = $l.\",\";\n }\n }\n $l = $l.\"]\";\n \n $messArray = array('message'=>$l,'mess_type'=>'user_array');\n $json = json_encode($messArray);\n return $json;\n }", "public function toFormattedArray() {\r\n $tmp = array();\r\n foreach($this->headers as $key => $val){\r\n $tmp[] = $key . ': ' . $val;\r\n }\r\n return $tmp;\r\n }", "public function verticalTable($in){\n $out = '';\n foreach($in as $k => $v){\n $out .= '<tr><td style=\"text-align: left;\">'.$k.'</td><td style=\"text-align: left\">'.$v.'</td></tr>';\n }\n return($out);\n }", "function make_table($table) {\n return print_table($table, true);\n}" ]
[ "0.65297276", "0.6490941", "0.6431996", "0.6400672", "0.63214374", "0.6296211", "0.6182101", "0.616411", "0.61099964", "0.60706335", "0.6067402", "0.6014219", "0.59505486", "0.5937535", "0.59347945", "0.5933795", "0.59226716", "0.5920495", "0.5916568", "0.59145445", "0.59125537", "0.5909196", "0.59020346", "0.590115", "0.5887923", "0.5887923", "0.5858478", "0.585683", "0.58557427", "0.58545595", "0.5850727", "0.5846256", "0.58389574", "0.58239114", "0.58180493", "0.5816085", "0.5801903", "0.5792033", "0.57734823", "0.5743063", "0.57259053", "0.572188", "0.5707832", "0.5697299", "0.5695625", "0.5686638", "0.5685147", "0.56786203", "0.5672181", "0.5668143", "0.56677634", "0.5664929", "0.56630343", "0.5661998", "0.56539756", "0.5629963", "0.5619874", "0.5601308", "0.5594404", "0.5557969", "0.55517685", "0.55391634", "0.5535988", "0.5529298", "0.5527061", "0.5520996", "0.5518795", "0.5518795", "0.5518795", "0.5507705", "0.5505927", "0.5502385", "0.5500021", "0.5488492", "0.54856926", "0.54834825", "0.5479815", "0.5478374", "0.5469569", "0.5469369", "0.5465885", "0.54595643", "0.54492307", "0.5443373", "0.5440979", "0.5440789", "0.5433686", "0.5428814", "0.5423371", "0.542114", "0.5417486", "0.5415927", "0.54120463", "0.54067826", "0.5401333", "0.53951436", "0.5390158", "0.5388687", "0.53685164", "0.5362143" ]
0.6824569
0
Format template information as table
function _notifications_content_test_format_template($parts) { $rows = array(); $header = array('msgkey' => t('Key'), 'type' => t('Template'), 'method' => t('Method'), 'message' => t('Text'), 'language' => t('Language'), 'format' => t('Format')); foreach ($parts as $key => $value) { $row = array(); foreach (array_keys($header) as $field) { $row[] = isset($value->$field) ? check_plain($value->$field) : ''; } $rows[] = $row; } return theme('table', array('header' => $header, 'rows' =>$rows)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function set_template() {\n\t\t$table_open = $this->check_template(@$this->template->table_open, '<table border=\"1\">');\n\t\t$table_close = $this->check_template(@$this->template->table_close, '</table>');\n\t\t$thead_open = $this->check_template(@$this->template->thead_open, '<thead>');\n\t\t$thead_close = $this->check_template(@$this->template->thead_close, '</thead>');\n\t\t$tbody_open = $this->check_template(@$this->template->tbody_open, '<tbody>');\n\t\t$tbody_close = $this->check_template(@$this->template->tbody_close, '</tbody>');\n\t\t$tfoot_open = $this->check_template(@$this->template->tfoot_open, '<tfoot>');\n\t\t$tfoot_close = $this->check_template(@$this->template->tfoot_close, '</tfoot>');\n\t\t$tr_open = $this->check_template(@$this->template->tr_open, '<tr>');\n\t\t$tr_close = $this->check_template(@$this->template->tr_close, '</tr>');\n\n\t\t$table_structure = array(\n\t\t\t'table_open'=>$table_open,\n\t\t\t'table_close'=>$table_close,\n\t\t\t'thead_open'=>$thead_open,\n\t\t\t'thead_close'=>$thead_close,\n\t\t\t'tbody_open'=>$tbody_open,\n\t\t\t'tbody_close'=>$tbody_close,\n\t\t\t'tfoot_open'=>$tfoot_open,\n\t\t\t'tfoot_close'=>$tfoot_close,\n\t\t\t'tr_open'=>$tr_open,\n\t\t\t'tr_close'=>$tr_close\n\t\t);\n\t\t$table_structure = json_encode($table_structure);\n\t\t$table_structure = json_decode($table_structure);\n\n\t\treturn $table_structure;\n\t}", "public static function buildTemplateTable()\r\n\t{\r\n\t\tglobal $lang;\r\n\t\t// Check if we're on the setup page in the Control Center\r\n\t\t$isSetupPage = (PAGE == self::CC_TEMPLATE_PAGE);\r\n\t\t// Store template projects in array\r\n\t\t$templateList = self::getTemplateList();\r\n\t\t// Initialize varrs\r\n\t\t$row_data = array();\r\n\t\t$headers = array();\r\n\t\t$i = 0;\r\n\t\t$textLengthTruncate = 230;\r\n\t\t// Loop through array of templates\r\n\t\tforeach ($templateList as $this_pid=>$attr)\r\n\t\t{\r\n\t\t\t// If not enabled yet, then do not display on Create Project page\r\n\t\t\tif (!$isSetupPage && !$attr['enabled']) continue;\t\t\r\n\t\t\t// If description is very long, truncate what is visible initially and add link to view entire text\r\n\t\t\tif (strlen($attr['description']) > $textLengthTruncate) {\r\n\t\t\t\t$textCutoffPosition = strrpos(substr($attr['description'], 0, $textLengthTruncate), \" \");\r\n\t\t\t\tif ($textCutoffPosition === false) $textCutoffPosition = $textLengthTruncate;\r\n\t\t\t\t$descr1 = substr($attr['description'], 0, $textCutoffPosition);\r\n\t\t\t\t$descr2 = substr($attr['description'], $textCutoffPosition);\r\n\t\t\t\t$attr['description'] = $descr1 . RCView::span('', \"... \") . \r\n\t\t\t\t\t\t\t\t\t\tRCView::a(array('href'=>'javascript:;','style'=>'text-decoration:underline;font-size:10px;','onclick'=>\"$(this).prev('span').hide();$(this).hide().next('span').show();\"), \r\n\t\t\t\t\t\t\t\t\t\t\t$lang['create_project_94']\r\n\t\t\t\t\t\t\t\t\t\t) .\r\n\t\t\t\t\t\t\t\t\t\tRCView::span(array('style'=>'display:none;'), $descr2);\r\n\t\t\t}\r\n\t\t\t// Set radio button (create project page) OR edit/delete icons (control center)\r\n\t\t\tif ($isSetupPage) {\r\n\t\t\t\t$actionItem = \tRCView::a(array('href'=>'javascript:;','onclick'=>\"projectTemplateAction('prompt_addedit',$this_pid);\"), \r\n\t\t\t\t\t\t\t\t\tRCView::img(array('src'=>'pencil.png','title'=>$lang['create_project_90']))\r\n\t\t\t\t\t\t\t\t) .\r\n\t\t\t\t\t\t\t\tRCView::a(array('style'=>'margin-left:3px;','href'=>'javascript:;','onclick'=>\"projectTemplateAction('prompt_delete',$this_pid);\"), \r\n\t\t\t\t\t\t\t\t\tRCView::img(array('src'=>'cross.png','title'=>$lang['create_project_93']))\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\t$actionItem = RCView::radio(array('name'=>'copyof','value'=>$this_pid));\r\n\t\t\t}\r\n\t\t\t// Add this project as a row\r\n\t\t\t$row_data[$i][] = $actionItem;\r\n\t\t\tif ($isSetupPage) {\r\n\t\t\t\t$row_data[$i][] = RCView::a(array('href'=>'javascript:;','onclick'=>\"projectTemplateAction('prompt_addedit',$this_pid);\"), \r\n\t\t\t\t\t\t\t\t\tRCView::img(array('src'=>($attr['enabled'] ? 'star.png' : 'star_empty.png'),'title'=>$lang['create_project_90']))\r\n\t\t\t\t\t\t\t\t );\r\n\t\t\t}\r\n\t\t\t$row_data[$i][] = RCView::div(array('style'=>'color:#800000;padding:0;white-space:normal;word-wrap:normal;line-height:12px;'), $attr['title']);\r\n\t\t\t$row_data[$i][] = RCView::div(array('style'=>'padding:0;white-space:normal;word-wrap:normal;line-height:12px;'), $attr['description']);\r\n\t\t\t// Increment counter\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t// If no templates exist, then give message \r\n\t\tif (empty($row_data))\r\n\t\t{\r\n\t\t\t$row_data[$i][] = \"\";\r\n\t\t\tif ($isSetupPage) $row_data[$i][] = \"\";\r\n\t\t\t$row_data[$i][] = RCView::div(array('style'=>'padding:0;white-space:normal;word-wrap:normal;'), $lang['create_project_77']);\r\n\t\t\t$row_data[$i][] = \"\";\r\n\t\t}\r\n\t\t// \"Add templates\" button\r\n\t\t$addTemplatesBtn = ((SUPER_USER && !$isSetupPage)\r\n\t\t\t\t\t\t\t? \t// Create New Project page\r\n\t\t\t\t\t\t\t\tRCView::div(array('style'=>'float:right;padding:5px 0 0;'),\r\n\t\t\t\t\t\t\t\t\tRCView::button(array('class'=>'jqbuttonsm','style'=>'color:green;','onclick'=>\"window.location.href=app_path_webroot+'\".self::CC_TEMPLATE_PAGE.\"';return false;\"), \r\n\t\t\t\t\t\t\t\t\t\tRCView::img(array('src'=>'plus_small2.png')) . $lang['create_project_78']\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t: \r\n\t\t\t\t\t\t\t\t(!$isSetupPage ? \"\" : \r\n\t\t\t\t\t\t\t\t\t// Control Center\r\n\t\t\t\t\t\t\t\t\tRCView::div(array('style'=>'float:right;padding:0 200px 5px 0;'),\r\n\t\t\t\t\t\t\t\t\t\tRCView::button(array('class'=>'jqbuttonmed','style'=>'color:green;','onclick'=>\"projectTemplateAction('prompt_addedit')\"), \r\n\t\t\t\t\t\t\t\t\t\t\tRCView::img(array('src'=>'add.png','style'=>'vertical-align:middle')) . \r\n\t\t\t\t\t\t\t\t\t\t\tRCView::span(array('style'=>'vertical-align:middle'), $lang['create_project_83'])\r\n\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t);\r\n\t\t// Width & height\r\n\t\t$width = 720;\r\n\t\t$height = ($isSetupPage) ? 500 : 200;\r\n\t\t// Set table headers and attributes\r\n\t\t// First column (radios or edit/delete icons)\r\n\t\t$headers[] = array(42, ($isSetupPage ? \"\" : RCView::div(array('style'=>'font-size:10px;padding:0;white-space:normal;word-wrap:normal;color:#777777;font-family:tahoma;line-height:10px;'), $lang['create_project_74'])), \"center\");\r\n\t\tif ($isSetupPage) {\r\n\t\t\t// Column for Enabled stars\r\n\t\t\t$headers[] = array(43, $lang['create_project_104'], 'center');\r\n\t\t}\r\n\t\t// Title column\r\n\t\t$headers[] = array(163, RCView::b($lang['create_project_73']) . RCView::SP . RCView::SP . RCView::SP . $lang['create_project_103']);\r\n\t\t// Discription column\r\n\t\t$headers[] = array(461 - ($isSetupPage ? 55 : 0), RCView::b($lang['create_project_69']));\r\n\t\t// Title\r\n\t\t$title = RCView::div(array('style'=>'float:left;padding:1px 0 12px 5px;font-weight:bold;'),\r\n\t\t\t\t\tRCView::span(array('style'=>'font-size:12px;color:#800000;'), \r\n\t\t\t\t\t\t($isSetupPage ? $lang['create_project_81'] : RCView::img(array('src'=>'star.png','class'=>'imgfix')) . $lang['create_project_66'])\r\n\t\t\t\t\t) . \r\n\t\t\t\t\t($isSetupPage ? '' : RCView::span(array('style'=>'font-weight:normal;margin-left:10px;'), $lang['create_project_65']))\r\n\t\t\t\t ) . \r\n\t\t\t\t $addTemplatesBtn;\r\n\t\t// Render table and return its html\r\n\t\treturn renderGrid(\"template_projects_list\", $title, $width, $height, $headers, $row_data, true, true, false);\r\n\t}", "function listTemplate($headers)\n\t{\n\t\t$template = array(\n\t\t\t'table' => array(\n\t\t\t\t'\n\t<table>',\n\t\t\t\t'\n\t</table>'\n\t\t\t),\n\t\t\t'defRow' => array(\n\t\t\t\t'tr' => array(\n\t\t\t\t\t'\n\t\t<tr>',\n\t\t\t\t\t'\n\t\t</tr>'\n\t\t\t\t),\n\t\t\t\t'defCol' => array(\n\t\t\t\t\t'\n\t\t\t<td>\n\t\t\t\t',\n\t\t\t\t\t'\n\t\t\t</td>'\n\t\t\t\t)\n\t\t\t),\n\t\t\t0 => array(\n\t\t\t\t'defCol' => array(\n\t\t\t\t\t'\n\t\t\t<th>\n\t\t\t\t',\n\t\t\t\t\t'\n\t\t\t</th>'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\tforeach($headers as $index => $name)\n\t\t{\n\t\t\t$template[0][$index] = array(\n\t\t\t\t'\n\t\t\t<th id=\"table_' . $name . '\">\n\t\t\t\t',\n\t\t\t\t'\n\t\t\t</th>'\n\t\t\t);\n\t\t\t$template['defRow'][$index] = array(\n\t\t\t\t'\n\t\t\t<td headers=\"table_' . $name . '\">\n\t\t\t\t',\n\t\t\t\t'\n\t\t\t</td>'\n\t\t\t);\n\t\t}\n\t\treturn $template;\n\t}", "public function get_cell_info($template) {\n $template['icon-css'] = 'icon-views ont-color-orange ont-icon-22';\n\t\t$template['preview-image-url'] = WPDDL_RES_RELPATH . '/images/post-content.png';\n\t\t$template['name'] = __('Content Template (custom fields, taxonomy and content)', 'ddl-layouts');\n\t\t$template['description'] = __('Display different fields of any page, post or custom type. This cell supports HTML for styling and shortcodes for the different fields.', 'ddl-layouts');\n\t\t$template['button-text'] = __('Assign Content Template Box', 'ddl-layouts');\n\t\t$template['dialog-title-create'] = __('Create a new Content Template Cell', 'ddl-layouts');\n\t\t$template['dialog-title-edit'] = __('Edit Content Template Cell', 'ddl-layouts');\n\t\t$template['dialog-template'] = $this->_dialog_template();\n\t\t$template['category'] = __('Post display', 'ddl-layouts');\n\t\treturn $template;\n\t}", "function outputFormat(array $headers, array $cells, $result, $content_name) {\necho '<h3>'.ucfirst($content_name).' Content</h3>';\necho '<table>';\nforeach ($headers as $val) {\necho '<th>'.$val.'</th>';\n}\nwhile($row = mysqli_fetch_array($result))\n {\n echo '<tr>';\n foreach ($cells as $val) {\n echo '<td>'.$row[$val].'</td>';\n }\n echo '</tr>';\n }\n echo '</table>';\n}", "function renderTableTemplate()\n {\n\n global $wpdb;\n\n $query = \"SELECT * FROM \" . $wpdb->prefix . \"posts WHERE post_type='flamingo_inbound' and post_title LIKE '%-%-%'\";\n\n $data = $wpdb->get_results($query);\n\n // Header frame.\n echo '\n\t\t\t<div class=\"limiter\">\n\t\t\t\t<div class=\"container-table100\">\n\t\t\t\t\t<div class=\"wrap-table100\">\n\t\t\t\t\t\t<div class=\"table100\">\n\t\t\t\t\t\t\t<table class=\"birthday-table\">\n\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t<tr class=\"table100-head\">\n\t\t\t\t\t\t\t\t\t\t<th class=\"column1\">Username</th>\n\t\t\t\t\t\t\t\t\t\t<th class=\"column2\">Birthday Date</th>\n\t\t\t\t\t\t\t\t\t\t<th class=\"column3\">Age</th>\n\t\t\t\t\t\t\t\t\t\t<th class=\"column3\">Days to birthdate</th>\n\t\t\t\t\t\t\t\t\t\t<th class=\"column3\">Contact</th>\n\t\t\t\t\t\t\t\t\t\t<th class=\"column4\">Joined at</th>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t<tbody class=\"birthday-table-body\">';\n\n // Join together all query's data into an array of multiples arrays for each customer.\n $data_array = parseUsersInfo($data);\n\n $users_data_array = addAgeAndDaysToBirthdate($data_array);\n\n // Sort the multidimensional array.\n usort($users_data_array, 'compareDates');\n\n foreach ($users_data_array as &$users_info) {\n renderTableData($users_info);\n }\n\n // Footer frame.\n echo '\n \t\t\t\t\t\t</tbody>\n \t\t\t\t\t</table>\n \t\t\t\t</div>\n \t\t\t</div>\n \t\t</div>\n \t</div>';\n }", "function formatTags($leadTemplate,$tabMode=\"_self\") {\n\tglobal $communityPaths;\n\n\t$file = readJsonFile($communityPaths['community-templates-info']);\n\t$template = $file[$leadTemplate];\n\t$childTemplates = $file[$leadTemplate]['BranchID'];\n\tif ( ! is_array($childTemplates) )\n\t\t$o = \"Something really went wrong here\";\n\telse {\n\t\t$defaultTag = $template['BranchDefault'] ? $template['BranchDefault'] : \"latest\";\n\t\t$o = \"<table>\";\n\t\t$o .= \"<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><a href='/Apps/AddContainer?xmlTemplate=default:\".$template['Path'].\"' target='$tabMode'>Default</a></td><td>Install Using The Template's Default Tag (<font color='purple'>:$defaultTag</font>)</td></tr>\";\n\t\tforeach ($childTemplates as $child) {\n\t\t\t$o .= \"<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><a href='/Apps/AddContainer?xmlTemplate=default:\".$file[$child]['Path'].\"' target='$tabMode'>\".$file[$child]['BranchName'].\"</a></td><td>\".$file[$child]['BranchDescription'].\"</td></tr>\";\n\t\t}\n\t\t$o .= \"</table>\";\n\t}\n\treturn $o;\n}", "public function print_template()\n {\n }", "public function print_template()\n {\n }", "function tableTemplate($results, $headers){\n ?>\n <div class= \"row justify-content-center\">\n <table class=\"table\">\n <thead>\n <tr>\n <?php\n $i = 0;\n while($i<sizeof($headers)){\n echo \"<th>$headers[$i]</th>\";\n $i = $i+1;\n }\n echo \"<th>Action</th>\"\n ?>\n </tr>\n </thead>\n <?php\n while ($row = mysqli_fetch_assoc($results)):\n echo \"<tr>\";\n $i = 0;\n while($i<sizeof($headers)){\n $temp = $row[$headers[$i]];\n echo \"<td>$temp</td>\";\n $i = $i+1;\n }?>\n <td>\n <a href=\"edit_template.php?edit=<?php echo $row['Player_ID'] ?>&table=<?php echo $_GET['del'] ?>\"\n class=\"btn btn-info\">EDIT</a>\n\n <a href=\"process.php?delete=<?php echo $row['Player_ID'] ?>&table=<?php echo $_GET['del'] ?>\"\n class=\"btn btn-danger\">DELETE</a>\n\n\n </td>\n </tr>\n <?php endwhile; ?>\n </table>\n </div>\n <?php\n }", "public function template();", "public final function print_template()\n {\n }", "public function print_templates()\n {\n }", "protected function parseTHs(XTemplate $xtpl){\n\t\n\t\t$ths = $this->tableModel->getEncabezados();\n\t\t$count = count($ths);\n\t\tfor($index=0;$index<$count;$index++) {\n\t\t\t$encabezado = $ths[$index]['encabezado'];\n\t\t\t//$width = $this->tableModel->getColumnWidth($index)*10;\n\t\t\t$this->parseTH( $xtpl, $encabezado);\n\t\t}\n\t\t\n\t}", "function as_table() \n {\n #$str = \"<table> \\n\";\n $str = \"\";\n foreach(get_object_vars($this) as $name => $obj) \n {\n if ($obj != NULL) \n {\n $str .= \"<tr>\\n\\t<td>\".$obj->label().\"</td>\\n\\t\";\n $str .= \"<td>\".$obj.\"</td>\\n</tr>\\n\";\n }\n }\n #$str .= \"</table>\\n\";\n return $str;\n }", "public function display_usertemplates_table() {\n global $CFG, $USER, $OUTPUT;\n\n require_once($CFG->libdir.'/tablelib.php');\n\n $candownloadutemplates = has_capability('mod/surveypro:downloadusertemplates', $this->context);\n $candeleteutemplates = has_capability('mod/surveypro:deleteusertemplates', $this->context);\n\n // Begin of: $paramurlbase definition.\n $paramurlbase = array();\n $paramurlbase['id'] = $this->cm->id;\n // End of $paramurlbase definition.\n\n $deletetitle = get_string('delete');\n $iconparams = ['title' => $deletetitle];\n $deleteicn = new \\pix_icon('t/delete', $deletetitle, 'moodle', $iconparams);\n\n $importtitle = get_string('exporttemplate', 'mod_surveypro');\n $iconparams = ['title' => $importtitle];\n $importicn = new \\pix_icon('t/download', $importtitle, 'moodle', $iconparams);\n\n $table = new \\flexible_table('templatelist');\n\n $paramurl = ['id' => $this->cm->id];\n $baseurl = new \\moodle_url('/mod/surveypro/utemplate_manage.php', $paramurl);\n $table->define_baseurl($baseurl);\n\n $tablecolumns = array();\n $tablecolumns[] = 'templatename';\n $tablecolumns[] = 'sharinglevel';\n $tablecolumns[] = 'timecreated';\n $tablecolumns[] = 'actions';\n $table->define_columns($tablecolumns);\n\n $tableheaders = array();\n $tableheaders[] = get_string('templatename', 'mod_surveypro');\n $tableheaders[] = get_string('sharinglevel', 'mod_surveypro');\n $tableheaders[] = get_string('timecreated', 'mod_surveypro');\n $tableheaders[] = get_string('actions');\n $table->define_headers($tableheaders);\n\n $table->sortable(true, 'templatename'); // Sorted by templatename by default.\n $table->no_sorting('actions');\n\n $table->column_class('templatename', 'templatename');\n $table->column_class('sharinglevel', 'sharinglevel');\n $table->column_class('timecreated', 'timecreated');\n $table->column_class('actions', 'actions');\n\n $table->set_attribute('id', 'managetemplates');\n $table->set_attribute('class', 'generaltable');\n $table->setup();\n\n $options = $this->get_sharinglevel_options();\n\n $templates = new \\stdClass();\n foreach ($options as $sharinglevel => $unused) {\n $parts = explode('_', $sharinglevel);\n $contextlevel = $parts[0];\n\n $contextid = $this->get_contextid_from_sharinglevel($sharinglevel);\n $contextstring = $this->get_contextstring_from_sharinglevel($contextlevel);\n $templates->{$contextstring} = $this->get_available_templates($contextid);\n }\n\n $virtualtable = $this->get_virtual_table($templates, $table->get_sql_sort());\n\n $row = 0;\n foreach ($templates as $contextstring => $contextfiles) {\n foreach ($contextfiles as $xmlfile) {\n $tablerow = array();\n\n $xmlfileid = $virtualtable[$row]['xmlfileid'];\n $templatename = $virtualtable[$row]['templatename'];\n $tmpl = new usertemplate_name($xmlfileid, $templatename);\n\n $tablerow[] = $OUTPUT->render_from_template('core/inplace_editable', $tmpl->export_for_template($OUTPUT));\n $tablerow[] = $virtualtable[$row]['sharinglevel'];\n $tablerow[] = userdate($virtualtable[$row]['creationdate']);\n\n $paramurlbase['fid'] = $virtualtable[$row]['xmlfileid'];\n $row++;\n\n $icons = '';\n // SURVEYPRO_DELETEUTEMPLATE.\n if ($candeleteutemplates) {\n if ($xmlfile->get_userid() == $USER->id) { // Only the owner can delete his/her template.\n $paramurl = $paramurlbase;\n $paramurl['act'] = SURVEYPRO_DELETEUTEMPLATE;\n $paramurl['sesskey'] = sesskey();\n\n $link = new \\moodle_url('/mod/surveypro/utemplate_manage.php', $paramurl);\n $icons .= $OUTPUT->action_icon($link, $deleteicn, null, ['title' => $deletetitle]);\n }\n }\n\n // SURVEYPRO_EXPORTUTEMPLATE.\n if ($candownloadutemplates) {\n $paramurl = $paramurlbase;\n $paramurl['act'] = SURVEYPRO_EXPORTUTEMPLATE;\n $paramurl['sesskey'] = sesskey();\n\n $link = new \\moodle_url('/mod/surveypro/utemplate_manage.php', $paramurl);\n $icons .= $OUTPUT->action_icon($link, $importicn, null, ['title' => $importtitle]);\n }\n\n $tablerow[] = $icons;\n\n $table->add_data($tablerow);\n }\n }\n $table->set_attribute('align', 'center');\n $table->summary = get_string('templatelist', 'mod_surveypro');\n $table->print_html();\n }", "function table_specific_links($table, $template = ''){\n\t\tif(isset($box->template)){\n\t\t\tswitch ($box->template){\n\t\t\t\tcase \"Annotation_Headings\":\n\t\n\t\t\t\t\t// IEA rows\n\t\t\t\t\t$rows = array();\n\t\t\t\t\t$tmp = explode(\"\\n|-\",$table);\n\t\t\t\t\tforeach ($tmp as $row){\n\t\t\t\t\t\tif (strpos($row,\"\\nIEA:\") > 0) $row = \"style='background:#ddffdd;' \".$row;\n\t\t\t\t\t\t$rows[] = $row;\n\t\t\t\t\t}\n\t\t\t\t\t$table = implode(\"\\n|-\",$rows);\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t} # end switch\t\n\t\t}\n\t\treturn $table;\n\t}", "function template_manual()\n{\n\tglobal $context, $scripturl, $txt;\n\n\techo '<table width=\"100%\" height=\"50%\" bgcolor=\"#FFCC99\"><tr><td><b><center>', $context['viber_id'], '</center></b></td></tr></table>';\n}", "function ReplaceContent( $data, $template_html )\n{\n foreach ( $data as $row )\n {\n //replace fields with values in template\n $content = $template_html;\n foreach($row as $field => $value)\n {\n $content = str_replace(\"@@$field@@\", $value, $content);\n\n }\n\n print $content;\n }\n}", "protected function make_table_list($items_table=null, $items_list=null, $template_table=null, $template_list=null) {\n\t $toprint = null;\n\t\t$mytemplate_table = $this->select_template($template_table);\n\t\t$mytemplate_list = $this->select_template($template_list);\n\t\t$mytemplate_tablelist = $this->select_template('fpkatalog-grid-list');\n\t\t$tokens = array();\n\t\t\n if ($mytemplate_tablelist) { \n\t\t\n\t\t\t$table_token[] = (!empty($items_table)) ? implode('',$items_table) : null; \n\t\t\t//echo $table_token[0];\n\t\t\t$tokens[] = $this->combine_tokens($mytemplate_table, $table_token);\n\n\t\t\t$list_token[] = (!empty($items_list)) ? implode('',$items_list) : null; \n\t\t\t//echo $list_token[0];\n\t\t\t$tokens[] = $this->combine_tokens($mytemplate_list, $list_token);\n //print_r($tokens);\n\t\t\t$toprint = $this->combine_tokens($mytemplate_tablelist, $tokens);\n\t\t\t//echo $toprint;\n\t\t\tunset ($tokens);\n\t\t\tunset ($table_token);\n\t\t\tunset ($list_token);\n\t\t}\t\n return ($toprint); \t\t\n }", "private function render_data()\n\t{\n\t\t// create if the headers exists\n\t\t// 2 header style table\n\t\tif(count($this->headers) == 2 && isset($this->headers[0][0]) && isset($this->headers[1][0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr><th></th>';\n\t\t\tforeach($this->headers[0] as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the row headers and the data\n\t\t\tfor($i=0; $i<count($this->headers[1]); $i++)\n\t\t\t{\n\t\t\t\t// the header\n\t\t\t\t$html .= \"<tr><th>{$this->headers[1][$i]}</th>\";\n\t\t\t\t\n\t\t\t\t// and now the data\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\t// 1 header style table\n\t\tif(count($this->headers) > 0 && isset($this->headers[0]) && !is_array($this->headers[0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr>';\n\t\t\tforeach($this->headers as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the data\n\t\t\tfor($i=0; $i<count($this->data); $i++)\n\t\t\t{\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\treturn '';\n\t}", "function table($text) {\n\t\t$output = \"\";\n\t\tif (!empty($text)) {\n\t\t\t$output .= '<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"100%\">';\n\t\t\t$array = explode(\"\\n\", $text);\n\t\t\tfor ($i=0; $i<count($array); $i++) {\n\t\t\t\tif (!empty($array[$i])) {\n\t\t\t\t\t$row = explode(\":\", $array[$i], 2);\n\t\t\t\t\t$title = isset($row[0]) ? $row[0] : '';\n\t\t\t\t\t$data = isset($row[1]) ? $row[1] : '';\n\t\t\t\t\tif ($i%2 == 0) {\n\t\t\t\t\t\t$output .= '<tr class=\"row_ab_a\"><td class=\"form_title\" width=\"30%\">'.$title.'</td><td bgcolor=\"#EBF1F6\" width=\"70%\">'.$data.'</td></tr>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$output .= '<tr class=\"row_ab_b\"><td class=\"form_title\">'.$title.'</td><td bgcolor=\"#FFFFFF\">'.$data.'</td></tr>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$output .= '</table>';\n\t\t}\n\n\t\treturn $output;\n\t}", "public function formatForeach(){\r\n\t\tforeach($this->template as $k=>$v){\r\n\t\t\tif(preg_match('/{\\s+foreach \\$(\\w+)}/', $v, $matches)){\r\n\t\t\t\t$this->foreach_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Foreach format error: The blank is not allowed with \\'{\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{foreach \\$(\\w+)\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->foreach_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Foreach format error: The blank is not allowed with \\'}\\' near '.$matches[2].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{\\s+@key}/', $v, $matches)){\r\n\t\t\t\t$this->foreach_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Foreach @key format error: The blank is not allowed with \\'{\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{@key\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->foreach_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Foreach @key format error: The blank is not allowed with \\'}\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{\\s+@value}/', $v, $matches)){\r\n\t\t\t\t$this->foreach_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Foreach @value format error: The blank is not allowed with \\'{\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{@value\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->foreach_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Foreach @value format error: The blank is not allowed with \\'}\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{foreach \\$(\\w+)}/', $v, $matches)){\r\n\t\t\t\tif(!preg_match('/{\\/foreach}/', implode('\\n', $this->template))){\r\n\t\t\t\t\t$this->foreach_lines = ($k+1);\r\n\t\t\t\t\t$this->error_notice[($k+1)] = 'Foreach format error: The foreach tag is not close near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function parseTable(&$template, $matches)\n {\n $tables = [];\n for ($i = 0; $i < count($matches[1]); $i ++) {\n $match = $matches[0][$i];\n $tag = $this->clean($matches[1][$i]);\n if ('TBL:' == substr($tag, 0, 4)) {\n $tags = explode(':', $tag, 3);\n $tables[$tags[1]] = [\n 'start' => $match,\n 'end' => null,\n 'expr' => $tags[2],\n 'content' => null\n ];\n }\n if ('TBLE:' == substr($tag, 0, 5)) {\n $tags = explode(':', $tag, 2);\n if (isset($tables[$tags[1]])) {\n $tables[$tags[1]]['end'] = $match;\n }\n }\n }\n $keys = array_keys($tables);\n for ($i = 0; $i < count($keys); $i ++) {\n if ($tables[$keys[$i]]['start'] && $tables[$keys[$i]]['end']) {\n // find table row begin \\trowd\n if (false !== ($s = strpos($template, $tables[$keys[$i]]['start']))) {\n $s = strrpos(substr($template, 0, $s - 1), '\\trowd ');\n }\n // find table row end \\row followed by \\pard\n if (false !== ($e = strpos($template, $tables[$keys[$i]]['end']))) {\n if (false !== ($e = strpos($template, '\\row ', $e))) {\n $e = strpos($template, '\\pard ', $e);\n }\n }\n if (is_int($s) && is_int($e)) {\n $header = substr($template, 0, $s);\n $content = substr($template, $s, $e - $s);\n $footer = substr($template, $e);\n $content = strtr($content, [\n $tables[$keys[$i]]['start'] => '',\n $tables[$keys[$i]]['end'] => ''\n ]);\n $tables[$keys[$i]]['content'] = $content;\n $template = $header.'%%TBL:'.$keys[$i].'%%'.$footer;\n }\n }\n }\n return $tables;\n }", "function getTemplateData()\n\t{\n\t\t $sql=\"select templateid,templatename,gridcount from tb_template where status=1\";\n\t\t $res = mysql_query($sql);\n\t\t /** TEMPLATE COUNT **/\n\t\t $tempcount = mysql_num_rows($res);\n\t\t \n\t\t for($i=1;$i<=$tempcount;$i++)\n\t\t {\n\t\t $rows= mysql_fetch_assoc($res);\n\t\t /** TEMPLATE IDS **/\n\t\t $tempids[$i]=$rows['templateid'];\n\t\t /* TEMPLATE NAMES **/\n\t\t $tempnames[$i]=$rows['templatename'];\n\t\t /** RELATED GRID COUNT **/\n\t\t $gridcnt[$i]=$rows['gridcount']; \n\t\t \n\t\t }\n\t\t \n\t\t \n\t\t $returnstr=\"\";\n\t\t for($j=1;$j<= $tempcount;$j++)\n\t\t { \n\t\t $temp1[$j]= $tempids[$j].\",\".$tempnames[$j].\",\".$gridcnt[$j].\"#\";\n\t\t \t\n\t\t $sql2=\"select * from tb_grids where status=1 and templateid=\".$tempids[$j];// and gridId=\".$grid;\n\t\t\t\n\t\t $res2 = mysql_query($sql2);\n\t\t\t\n\t\t\t$temp2=\"\";\n\n\t\t \tfor($k=1;$k<=$gridcnt[$j];$k++)\n\t\t\t{\n\n\t\t \t$rows2 = mysql_fetch_assoc($res2);\n\t\t\t\t\t\n\t\t\t\t$temp2 = $temp2.$rows2['row'].\",\".$rows2['column'].\",\".$rows2['width'].\",\".$rows2['height'].\"#\";\n\t\t\t\t\t\n\t\t\t}\n\t\t $returnstr = $returnstr.$temp1[$j].$temp2.\":\";\n\t\t }\n\n\t\t return $returnstr;\n\t}", "public function templateData() {\n return array();\n }", "public static function nodeTableTemplate()\n\t{\n\t\treturn array( \\IPS\\Theme::i()->getTemplate( 'tables', 'core' ), 'nodeRows' );\n\t}", "public function render()\n {\n $chromosome = explode(\",\", $this->timetable->chromosome);\n $scheme = explode(\",\", $this->timetable->scheme);\n $data = $this->generateData($chromosome, $scheme);\n\n $days = $this->timetable->days()->orderBy('id', 'ASC')->get();\n $timeslots = TimeslotModel::orderBy('rank', 'ASC')->get();\n $classes = CollegeClassModel::all();\n\n $tableTemplate = '<h3 class=\"text-center\">{TITLE}</h3>\n <div style=\"page-break-after: always\">\n <table class=\"table table-bordered\">\n <thead>\n {HEADING}\n </thead>\n <tbody>\n {BODY}\n </tbody>\n </table>\n </div>';\n\n $content = \"\";\n\n foreach ($classes as $class) {\n $header = \"<tr class='table-head'>\";\n $header .= \"<td>Days</td>\";\n\n foreach ($timeslots as $timeslot) {\n $header .= \"\\t<td>\" . $timeslot->time . \"</td>\";\n }\n\n $header .= \"</tr>\";\n\n $body = \"\";\n\n foreach ($days as $day) {\n $body .= \"<tr><td>\" . strtoupper($day->short_name) . \"</td>\";\n foreach ($timeslots as $timeslot) {\n if (isset($data[$class->id][$day->name][$timeslot->time])) {\n $body .= \"<td class='text-center'>\";\n $slotData = $data[$class->id][$day->name][$timeslot->time];\n $courseCode = $slotData['course_code'];\n $courseName = $slotData['course_name'];\n $professor = $slotData['professor'];\n $room = $slotData['room'];\n\n $body .= \"<span class='course_code'>{$courseCode}</span><br />\";\n $body .= \"<span class='room pull-left'>{$room}</span>\";\n $body .= \"<span class='professor pull-right'>{$professor}</span>\";\n\n $body .= \"</td>\";\n } else {\n $body .= \"<td></td>\";\n }\n }\n $body .= \"</tr>\";\n }\n\n $title = $class->name;\n $content .= str_replace(['{TITLE}', '{HEADING}', '{BODY}'], [$title, $header, $body], $tableTemplate);\n }\n\n $path = 'public/timetables/timetable_' . $this->timetable->id . '.html';\n Storage::put($path, $content);\n\n $this->timetable->update([\n 'file_url' => $path\n ]);\n }", "function KandGExpFmtTemplate($template = \"None\") {\n switch ($template) {\n case \"Template_1\":\n $HdrAr = array(\n 'Letter', '#', 'Number', 'Real', 'Formula'\n );\n $HdrStyleAr = array(\n array(\n 'font' => array(\n 'bold' => true,\n 'size' => 11,\n 'name' => 'Palatino'\n )\n ),\n array(\n 'font' => array(\n 'bold' => true,\n 'size' => 12,\n 'name' => 'Palatino'\n )\n ),\n array(\n 'font' => array(\n 'bold' => true,\n 'size' => 13,\n 'name' => 'Palatino'\n )\n ),\n array(\n 'font' => array(\n 'bold' => true,\n 'size' => 14,\n 'name' => 'Palatino'\n )\n ),\n array(\n 'font' => array(\n 'bold' => true,\n 'size' => 15,\n 'name' => 'Palatino'\n )\n )\n );\n function Cmds_Template_1($objPHPExcel, $x = 1, $y = 1, $hdrs = array(), $data = array()) {\n $d = \"D\";\n $objPHPExcel->getActiveSheet()->setCellValue('B18','=SUM(B2:B17)');\n $objPHPExcel->getActiveSheet()->setCellValue($d.'18','=SUM('.$d.'2:'.$d.'17)');\n }\n $Cmds = 'Cmds_Template_1';\n \n $styleAr1 = array(\n 'font' => array(\n 'bold' => true\n )\n );\n $styleAr2 = array(\n 'font' => array(\n 'bold' => true,\n 'color' => array('rgb' => 'FF0000'),\n 'size' => 15,\n 'name' => 'Palatino'\n )\n );\n $styleAr3 = array(\n 'font' => array(\n 'bold' => true,\n 'color' => array('rgb' => '614126'),\n 'size' => 15,\n 'name' => 'Palatino'\n )\n );\n $styleAr4 = array(\n 'font' => array(\n 'bold' => false,\n 'color' => array('rgb' => '614126')\n ),\n 'code' => PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE\n );\n return array($HdrAr,$Cmds,True,$HdrStyleAr,$styleAr1,$styleAr2,$styleAr3,$styleAr4);\n break;\n case \"kLateInterestResults\":\n function kLateInterestResults_Template($objPHPExcel, $x = 1, $y = 1, $hdrs = array(), $data = array()) {\n $data_c = array(); // consolidated employer data\n $titles = $data[0];\n array_push($data_c, $data[1], $data[2], $data[3]); // 2nd, 3rd, 4th arrays\n $hdrs_c = array_slice($hdrs,0,3);\n $hdrs = array_slice ($hdrs, 3);\n\n $hdrs = MultiHdrAdjust($hdrs);\n $hdrs_c = MultiHdrAdjust($hdrs_c);\n $hdr_offset = $hdrs[0];\n $hdr_offset_c = $hdrs_c[0];\n\n array_shift($hdrs);\n array_shift($hdrs_c);\n array_splice($data,0,4);\n\n // $data[4] = array_map('DateStrToTimeStamp', $data[4]); // convert datestring->UNIX timestamp->Excel Serial Number Format for Dates\n // $data[5] = array_map('DateStrToTimeStamp', $data[5]);\n // $data[6] = array_map('DateStrToTimeStamp', $data[6]);\n\n // array_multisort($data[2], SORT_ASC, $data[1], SORT_NUMERIC, SORT_ASC, $data[0], SORT_ASC, $data[4], SORT_NUMERIC, SORT_ASC, $data[3], $data[5], $data[6], $data[7], $data[8], $data[9])\n // by employer name, emp #, pcpt name, and then date paid\n array_multisort( $data[1], SORT_NUMERIC, SORT_ASC, $data[0], SORT_ASC, $data[4], SORT_NUMERIC, SORT_ASC, $data[2], $data[3], $data[5], $data[6], $data[7], $data[8], $data[9]);\n // by emp #, pcpt name, and then date paid\n\n $data = ShiftDataArrays($data);\n $ar_emp = $data_c[0];\n // array_multisort($data_c[1], SORT_ASC, $data_c[0], $data_c[2]);\n // by emp name\n\n array_multisort($data_c[0], SORT_NUMERIC, SORT_ASC, $data_c[1], $data_c[2]);\n // by emp #\n $data_c = ShiftDataArrays ($data_c);\n\n $BoldTitle = array(\n 'font' => array(\n 'bold' => true,\n 'size' => 14));\n\n $BoldItalic = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_RIGHT\n ),\n 'font' => array(\n 'bold' => true,\n 'italic' => true));\n\n $BotBorder = array(\n 'borders' => array(\n 'bottom' => array(\n 'style' => PHPExcel_Style_Border::BORDER_THIN)));\n\n $Horiz_Center = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER\n ));\n\n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('A',$x,$y).NewChar('1',$x,$y),$titles[0]); // set 1st title \n $objPHPExcel->getActiveSheet()->getStyle(NewChar('A',$x,$y).NewChar('1',$x,$y))->applyFromArray($BoldTitle); // Format Title\n $objPHPExcel->getActiveSheet()->fromArray($hdrs_c, null, NewChar('B',$x,$y).NewChar('4',$x,$y),true); // consolidated hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('B',$x,$y).NewChar(strval(4+$hdr_offset_c),$x,$y).':'.NewChar('D',$x,$y).NewChar(strval(4+$hdr_offset_c),$x,$y).':')->applyFromArray($BotBorder); // Format Title\n\n $objPHPExcel->getActiveSheet()->fromArray($data_c, null, NewChar('B',$x,$y).NewChar(strval(5+$hdr_offset_c),$x,$y),true); // consolidated emp data\n $consdatastrt = intval(NewChar('5',$x,$y)); \n $ttlrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('C',$x,$y));\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('B',$x,$y).NewChar(strval($consdatastrt),$x,$y).':'.NewChar('B',$x,$y).NewChar(strval($ttlrow),$x,$y))->applyFromArray($Horiz_Center); // format emp #\n $consdataend = $ttlrow+1;\n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('C',$x,$y).strval($ttlrow+1),'Totals');\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('C',$x,$y).strval($ttlrow+1))->applyFromArray($BoldItalic); // Bold Italic\n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('D',$x,$y).strval($ttlrow+1),'=SUM('.NewChar('D',$x,$y).NewChar(strval(5+$hdr_offset_c),$x,$y).':'.NewChar('D',$x,$y).strval($ttlrow).')'); // calculate sum formula for cons. amt due\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('D',$x,$y).strval($ttlrow))->applyFromArray($BotBorder); \n $ttlrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('C',$x,$y)) + 3;\n \n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('A',$x,$y).NewChar(strval($ttlrow),$x,$y),$titles[1]); // set 2nd title\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('A',$x,$y).NewChar(strval($ttlrow),$x,$y))->applyFromArray($BoldTitle); // Format Title\n $objPHPExcel->getActiveSheet()->fromArray($hdrs, null, NewChar('A',$x,$y).NewChar(strval($ttlrow+3),$x,$y),true); // main data hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('A',$x,$y).NewChar(strval($ttlrow+3+$hdr_offset),$x,$y).':'.NewChar('J',$x,$y).NewChar(strval($ttlrow+3+$hdr_offset),$x,$y))->applyFromArray($BotBorder); \n $objPHPExcel->getActiveSheet()->fromArray($data, null, NewChar('A',$x,$y).NewChar(strval($ttlrow+4+$hdr_offset),$x,$y),true); // main data\n $datarow = $ttlrow+4+$hdr_offset; \n\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('B',$x,$y).NewChar('4',$x,$y).':'.NewChar('D',$x,$y).NewChar(strval(4+$hdr_offset_c),$x,$y))->applyFromArray($Horiz_Center); // align emp headers\n $lastrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('C',$x,$y));\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('A',$x,$y).NewChar(strval($ttlrow+3),$x,$y).':'.NewChar('J',$x,$y).NewChar(strval($ttlrow+3+$hdr_offset),$x,$y))->applyFromArray($Horiz_Center); // align data headers\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('B',$x,$y).NewChar(strval($ttlrow+4),$x,$y).':'.NewChar('B',$x,$y).NewChar(strval($lastrow),$x,$y))->applyFromArray($Horiz_Center); // align text data 'B'\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('E',$x,$y).NewChar(strval($ttlrow+4),$x,$y).':'.NewChar('G',$x,$y).NewChar(strval($lastrow),$x,$y))->applyFromArray($Horiz_Center); // align text data, 'E-G'\n\n foreach ($ar_emp as $emp) {\n $lastrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('B',$x,$y));\n $RangeAr = CompactRangeArray($objPHPExcel->getActiveSheet()->rangeToArray(NewChar('B',$x,$y).strval($datarow).':'.NewChar('B',$x,$y).NewChar(strval($lastrow),$x,$y)));\n $keys = array_keys($RangeAr,$emp); // assuming data is already sorted by emp\n $low = min($keys); // get rows w/ emp\n $high = max($keys);\n\n $range = $high-$low+1;\n $high2+=$range+2;\n\n $objPHPExcel->getActiveSheet()->insertNewRowBefore($datarow+$high+1,2);\n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('C',$x,$y).strval($datarow+$high+1),'Totals');\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('C',$x,$y).strval($datarow+$high+1))->applyFromArray($BoldItalic); // Bold Italic\n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('D',$x,$y).strval($datarow+$high+1),'=SUM('.NewChar('D',$x,$y).strval($datarow+$low).':'.NewChar('D',$x,$y).strval($datarow+$high).')'); // set emp late deferr total\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('D',$x,$y).strval($datarow+$high))->applyFromArray($BotBorder); // Format Total\n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('J',$x,$y).strval($datarow+$high+1),'=SUM('.NewChar('J',$x,$y).strval($datarow+$low).':'.NewChar('J',$x,$y).strval($datarow+$high).')'); // set emp amt due total \n $objPHPExcel->getActiveSheet()->getStyle(NewChar('J',$x,$y).strval($datarow+$high))->applyFromArray($BotBorder); // Format Total\n }\n\n $dataend = $datarow+$high2-1;\n\n // Formats\n // $ signs and red negative values\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('D',$x,$y).NewChar(strval($consdatastrt),$x,$y).':'.NewChar('D',$x,$y).NewChar(strval($ttlrow),$x,$y))->getNumberFormat()->setFormatCode('\"$\"#,##0.00_-;[Red]-\"$\"#,##0.00_-;\"$\"#,##0.00_-'); // cons data amt due\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('D',$x,$y).NewChar(strval($datarow),$x,$y).':'.NewChar('D',$x,$y).NewChar(strval($dataend),$x,$y))->getNumberFormat()->setFormatCode('\"$\"#,##0.00_-;[Red]-\"$\"#,##0.00_-;\"$\"#,##0.00_-');\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('H',$x,$y).NewChar(strval($datarow),$x,$y).':'.NewChar('H',$x,$y).NewChar(strval($dataend),$x,$y))->getNumberFormat()->setFormatCode('\"$\"#,##0.00_-;[Red]-\"$\"#,##0.00_-;\"$\"#,##0.00_-');\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('I',$x,$y).NewChar(strval($datarow),$x,$y).':'.NewChar('I',$x,$y).NewChar(strval($dataend),$x,$y))->getNumberFormat()->setFormatCode('\"$\"#,##0.00_-;[Red]-\"$\"#,##0.00_-;\"$\"#,##0.00_-');\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('J',$x,$y).NewChar(strval($datarow),$x,$y).':'.NewChar('J',$x,$y).NewChar(strval($dataend),$x,$y))->getNumberFormat()->setFormatCode('\"$\"#,##0.00_-;[Red]-\"$\"#,##0.00_-;\"$\"#,##0.00_-');\n\n for ($char='E'; $char <= 'G'; $char++) { \n for ($i=$datarow; $i<($dataend+1) ; $i++) { \n $value = $objPHPExcel->getActiveSheet()->getCell(NewChar($char,$x,$y).strval($i))->getValue();\n if (CheckDateFormat($value)) { // if parsable date format, convert to Excel Date\n $objPHPExcel->GetActiveSheet()->setCellValue(NewChar($char,$x,$y).strval($i), DateStrToTimeStamp($value));\n $objPHPExcel->GetActiveSheet()->getStyle(NewChar($char,$x,$y).strval($i))->getNumberFormat()->setFormatCode('mm/dd/y;;'); \n } else { // leave as text\n \n } \n }\n }\n\n $dataColCount = PHPExcel_Cell::columnIndexFromString($objPHPExcel->getActiveSheet()->getHighestColumn()); // # of data cols\n echo \"\\r\\nAuto Sizing Columns \".NumToAlpha(2).\"-\".NumToAlpha($dataColCount);\n $objPHPExcel->GetActiveSheet()->getColumnDimension('A')->setWidth(30);\n for ($i = 2; $i <= $dataColCount; $i++) {\n $objPHPExcel->getActiveSheet()->getColumnDimension(NumToAlpha($i))->setAutoSize(true);\n }\n $objPHPExcel->GetActiveSheet()->setSelectedCell('A1'); \n }\n\n $Cmds = 'kLateInterestResults_Template';\n\n return array($HdrAr,$Cmds,False,$HdrStyleAr);\n break;\n case \"kLateInterestResults_Cml\":\n function kLateInterestResults_Cml_Template($objPHPExcel, $x = 1, $y = 1, $hdrs = array(), $data = array()) {\n $data_c = array(); // consolidated employer data\n $titles = $data[0];\n array_push($data_c, $data[1], $data[2], $data[3]); // 2nd, 3rd, 4th arrays\n $hdrs_c = array_slice($hdrs,0,3);\n $hdrs = array_slice ($hdrs, 3);\n\n $hdrs = MultiHdrAdjust($hdrs);\n $hdrs_c = MultiHdrAdjust($hdrs_c);\n $hdr_offset = $hdrs[0];\n $hdr_offset_c = $hdrs_c[0];\n\n array_shift($hdrs);\n array_shift($hdrs_c);\n array_splice($data,0,4); // titles and consolidated arrays\n\n // array_multisort($data[2], SORT_ASC, $data[1], SORT_NUMERIC, SORT_ASC, $data[0], SORT_ASC, $data[4], SORT_NUMERIC, SORT_ASC, $data[3], $data[5], $data[6], $data[7], $data[8], $data[9], $data[10], $data[11]);\n // by emp name, emp #, pcpt name, date paid\n\n array_multisort($data[1], SORT_NUMERIC, SORT_ASC, $data[0], SORT_ASC, $data[4], SORT_NUMERIC, SORT_ASC, $data[2], $data[3], $data[5], $data[6], $data[7], $data[8], $data[9], $data[10], $data[11]);\n // by emp #, pcpt name, date paid\n\n $data = ShiftDataArrays($data);\n // $ar_emp = $data_c[1];\n $ar_emp = $data_c[0];\n // array_multisort($data_c[1], SORT_ASC, $data_c[0], $data_c[2]);\n // by emp name\n\n array_multisort($data_c[0], SORT_NUMERIC, SORT_ASC, $data_c[1], $data_c[2]);\n // by emp name\n\n $data_c = ShiftDataArrays ($data_c);\n\n $BoldTitle = array(\n 'font' => array(\n 'bold' => true,\n 'size' => 14));\n\n $BoldItalic = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_RIGHT\n ),\n 'font' => array(\n 'bold' => true,\n 'italic' => true));\n\n $BotBorder = array(\n 'borders' => array(\n 'bottom' => array(\n 'style' => PHPExcel_Style_Border::BORDER_THIN)));\n\n $Horiz_Center = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER\n ));\n\n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('A',$x,$y).NewChar('1',$x,$y),$titles[0]); // set 1st title \n $objPHPExcel->getActiveSheet()->getStyle(NewChar('A',$x,$y).NewChar('1',$x,$y))->applyFromArray($BoldTitle); // Format Title\n $objPHPExcel->getActiveSheet()->fromArray($hdrs_c, null, NewChar('B',$x,$y).NewChar('4',$x,$y),true); // consolidated hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('B',$x,$y).NewChar(strval(4+$hdr_offset_c),$x,$y).':'.NewChar('D',$x,$y).NewChar(strval(4+$hdr_offset_c),$x,$y).':')->applyFromArray($BotBorder); // Format Title\n\n $objPHPExcel->getActiveSheet()->fromArray($data_c, null, NewChar('B',$x,$y).NewChar(strval(5+$hdr_offset_c),$x,$y),true); // consolidated emp data\n $consdatastrt = intval(NewChar('5',$x,$y)); \n $ttlrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('C',$x,$y));\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('B',$x,$y).NewChar(strval($consdatastrt),$x,$y).':'.NewChar('B',$x,$y).NewChar(strval($ttlrow),$x,$y))->applyFromArray($Horiz_Center); // format emp #\n $consdataend = $ttlrow+1;\n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('C',$x,$y).strval($ttlrow+1),'Totals');\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('C',$x,$y).strval($ttlrow+1))->applyFromArray($BoldItalic); // Bold Italic\n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('D',$x,$y).strval($ttlrow+1),'=SUM('.NewChar('D',$x,$y).NewChar(strval(5+$hdr_offset_c),$x,$y).':'.NewChar('D',$x,$y).strval($ttlrow).')'); // calculate sum formula for cons. amt due\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('D',$x,$y).strval($ttlrow))->applyFromArray($BotBorder); \n $ttlrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('C',$x,$y)) + 3;\n\n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('A',$x,$y).NewChar(strval($ttlrow),$x,$y),$titles[1]); // set 2nd title\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('A',$x,$y).NewChar(strval($ttlrow),$x,$y))->applyFromArray($BoldTitle); // Format Title\n $objPHPExcel->getActiveSheet()->fromArray($hdrs, null, NewChar('A',$x,$y).NewChar(strval($ttlrow+3),$x,$y),true); // main data hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('A',$x,$y).NewChar(strval($ttlrow+3+$hdr_offset),$x,$y).':'.NewChar('L',$x,$y).NewChar(strval($ttlrow+3+$hdr_offset),$x,$y))->applyFromArray($BotBorder); \n $objPHPExcel->getActiveSheet()->fromArray($data, null, NewChar('A',$x,$y).NewChar(strval($ttlrow+4+$hdr_offset),$x,$y),true); // main data\n $datarow = $ttlrow+4+$hdr_offset; \n\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('B',$x,$y).NewChar('4',$x,$y).':'.NewChar('D',$x,$y).NewChar(strval(4+$hdr_offset_c),$x,$y))->applyFromArray($Horiz_Center); // align emp headers\n $lastrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('C',$x,$y));\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('A',$x,$y).NewChar(strval($ttlrow+3),$x,$y).':'.NewChar('L',$x,$y).NewChar(strval($ttlrow+3+$hdr_offset),$x,$y))->applyFromArray($Horiz_Center); // align data headers\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('B',$x,$y).NewChar(strval($ttlrow+4),$x,$y).':'.NewChar('B',$x,$y).NewChar(strval($lastrow),$x,$y))->applyFromArray($Horiz_Center); // align text data 'B'\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('E',$x,$y).NewChar(strval($ttlrow+4),$x,$y).':'.NewChar('G',$x,$y).NewChar(strval($lastrow),$x,$y))->applyFromArray($Horiz_Center); // align text data, 'E-G'\n\n foreach ($ar_emp as $emp) {\n $lastrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('B',$x,$y));\n $RangeAr = CompactRangeArray($objPHPExcel->getActiveSheet()->rangeToArray(NewChar('B',$x,$y).strval($datarow).':'.NewChar('B',$x,$y).NewChar(strval($lastrow),$x,$y)));\n $keys = array_keys($RangeAr,$emp); // assuming data is already sorted by emp\n $low = min($keys); // get rows w/ emp\n $high = max($keys);\n\n $range = $high-$low+1;\n $high2+=$range+2;\n\n $objPHPExcel->getActiveSheet()->insertNewRowBefore($datarow+$high+1,2);\n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('C',$x,$y).strval($datarow+$high+1),'Totals');\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('C',$x,$y).strval($datarow+$high+1))->applyFromArray($BoldItalic); // Bold Italic\n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('D',$x,$y).strval($datarow+$high+1),'=SUM('.NewChar('D',$x,$y).strval($datarow+$low).':'.NewChar('D',$x,$y).strval($datarow+$high).')'); // set emp late deferr total\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('D',$x,$y).strval($datarow+$high))->applyFromArray($BotBorder); // Format Total\n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('J',$x,$y).strval($datarow+$high+1),'=SUM('.NewChar('J',$x,$y).strval($datarow+$low).':'.NewChar('J',$x,$y).strval($datarow+$high).')'); // set emp amt due total \n $objPHPExcel->getActiveSheet()->getStyle(NewChar('J',$x,$y).strval($datarow+$high))->applyFromArray($BotBorder); // Format Total\n $objPHPExcel->getActiveSheet()->setCellValue(NewChar('L',$x,$y).strval($datarow+$high+1),'=SUM('.NewChar('L',$x,$y).strval($datarow+$low).':'.NewChar('L',$x,$y).strval($datarow+$high).')'); // set emp amt due total \n $objPHPExcel->getActiveSheet()->getStyle(NewChar('L',$x,$y).strval($datarow+$high))->applyFromArray($BotBorder); // Format Total\n }\n\n $dataend = $datarow+$high2-1;\n\n // Formats\n // $ signs and red negative values\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('D',$x,$y).NewChar(strval($consdatastrt),$x,$y).':'.NewChar('D',$x,$y).NewChar(strval($ttlrow),$x,$y))->getNumberFormat()->setFormatCode('\"$\"#,##0.00_-;[Red]-\"$\"#,##0.00_-;\"$\"#,##0.00_-'); // cons data amt due\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('D',$x,$y).NewChar(strval($datarow),$x,$y).':'.NewChar('D',$x,$y).NewChar(strval($dataend),$x,$y))->getNumberFormat()->setFormatCode('\"$\"#,##0.00_-;[Red]-\"$\"#,##0.00_-;\"$\"#,##0.00_-');\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('H',$x,$y).NewChar(strval($datarow),$x,$y).':'.NewChar('H',$x,$y).NewChar(strval($dataend),$x,$y))->getNumberFormat()->setFormatCode('\"$\"#,##0.00_-;[Red]-\"$\"#,##0.00_-;\"$\"#,##0.00_-');\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('I',$x,$y).NewChar(strval($datarow),$x,$y).':'.NewChar('I',$x,$y).NewChar(strval($dataend),$x,$y))->getNumberFormat()->setFormatCode('\"$\"#,##0.00_-;[Red]-\"$\"#,##0.00_-;\"$\"#,##0.00_-');\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('J',$x,$y).NewChar(strval($datarow),$x,$y).':'.NewChar('J',$x,$y).NewChar(strval($dataend),$x,$y))->getNumberFormat()->setFormatCode('\"$\"#,##0.00_-;[Red]-\"$\"#,##0.00_-;\"$\"#,##0.00_-');\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('K',$x,$y).NewChar(strval($datarow),$x,$y).':'.NewChar('K',$x,$y).NewChar(strval($dataend),$x,$y))->getNumberFormat()->setFormatCode('\"$\"#,##0.00_-;[Red]-\"$\"#,##0.00_-;\"$\"#,##0.00_-');\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('L',$x,$y).NewChar(strval($datarow),$x,$y).':'.NewChar('L',$x,$y).NewChar(strval($dataend),$x,$y))->getNumberFormat()->setFormatCode('\"$\"#,##0.00_-;[Red]-\"$\"#,##0.00_-;\"$\"#,##0.00_-');\n\n for ($char='E'; $char <= 'G'; $char++) { \n for ($i=$datarow; $i<($dataend+1) ; $i++) { \n $value = $objPHPExcel->getActiveSheet()->getCell(NewChar($char,$x,$y).strval($i))->getValue();\n if (CheckDateFormat($value)) { // if parsable date format, convert to Excel Date\n $objPHPExcel->GetActiveSheet()->setCellValue(NewChar($char,$x,$y).strval($i), DateStrToTimeStamp($value));\n $objPHPExcel->GetActiveSheet()->getStyle(NewChar($char,$x,$y).strval($i))->getNumberFormat()->setFormatCode('mm/dd/y;;'); \n } else { // leave as text\n \n } \n }\n }\n\n $dataColCount = PHPExcel_Cell::columnIndexFromString($objPHPExcel->getActiveSheet()->getHighestColumn()); // # of data cols\n echo \"\\r\\nAuto Sizing Columns \".NumToAlpha(2).\"-\".NumToAlpha($dataColCount);\n $objPHPExcel->GetActiveSheet()->getColumnDimension('A')->setWidth(30);\n for ($i = 2; $i <= $dataColCount; $i++) {\n $objPHPExcel->getActiveSheet()->getColumnDimension(NumToAlpha($i))->setAutoSize(true);\n }\n $objPHPExcel->GetActiveSheet()->setSelectedCell('A1'); \n }\n\n $Cmds = 'kLateInterestResults_Cml_Template';\n return array($HdrAr,$Cmds,False,$HdrStyleAr);\n break;\n\n case \"YTD_Contributions\":\n $HdrAr = array();\n $HdrStyleAr = array();\n function YTD_Contributions_Template($objPHPExcel, $x = 1, $y = 1, $hdrs = array(), $data = array()) {\n var_dump($hdrs);\n $data[1] = array_map('DateStrToTimeStamp', $data[1]); // convert datestring->UNIX timestamp->Excel Serial Number Format for Dates\n array_unshift($data, $hdrs);\n $objPHPExcel->getActiveSheet()->fromArray($source, null, NumToAlpha($x_offset) . strval($y_offset), true); // hdrs + data\n\n $TopRow = array(\n 'borders' => array(\n 'bottom' => array(\n 'style' => PHPExcel_Style_Border::BORDER_THIN\n )\n ),\n 'font' => array(\n 'color' => array('rgb' => '614126')\n )\n );\n\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('A',$x,$y).':'.NewChar('F',$x,$y))->applyFromArray($TopRow); // Format Title\n $dataColCount = PHPExcel_Cell::columnIndexFromString($objPHPExcel->getActiveSheet()->getHighestColumn()); // # of data cols\n echo \"\\r\\nAuto Sizing Columns \".NumToAlpha(1).\"-\".NumToAlpha($dataColCount);\n for ($i = 1; $i <= $dataColCount; $i++) {\n $objPHPExcel->getActiveSheet()->getColumnDimension(NumToAlpha($i))->setAutoSize(true);\n } \n }\n $Cmds = 'YTD_Contributions_Template';\n return array($HdrAr,$Cmds,False,$HdrStyleAr);\n break;\n case \"BadCensusAdds\":\n function BadCensusAdds_Template($objPHPExcel, $x = 1, $y = 1, $hdrs = array(), $data = array()) {\n $hdrs2 = $hdrs; // copy and remove last 2 headers \n $data[8] = array_map('DateStrToTimeStamp', $data[8]); // convert datestring->UNIX timestamp->Excel Serial Number Format for Dates\n $data[11] = array_map('DateStrToTimeStamp', $data[11]); \n $data = ShiftDataArrays($data);\n $adj_hdrs = array();\n $adj_hdrs = MultiHdrAdjust($hdrs);\n $hdr_offset = $adj_hdrs[0];\n array_shift($adj_hdrs);\n // var_dump($adj_hdrs);\n\n $BoldCenter = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER\n ),\n 'font' => array(\n 'size' => 12,\n 'bold' => true\n ));\n\n $BoldLeft = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_LEFT\n ),\n 'font' => array(\n 'size' => 12,\n 'bold' => true\n ));\n\n $CenterSize12 = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER\n ),\n 'font' => array(\n 'size' => 12\n ));\n\n $LeftSize12 = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_LEFT\n ),\n 'font' => array(\n 'size' => 12\n ));\n\n $Size12 = array(\n 'font' => array(\n 'size' => 12\n ));\n\n $objPHPExcel->getActiveSheet()->fromArray($adj_hdrs, null, NewChar('A',$x,$y).NewChar('1',$x,$y),true); // hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('A',$x,$y).NewChar('1',$x,$y).':'.NewChar('A',$x,$y).NewChar('2'),$x,$y)->applyFromArray($BoldCenter);\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('B',$x,$y).NewChar('1',$x,$y).':'.NewChar('H',$x,$y).NewChar('2'),$x,$y)->applyFromArray($BoldLeft);\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('I',$x,$y).NewChar('1',$x,$y).':'.NewChar('I',$x,$y).NewChar('2'),$x,$y)->applyFromArray($BoldCenter);\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('J',$x,$y).NewChar('1',$x,$y).':'.NewChar('K',$x,$y).NewChar('2'),$x,$y)->applyFromArray($BoldLeft);\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('L',$x,$y).NewChar('1',$x,$y).':'.NewChar('L',$x,$y).NewChar('2'),$x,$y)->applyFromArray($BoldCenter);\n\n $objPHPExcel->getActiveSheet()->fromArray($data, null, NewChar('A',$x,$y).NewChar(strval(2+$hdr_offset),$x,$y),true); // data\n $lastrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('A',$x,$y));\n for ($char='A'; $char <= 'L'; $char++) { \n switch ($char) {\n case ($char == 'A') || ($char == 'I') || ($char == 'L'):\n $objPHPExcel->getActiveSheet()->getStyle(NewChar($char,$x,$y).NewChar('1',$x,$y).':'.NewChar($char,$x,$y).NewChar(strval($lastrow),$x,$y))->applyFromArray($CenterSize12);\n break;\n default:\n $objPHPExcel->getActiveSheet()->getStyle(NewChar($char,$x,$y).NewChar('1',$x,$y).':'.NewChar($char,$x,$y).NewChar(strval($lastrow),$x,$y))->applyFromArray($LeftSize12);\n break;\n }\n }\n\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('I',$x,$y).NewChar('1',$x,$y).':'.NewChar('I',$x,$y).NewChar(strval($lastrow),$x,$y))->getNumberFormat()->setFormatCode('mm/dd/y');\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('L',$x,$y).NewChar('1',$x,$y).':'.NewChar('L',$x,$y).NewChar(strval($lastrow),$x,$y))->getNumberFormat()->setFormatCode('mm/dd/y;;');\n\n $dataColCount = PHPExcel_Cell::columnIndexFromString($objPHPExcel->getActiveSheet()->getHighestColumn()); // # of data cols\n // $lastrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('A',$x,$y));\n // $RangeAr = CompactRangeArray($objPHPExcel->getActiveSheet()->rangeToArray(NewChar('A',$x,$y).NewChar('1',$x,$y).':'.NewChar('A',$x,$y).NewChar(strval($lastrow),$x,$y)));\n \n // if ($high>$high2) {\n // $high = $high2;\n // } \n \n // $objPHPExcel->getActiveSheet()->insertNewRowBefore($high+2,2);\n // $objPHPExcel->getActiveSheet()->fromArray($hdrs2, null, NewChar('A',$x,$y).strval($high+2),true); // hdrs\n\n echo \"\\r\\nAuto Sizing Columns \".NumToAlpha(1).\"-\".NumToAlpha($dataColCount);\n for ($i = 1; $i <= $dataColCount; $i++) {\n $objPHPExcel->getActiveSheet()->getColumnDimension(NumToAlpha($i))->setAutoSize(true);\n }\n $objPHPExcel->GetActiveSheet()->setSelectedCell('A1'); \n } \n $Cmds = 'BadCensusAdds_Template';\n return array($HdrAr,$Cmds,False,$HdrStyleAr);\n break;\n\n case \"BadCensusDOBs\":\n function BadCensusDOBs_Template($objPHPExcel, $x = 1, $y = 1, $hdrs = array(), $data = array()) {\n $hdrs3 = $hdrs;\n $hdrs2 = array_slice($hdrs,0,3);\n array_push($hdrs2, $hdrs[4]);\n $hdrs = array_slice($hdrs, 0, 3);\n\n $data[10] = array_map('DateStrToTimeStamp', $data[10]); // convert datestring->UNIX timestamp->Excel Serial Number Format for Dates\n\n $data1 = array();\n $data2 = array();\n $data3 = array();\n array_push($data1, $data[0], $data[1], $data[2]);\n array_push($data2, $data[3], $data[4], $data[5], $data[6]);\n array_push($data3, $data[7], $data[8], $data[9], $data[10], $data[11]);\n $bool1 = True;\n $bool2 = True;\n $bool3 = True;\n\n if (count($data[0])==1 & $data[0][0]==\"\") {\n $bool1 = False;\n }\n\n if (count($data[3])==1 & $data[3][0]==\"\") {\n $bool2 = False;\n }\n\n if (count($data[7])==1 & $data[7][0]==\"\") {\n $bool3 = False;\n }\n\n $data1 = ShiftDataArrays($data1);\n $data2 = ShiftDataArrays($data2);\n $data3 = ShiftDataArrays($data3);\n\n $BoldCenter = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER\n ),\n 'font' => array(\n 'size' => 12,\n 'bold' => true\n ));\n\n $BoldLeft = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_LEFT\n ),\n 'font' => array(\n 'size' => 12,\n 'bold' => true\n ));\n\n $CenterSize12 = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER\n ),\n 'font' => array(\n 'size' => 12\n ));\n\n $LeftSize12 = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_LEFT\n ),\n 'font' => array(\n 'size' => 12\n ));\n\n $Size12 = array(\n 'font' => array(\n 'size' => 12\n ));\n \n\n if ($bool1) {\n $adj_hdrs = array();\n $adj_hdrs = MultiHdrAdjust($hdrs);\n $hdr_offset = $adj_hdrs[0];\n array_shift($adj_hdrs);\n\n $objPHPExcel->getActiveSheet()->fromArray($adj_hdrs, null, NewChar('A',$x,$y).NewChar('1',$x,$y),true); // hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('A',$x,$y).NewChar('1',$x,$y).':'.NewChar('A',$x,$y).NewChar('1'),$x,$y)->applyFromArray($BoldLeft); // format hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('B',$x,$y).NewChar('1',$x,$y).':'.NewChar('B',$x,$y).NewChar('1'),$x,$y)->applyFromArray($BoldCenter); // format hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('C',$x,$y).NewChar('1',$x,$y).':'.NewChar('C',$x,$y).NewChar('1'),$x,$y)->applyFromArray($BoldLeft); // format hdrs\n\n $objPHPExcel->getActiveSheet()->fromArray($data1, null, NewChar('A',$x,$y).NewChar(strval(2+$hdr_offset),$x,$y),true); // data\n $lastrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('A',$x,$y));\n for ($char='A'; $char <= 'C'; $char++) {\n switch ($char) {\n case ($char == 'B'):\n $objPHPExcel->getActiveSheet()->getStyle(NewChar($char,$x,$y).NewChar(strval(2+$hdr_offset),$x,$y).':'.NewChar($char,$x,$y).NewChar(strval($lastrow),$x,$y))->applyFromArray($CenterSize12);\n\n break;\n default:\n $objPHPExcel->getActiveSheet()->getStyle(NewChar($char,$x,$y).NewChar(strval(2+$hdr_offset),$x,$y).':'.NewChar($char,$x,$y).NewChar(strval($lastrow),$x,$y))->applyFromArray($Size12);\n break;\n }\n }\n\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('B',$x,$y).NewChar(strval(2+$hdr_offset),$x,$y).':'.NewChar('B',$x,$y).NewChar(strval($lastrow),$x,$y))->getNumberFormat()->setFormatCode('000000000');\n \n }\n else {\n $lastrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('A',$x,$y));\n }\n\n if ($bool2) {\n $adj_hdrs = array();\n $adj_hdrs = MultiHdrAdjust($hdrs2);\n $hdr_offset = $adj_hdrs[0];\n array_shift($adj_hdrs);\n\n $objPHPExcel->getActiveSheet()->fromArray($adj_hdrs, null, NewChar('A',$x,$y).NewChar(strval($lastrow+2),$x,$y),true); // hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('A',$x,$y).NewChar(strval($lastrow+2),$x,$y).':'.NewChar('A',$x,$y).NewChar(strval($lastrow+2)),$x,$y)->applyFromArray($BoldLeft); // format hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('B',$x,$y).NewChar(strval($lastrow+2),$x,$y).':'.NewChar('B',$x,$y).NewChar(strval($lastrow+2)),$x,$y)->applyFromArray($BoldCenter); // format hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('C',$x,$y).NewChar(strval($lastrow+2),$x,$y).':'.NewChar('C',$x,$y).NewChar(strval($lastrow+2)),$x,$y)->applyFromArray($BoldLeft); // format hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('D',$x,$y).NewChar(strval($lastrow+2),$x,$y).':'.NewChar('D',$x,$y).NewChar(strval($lastrow+2)),$x,$y)->applyFromArray($BoldCenter); // format hdrs\n\n $objPHPExcel->getActiveSheet()->fromArray($data2, null, NewChar('A',$x,$y).NewChar(strval($lastrow+3),$x,$y),true); // 2nd data\n\n $firstrow = $lastrow+4;\n $lastrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('A',$x,$y));\n for ($char='A'; $char <= 'D'; $char++) { \n switch ($char) {\n case ($char == 'B') || ($char == 'D') :\n $objPHPExcel->getActiveSheet()->getStyle(NewChar($char,$x,$y).NewChar(strval(2+$hdr_offset),$x,$y).':'.NewChar($char,$x,$y).NewChar(strval($lastrow),$x,$y))->applyFromArray($CenterSize12);\n\n break;\n default:\n $objPHPExcel->getActiveSheet()->getStyle(NewChar($char,$x,$y).NewChar(strval(2+$hdr_offset),$x,$y).':'.NewChar($char,$x,$y).NewChar(strval($lastrow),$x,$y))->applyFromArray($Size12);\n break;\n }\n }\n }\n else {\n $lastrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('A',$x,$y));\n }\n\n if ($bool3) {\n $adj_hdrs = array();\n $adj_hdrs = MultiHdrAdjust($hdrs3);\n $hdr_offset = $adj_hdrs[0];\n array_shift($adj_hdrs);\n\n $objPHPExcel->getActiveSheet()->fromArray($adj_hdrs, null, NewChar('A',$x,$y).NewChar(strval($lastrow+2),$x,$y),true); // hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('A',$x,$y).NewChar(strval($lastrow+2),$x,$y).':'.NewChar('E',$x,$y).NewChar(strval($lastrow+2)),$x,$y)->applyFromArray($BoldCenter); // format hdrs\n\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('A',$x,$y).NewChar(strval($lastrow+2),$x,$y).':'.NewChar('A',$x,$y).NewChar(strval($lastrow+2)),$x,$y)->applyFromArray($BoldLeft); // format hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('B',$x,$y).NewChar(strval($lastrow+2),$x,$y).':'.NewChar('B',$x,$y).NewChar(strval($lastrow+2)),$x,$y)->applyFromArray($BoldCenter); // format hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('C',$x,$y).NewChar(strval($lastrow+2),$x,$y).':'.NewChar('C',$x,$y).NewChar(strval($lastrow+2)),$x,$y)->applyFromArray($BoldLeft); // format hdrs\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('D',$x,$y).NewChar(strval($lastrow+2),$x,$y).':'.NewChar('E',$x,$y).NewChar(strval($lastrow+2)),$x,$y)->applyFromArray($BoldCenter); // format hdrs\n\n $objPHPExcel->getActiveSheet()->fromArray($data3, null, NewChar('A',$x,$y).NewChar(strval($lastrow+3),$x,$y),true); // 3rd data\n\n $firstrow = $lastrow+3;\n $lastrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('A',$x,$y));\n for ($char='A'; $char <= 'E'; $char++) { \n switch ($char) {\n case ($char == 'B') || ($char == 'D') || ($char == 'E') :\n $objPHPExcel->getActiveSheet()->getStyle(NewChar($char,$x,$y).NewChar(strval(2+$hdr_offset),$x,$y).':'.NewChar($char,$x,$y).NewChar(strval($lastrow),$x,$y))->applyFromArray($CenterSize12);\n break;\n default:\n $objPHPExcel->getActiveSheet()->getStyle(NewChar($char,$x,$y).NewChar(strval(2+$hdr_offset),$x,$y).':'.NewChar($char,$x,$y).NewChar(strval($lastrow),$x,$y))->applyFromArray($Size12);\n break;\n }\n }\n\n $objPHPExcel->getActiveSheet()->getStyle(NewChar('D',$x,$y).NewChar(strval($firstrow),$x,$y).':'.NewChar('D',$x,$y).NewChar(strval($lastrow),$x,$y))->getNumberFormat()->setFormatCode('mm/dd/yyyy;;');\n }\n else {\n $lastrow = $objPHPExcel->getActiveSheet()->getHighestRow(NewChar('A',$x,$y));\n }\n $dataColCount = PHPExcel_Cell::columnIndexFromString($objPHPExcel->getActiveSheet()->getHighestColumn()); // # of data cols\n echo \"\\r\\nAuto Sizing Columns \".NumToAlpha(1).\"-\".NumToAlpha($dataColCount);\n for ($i = 1; $i <= $dataColCount; $i++) {\n $objPHPExcel->getActiveSheet()->getColumnDimension(NumToAlpha($i))->setAutoSize(true);\n } \n $objPHPExcel->GetActiveSheet()->setSelectedCell('A1'); \n } \n $Cmds = 'BadCensusDOBs_Template';\n return array($HdrAr,$Cmds,False,$HdrStyleAr);\n break;\n case \"Template_3\":\n break;\n default: // empty arrays (no headers, any formatting, no 'Cmds')\n $HdrAr = array();\n $HdrStyleAr = array();\n function Default_Template($objPHPExcel, $x = 1, $y = 1, $hdrs = array(), $data = array()) {\n $dataColCount = PHPExcel_Cell::columnIndexFromString($objPHPExcel->getActiveSheet()->getHighestColumn()); // # of data cols\n echo \"\\r\\nAuto Sizing Columns \".NumToAlpha(1).\"-\".NumToAlpha($dataColCount);\n for ($i = 1; $i <= $dataColCount; $i++) {\n $objPHPExcel->getActiveSheet()->getColumnDimension(NumToAlpha($i))->setAutoSize(true);\n } \n }\n $Cmds = 'Default_Template';\n return array($HdrAr,$Cmds,True,$HdrStyleAr);\n break;\n }\n }", "public function format()\r\n {\r\n //$this->template=$this->viewModel->formatView();\r\n }", "function makeHTMLTable($array){\n\t\t // start table\n\t\t $html = '<table>';\n\t\t // header row\n\t\t $html .= '<tr>';\n\t\t // foreach($array[0] as $key=>$value){\n\t\t // $html .= '<th>' . htmlspecialchars($key) . '</th>';\n\t\t // }\n\t\t // $html .= '</tr>';\n\t\t // data rows\n\t\t foreach( $array as $key=>$value){\n\t\t $html .= '<tr>';\n\t\t foreach($value as $key2=>$value2){\n\t\t $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n\t\t }\n\t\t $html .= '</tr>';\n\t\t }\n\t\t // finish table and return it\n\t\t $html .= '</table>';\n\t\t return $html;\n\t\t\t}", "public function templateInfo() \n {\n $info = array(); \n \n $info['name'] = $this->name; \n # $info[\"docblock\"] = $this->docblock->desc;\n # $info['position'] = $this->getPosition();\n # $info['is_array'] = $this->isArray();\n # $info['is_optional'] = $this->isOptional();\n # $info['is_passed_by_reference'] = $this->isPassedByReference();\n # $info['is_default_value_available'] = $this->isDefaultvalueAvailable();\n # $info['allows_null'] = $this->allowsNull();\n # $info['class_name'] = $this->getDeclaringClass() ? \n # $this->getDeclaringClass()->name : null;\n # $info['function_name'] = $this->getDeclaringFunction()->name;\n # $info['class_type'] = $this->getClass() ? $this->getClass()->getName() : null;\n\n # if ($this->isOptional() && $this->getDeclaringClass()->isUserDefined()) {\n # $info['default_value'] = $this->getDefaultValue();\n # }\n\n return $info; \n }", "public function default_template()\n {\n return array(\n 'table_open' => '<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\">',\n 'heading_row_start' => '<tr>',\n 'heading_previous_cell' => '<th><a href=\"{previous_url}\">&lt;&lt;</a></th>',\n 'heading_title_cell' => '<th colspan=\"{colspan}\">{heading}</th>',\n 'heading_next_cell' => '<th><a href=\"{next_url}\">&gt;&gt;</a></th>',\n 'heading_row_end' => '</tr>',\n 'week_row_start' => '<tr>',\n 'week_day_cell' => '<td>{week_day}</td>',\n 'week_row_end' => '</tr>',\n 'cal_row_start' => '<tr>',\n 'cal_cell_start' => '<td>',\n 'cal_cell_start_today' => '<td>',\n 'cal_cell_no_content' => '<a href=\"{content}\" class=\"{class}\">{day}</a>',\n 'cal_cell_no_content_today' => '<a href=\"{content}\" class=\"{class}\"><strong>{day}</strong></a>',\n 'cal_cell_content' => '{day}',\n 'cal_cell_content_today' => '<strong>{day}</strong>',\n 'cal_cell_blank' => '&nbsp;',\n 'cal_cell_end' => '</td>',\n 'cal_cell_end_today' => '</td>',\n 'cal_row_end' => '</tr>',\n 'table_close' => '</table>'\n );\n }", "protected function _parseTemplate() {}", "function ciniki_tenants_reportChunkTable($ciniki, $tnid, &$report, $chunk) {\n\n if( isset($chunk['textlist']) && $chunk['textlist'] != '' ) {\n $report['text'] .= $chunk['textlist'];\n }\n\n $html = '<table cellpadding=\"5\">';\n $html .= \"<thead><tr>\";\n $pdfhtml = '<table border=\"0\" cellpadding=\"5\" cellspacing=\"0\" style=\"border: 0.1px solid #aaa;\">';\n $pdfhtml .= \"<thead><tr>\";\n foreach($chunk['columns'] as $col) {\n $html .= \"<th>\" . $col['label'] . \"</th>\";\n $pdfhtml .= '<th bgcolor=\"#dddddd\" style=\"border: 0.1px solid #aaa;' \n . (isset($col['pdfwidth']) ? 'width:' . $col['pdfwidth'] : '') . '\">' . $col['label'] . \"</th>\";\n }\n $html .= \"</tr></thead>\";\n $html .= \"<tbody>\";\n $pdfhtml .= \"</tr></thead>\";\n $pdfhtml .= \"<tbody>\";\n\n foreach($chunk['data'] as $row) {\n $html .= \"<tr>\";\n $pdfhtml .= '<tr nobr=\"true\">';\n foreach($chunk['columns'] as $col) {\n $html .= '<td style=\"border: 1px solid #aaa; padding: 5px;\">';\n $pdfhtml .= '<td style=\"border: 0.1px solid #aaa;' . (isset($col['pdfwidth']) ? 'width:' . $col['pdfwidth'] : '') . '\">' ;\n if( isset($row[$col['field']]) ) {\n $html .= preg_replace(\"/\\n/\", \"<br/>\", $row[$col['field']]);\n $pdfhtml .= preg_replace(\"/\\n/\", \"<br/>\", $row[$col['field']]);\n }\n $html .= \"</td>\";\n $pdfhtml .= \"</td>\";\n }\n $html .= \"</tr>\";\n $pdfhtml .= \"</tr>\";\n }\n $html .= \"</tbody>\";\n $html .= \"</table>\";\n $pdfhtml .= \"</tbody>\";\n $pdfhtml .= \"</table>\";\n\n $report['html'] .= $html;\n\n\n $report['pdf']->addHtml(1, $pdfhtml);\n\n return array('stat'=>'ok');\n}", "function format($row)\r\n\t{\r\n\t\tif (is_callable($this->template))\r\n\t\t{\r\n\t\t\treturn call_user_func($this->template, $row);\r\n\t\t}\r\n\t\telse return $row->format($this->template);\r\n\t}", "protected function getTableStructure($table)\r\n\t{\r\n\t\treturn \"\\t<create><![CDATA[\".parent::getTableStructure($table).\"]]></create>\\n\";\r\n\t}", "function createTable($result) {\n $table = \"<table class='table table-bordered'>\";\n $row = $result->fetch_assoc();\n $table .= \"<tr>\";\n foreach(array_keys($row) as $field) {\n $table .= \"<th class='text-center'>$field</th>\";\n }\n $table .= \"</tr>\";\n while($row) {\n $table .= \"<tr>\";\n foreach($row as $key => $value) {\n $table .= \"<td class='text-center'>\";\n if(strcmp($key, \"Price\") == 0 or strcmp($key, \"Revenue\") == 0) {\n $table.=\"\\$\" . number_format($value, 2, \".\", \"\");\n }\n else {\n $table .= $value;\n }\n $table.=\"</td>\";\n }\n $table .= \"</tr>\";\n $row = $result->fetch_assoc();\n }\n $table .= \"</table>\";\n return $table;\n }", "function _im_user_getmms_format() { \r\n\t$rows = _im_user_getmms(); \r\n $header = array(\"Code\", \"Description\");\r\n $output = '<div class =\"table-trans-replace\">';\r\n $output .= '<div id =\"table-second-save\">';\r\n $output .= theme('table', array('header' => $header, 'rows' => $rows, ));\r\n $output .= '</div></div>';\r\n return $output;\r\n}", "function render_subscriber_table($table) {\n $s = '<table>';\n $s .= '<tr><th>Id</th><th>Name</th><th>Email</th></tr>';\n foreach($table as $row) {\n $id = \"$row[id]\";\n $name = \"<b>$row[name]</b>\";\n $email = \"$row[email]\";\n $s .= \"<tr><td>$id</td><td>$name</td><td>$email</td></tr>\";\n }\n $s .= '</table>';\n return $s;\n }", "public function renderTemplate();", "public function showTemplate(): string\n {\n $Qr = CoreFunctions::mostrar_qr($this);\n $firmas = CoreFunctions::mostrar_estado_proceso($this);\n $Service = $this->getService();\n $contenido = $this->getFieldValue('contenido');\n return <<<HTML\n <table style=\"width: 100%;border: 0\">\n <tbody>\n <tr>\n <td colspan=\"2\">{$Service->getFechaCiudad()}</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n\n <tr>\n <td>{$Service->getModel()->getFieldValue('destino')}</td>\n <td style=\"text-align:center\">$Qr<br/>No.{$Service->getRadicado()}</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">ASUNTO: $this->asunto</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n\n <tr>\n <td colspan=\"2\">Cordial saludo:</td>\n </tr>\n \n <tr>\n <td colspan=\"2\">&nbsp;</td>\n </tr>\n </tbody>\n </table>\n $contenido\n <p>{$Service->getDespedida()}<br/><br/></p>\n $firmas\n <p>{$Service->getOtherData()}</p>\nHTML;\n\n }", "public function getTableLayout()\n {\n return [\n 'headRows' => [0],\n 'table' => ['<table class=\"table table-striped table-hover table-condensed\">', '</table><br/>'],\n '0' => [ // Format für 1. Zeile\n 'tr' => ['<tr class=\"\">', '</tr>'],\n // Format für jede Spalte in der 1. Zeile\n 'defCol' => ['<td>', '</td>'],\n ],\n 'defRow' => [ // Formate für alle Zeilen\n 'tr' => ['<tr class=\"\">', '</tr>'],\n 'defCol' => ['<td>', '</td>'], // Format für jede Spalte in jeder Zeile\n ],\n 'defRowEven' => [ // Formate für alle geraden Zeilen\n 'tr' => ['<tr class=\"\">', '</tr>'],\n // Format für jede Spalte in jeder Zeile\n 'defCol' => ['<td>', '</td>'],\n ],\n ];\n }", "public function importTablesFromTemplate()\n {\n //Get a list of all the tables that need to be cloned\n $tables = $this->getTablesFromTemplate(self::TEMPLATE_PREFIX);\n\n //Clone the tables from the template into the demo instance\n $instancePrefix = $this->getTablePrefix();\n $defaultPrefix = self::TEMPLATE_PREFIX;\n $this->cloneTables($tables, $defaultPrefix, $instancePrefix);\n $this->convertPrefixes($defaultPrefix, $instancePrefix);\n }", "protected static function genChildDbFieldTableTemplate() { return array(); }", "public function render()\n\t{\n\t\t// convert json to PHP arrays\n\t\tif(!is_array($this->headers))\n\t\t\t$this->headers = $this->extract_json($this->headers);\n\t\tif(!is_array($this->data))\n\t\t\t$this->data = $this->extract_json($this->data);\n\n\t\t// generate a table of the appropriate type with sub-render method\n\t\t$table_html = $this->{\"render_$this->type\"}();\n\t\t\n\t\t// get the snippets directory if set\n\t\tif($this->snippets_dir && file_exists(\"$this->snippets_dir/table.php\"))\n\t\t\t$snippet = \"$this->snippets_dir/table.php\";\n\t\telse\n\t\t\t$snippet = __DIR__ . \"/snippets/table.php\";\n\t\t\n\t\t// build up the replacements array\n\t\t$replacements = array(\n\t\t\t'body' => $table_html,\n\t\t\t'class' => strlen($this->class)?\"class=\\\"$this->class\\\"\":'',\n\t\t\t'id' => strlen($this->id)?\"id=\\\"$this->id\\\"\":'',\n\t\t\t'caption' => strlen($this->caption)?\"<caption>$this->caption</caption>\":'',\n\t\t);\n\t\t\n\t\t$html = \\helpers\\html\\html::load_snippet($snippet, $replacements);\n\n\t\treturn $html;\n\t}", "public function getDataColTemplate(): DataColTemplate;", "function BeginIncidentTable() {\n $headings = array(\"Year\", \"Section\", \"Description\", \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\", \"Count\");\n echo \"<table class='sortable' align='center' cellpadding='5' border=1>\";\n echo \"<tr>\";\n foreach ($headings as $heading) {\n echo \"<th>$heading</th>\";\n }\n echo \"</tr>\";\n}", "function format($type, $row) {\n\n $row->RemittanceSequence = $this->transaction->RemittanceSequence;\n $row->CustomerOrgNumber = $this->transaction->CustomerOrgNumber;\n $row->NumTransactions = $this->transaction->NumTransactions;\n $row->TotalAmount = $this->transaction->TotalAmount;\n $row->Database = $this->transaction->Database;\n $row->Date = $this->transaction->Date;\n $row->VersionSoftware = $this->transaction->VersionSoftware;\n\n $this->transaction->RemittanceDaySequence++; #Starts at zero each day\n $this->transaction->NumRecords++; #Starts at zero each file\n \n $row->RemittanceDaySequence = $this->transaction->RemittanceDaySequence;\n $row->NumRecords = $this->transaction->NumRecords;\n\n #$html = \"$type\";\n foreach($this->formatH[$type] as $field => $column) {\n if($field != 'name') {\n #print_r($row);\n #print \"$field - field: \" . $column['field'] . \"<br>\\n\";\n\n $value = '';\n if(isset($column['field']) && $row->{$column['field']}) {\n $value = $row->{$column['field']};\n\n } elseif(isset($column['value']) && strlen($column['value'])) {\n $value = $column['value'];\n\n } else {\n $value = ' ';\n }\n $length = $column['stop'] - $column['start'] + 1;\n if($column['type'] == 'int' || $column['type'] == 'amount') {\n $pad = '0';\n $align = STR_PAD_LEFT;\n } elseif($column['type'] == 'text' || $column['type'] == 'date' || $column['type'] == 'bankaccount' || $column['type'] == 'monthdate') {\n $pad = ' ';\n $align = STR_PAD_RIGHT;\n } else {\n $pad = '*'; #Not defined \n $align = STR_PAD_LEFT;\n }\n $value = $this->{$column['type']}($value);\n $value = substr($value, 0, $length); #husk Œ klippe de totale datene til max lenge\n \n $html .= str_pad($value, $length, $pad, $align);\n #print \"field: $field: length: $length, value: <b>\" . str_pad($value, $length, $pad, $align) . \"</b>, pad: $pad, field: \" . $column['field'] . \", type: \" . $column['type'] . \"<br>\\n\";\n\n }\n }\n $html .= \"\\n\";\n return $html;\n }", "function toTable($data)\n{\n//print_r($data);\n\t$keys = $data[0];\n\t$keys = array_flip($keys);\n\t$result = \"<table>\\n\\t<tr>\";\n\tforeach($keys as $key)\n\t{\n\t\t$result .= '<th>' . $key . '</th>';\n\t}\n\t$result .= \"</tr>\\n\";\n\t$counter = 0;\n\tforeach($data as $item)\n\t{\n\t\t$counter++;\n\t\tif ($counter % 2 == 1)\n\t\t{\n\t\t\t$result .= \"\\t<tr>\";\n\t\t} else\n\t\t{\n\t\t\t$result .= \"\\t<tr class=\\\"odd\\\">\";\n\t\t}\n\t\tforeach($item as $value)\n\t\t{\n\t\t\t$result .= '<td>' . $value . '</td>';\n\t\t}\n\t\t$result .= \"</tr>\\n\";\n\t}\n\t$result .= \"</table>\\n\";\n\treturn $result;\n}", "function viewTable($parks)\n{\n return formatTable($parks);\n}", "private function stmtTemplate()\n\t{\n\t\tif($this->stmt_template == NULL) {\n\t\t\t$sql = \"SELECT ustd.id, ustds.width, ustds.height,\n\t\t\t\t\tustds.design_height,\n\t\t\t\t\tIF(ustds.height=0,0,1) AS fixed\n\t\t\t\t\tFROM user_site_template_div ustd\n\t\t\t\t\tJOIN user_site_template_div_size ustds\n\t\t\t\t\tON ustd.id = ustds.div_id\n\t\t\t\t\tAND ustds.site_id = :site_id\n\t\t\t\t\tJOIN user_site_template ust\n\t\t\t\t\tON ustd.template_id = ust.id\n\t\t\t\t\tAND ust.site_id = :site_id\n\t\t\t\t\tWHERE ustd.site_id = :site_id\n\t\t\t\t\tAND ustd.template_id = :template_id\n\t\t\t\t\tAND ustd.parent_id = :parent_id\n\t\t\t\t\tORDER BY ustd.sort_order ASC\";\n\t\t\treturn $this->_db->prepare($sql);\n\t\t} else {\n\t\t\treturn $this->stmt_template;\n\t\t}\n\t}", "public function getTitleColTemplate(): TitleColTemplate;", "public function render_section_templates()\n {\n }", "public function format(array $transactions)\n {\n $body = '<tr><td>' . parent::format($transactions) . '</td></tr>';\n\n return <<<EOC\n <table$this->tableProperties>\n <thead>\n <tr>\n <th>Type</th>\n <th>Date</th>\n <th>Amount</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n $body\n </tbody>\n </table>\nEOC;\n }", "function table_display($table)\n{\n $out = '';\n $out = '<style> td,th{border: solid 2px black;}</style>';\n if (count($table) == 0) {\n //table is empty\n return 'table is empty';\n }\n $out .= '<table>';\n\n //table header\n $col_names = array_keys($table[0]);\n $out .= '<tr>';\n foreach ($col_names as $col_name) {\n $out .= '<th>'.$col_name.'</th>';\n }\n $out .= '</tr>';\n //table data\n $out .= '</tr>';\n foreach ($table as $one_row) {\n $out .= '<tr>';\n foreach ($one_row as $key => $col_name) {\n if ($key == 'price' and gettype($key) != 'integer') {\n $out .= '<td> $'.$col_name.' </td>';\n } else {\n $out .= '<td>'.$col_name.' </td>';\n }\n }\n $out .= '</tr>';\n }\n $out .= '</table>';\n\n return $out;\n}", "function renderTableData($users_info)\n {\n echo '\n \t<tr>\n \t<td class=\"column1\">' . $users_info[0] . '</td>\n \t<td class=\"column2\">' . $users_info[2] . '</td>\n \t<td class=\"column2\">' . $users_info[3] . '</td>\n \t<td class=\"column2\">' . $users_info[4] . '</td>\n \t<td class=\"column3\">' . $users_info[1] . '</td>\n \t<td class=\"column4\">' . $users_info[7] . ' ' . $users_info[8] . '</td>\n\t\t\t</tr>\n ';\n }", "private function formatTemplate($template, $replacementMap) {\n\n\t\t$result = $template;\n\t\t\n\t\tif ( $replacementMap !== null ) {\n\t\t\tforeach ( $replacementMap as $mapKey => $mapValue ) {\n\t\t\t\t$result = str_replace( $mapKey, $mapValue, $result );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function getTableContent() {\n\t\treturn \"<tr data-key='\" . $this -> getKey() . \"'><td>\" . $this -> key . \"</td><td contenteditable='true'>\" . $this -> value . \"</td><td>\" . $this -> dataType . \"</td></tr>\";\n\t}", "protected function getTemplate($template, $className)\n {\n $this->template = $this->file->get($template);\n $models = Pluralizer::plural(strtolower($className));\n\n if ($this->needsScaffolding($template))\n {\n $this->template = $this->getScaffoldedModel($className);\n }\n\n\t\t$fields = $this->describeTable($models);\n\t\t$rules = array();\n\t\t$columnList = array();\n\t\tforeach($fields as $field) {\n\t\t\t$rules[] = \"\\t\\t'{$field['name']}' => 'required'\";\n\t\t}\n\t\t$rules = implode(\",\\n\", $rules);\n\n\t\tforeach($fields as $field) {\n\t\t\t$columnList[] = str_pad(\"\\t'{$field['name']}', \", 24) . \"// type: {$field['type']}, default: {$field['default']}\";\n\t\t}\n\t\t$columnList = implode(\"\\n\", $columnList);\n\n\t\t$fks = $this->getForeignKeys($models);\n\t\t$tmpl = $this->file->get(dirname(dirname(__FILE__)).'/Generators/templates/scaffold/relations.txt');\n\t\t$code = array();\n\t\tforeach($fks as $ref) {\n\t\t\t$code[] = str_replace(['{{name}}', '{{model}}'], [$ref['name'], $ref['model']], $tmpl);\n\t\t}\n\t\t$relations = implode(\"\\n\\n\", $code);\n\n $this->template = str_replace('{{className}}', $className, $this->template);\n $this->template = str_replace('{{rules}}', trim($rules), $this->template);\n $this->template = str_replace('{{columnList}}', $columnList, $this->template);\n return str_replace('{{relations}}', $relations, $this->template);\n }", "public function renderItems() {\n\n \t $caption = $this->renderCaption();\n \t $columnGroup = $this->renderColumnGroup();\n \t $tableHeader = $this->showHeader ? $this->renderTableHeader() : false;\n \t $tableBody = $this->renderTableBody();\n \t $tableFooter = $this->showFooter ? $this->renderTableFooter() : false;\n \t $content = array_filter([\n \t$caption,\n \t$columnGroup,\n \t$tableHeader,\n \t$tableFooter,\n \t$tableBody,\n \t ]);\n\n\t return self::html()->tag('table', array('options' => $this->tableOptions, 'content' => implode(\"\\n\", $content)), $this->tableOptions);\n }", "public function getTemplate() {}", "function showListedTemplate($templateName, $output, $tableName, $id) {\n switch ($templateName) {\n case \"default\":\n echo $output[0].\" - \".$output[1];\n break;\n\n case \"no\":\n echo \"no\";\n break;\n\n default:\n echo $tableName . \"<br>\";\n echo $id . \"<br>\";\n print_r($output);\n echo \"<hr>\";\n }\n}", "function useTemplate()\r\n { \t\r\n \t$objDef = self::definition();\r\n \t \t\r\n \t$db = eZDB::instance();\r\n \t$rows = $db->arrayQuery('\r\n \t\tSelect IF( T1.use_template_title IS NULL, FALSE, T1.use_template_title ) as title,\r\n \t\t\t IF( T1.use_template_description IS NULL, FALSE, T1.use_template_description ) as description\r\n \t\tFrom '. $objDef['name']. ' as T0 \r\n \t\tLeft Join opsarss_export_item_template as T1\r\n \t\tOn T0.id = T1.ezrss_export_item_id\r\n \t\tWhere T0.id = '. $this->ID.'\r\n \t');\r\n \t\r\n \treturn $rows[0];\r\n }", "public function run()\n\t{\n\t\t\\DB::table('pdf_templates')->delete();\n \n\t\t\\DB::table('pdf_templates')->insert(array (\n\t\t\t0 => \n\t\t\tarray (\n\t\t\t\t'id' => 1,\n\t\t\t\t'name' => 'Danh sách công ty',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:19:19',\n\t\t\t\t'updated_at' => '2015-08-07 16:38:23',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t1 => \n\t\t\tarray (\n\t\t\t\t'id' => 2,\n\t\t\t\t'name' => 'Danh sách sản phẩm',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Danh S&aacute;ch Sản Phẩm</strong></span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n\n<p>&nbsp;</p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:22:28',\n\t\t\t\t'updated_at' => '2015-08-07 16:38:59',\n\t\t\t\t'oriental' => 'landscape',\n\t\t\t),\n\t\t\t2 => \n\t\t\tarray (\n\t\t\t\t'id' => 3,\n\t\t\t\t'name' => 'Đơn trả nhà cung cấp',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Đơn&nbsp;Trả&nbsp;H&agrave;ng&nbsp;Số {{$id}}</strong></span><br />\n<span style=\"font-size:18px\"><strong>Ng&agrave;y: {{$date}}</strong></span></p>\n\n<p><span style=\"font-size:18px\"><strong>T&ecirc;n nh&agrave; cung cấp:</strong> {{$company_name}} - <strong>ĐC:</strong> {{$address}} - <strong>ĐT:</strong> {{$phone}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\">&nbsp;</td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:20px\"><strong>Nợ cũ</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:20px\"><strong>Toa mới</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:20px\"><strong>Tổng cộng</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><span style=\"font-size:20px\"><strong>{{$no_cu}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:20px\"><strong>{{$toa_moi}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:20px\"><strong>{{$tong_cong}}</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"text-align: center;\">&nbsp;</div>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người nhận h&agrave;ng</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người thu tiền</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người lập</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Trưởng đơn vị</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><br />\n<br />\n<br />\n<br />\n<span style=\"font-size:16px\"><strong>Phan Thị Khuyến Hạnh</strong></span></td>\n</tr>\n</tbody>\n</table>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:36:03',\n\t\t\t\t'updated_at' => '2015-08-07 16:40:54',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t3 => \n\t\t\tarray (\n\t\t\t\t'id' => 4,\n\t\t\t\t'name' => 'Đơn mua hàng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Đơn Mua H&agrave;ng Số {{$id}}</strong></span><br />\n<span style=\"font-size:18px\"><strong>Ng&agrave;y: {{$date}}</strong></span></p>\n\n<p><span style=\"font-size:18px\"><strong>T&ecirc;n nh&agrave; cung cấp:</strong> {{$company_name}} - <strong>ĐC:</strong> {{$address}} - <strong>ĐT:</strong> {{$phone}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\">&nbsp;</td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:20px\"><strong>Nợ cũ</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:20px\"><strong>Toa mới</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:20px\"><strong>Tổng cộng</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><span style=\"font-size:20px\"><strong>{{$no_cu}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:20px\"><strong>{{$toa_moi}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:20px\"><strong>{{$tong_cong}}</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"text-align: center;\">&nbsp;</div>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người nhận h&agrave;ng</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người thu tiền</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người lập</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Trưởng đơn vị</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><br />\n<br />\n<br />\n<br />\n<span style=\"font-size:16px\"><strong>Phan Thị Khuyến Hạnh</strong></span></td>\n</tr>\n</tbody>\n</table>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:36:27',\n\t\t\t\t'updated_at' => '2015-08-07 16:40:43',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t4 => \n\t\t\tarray (\n\t\t\t\t'id' => 5,\n\t\t\t\t'name' => 'Đơn hàng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Đơn H&agrave;ng {{$id}}</strong></span><br />\n<span style=\"font-size:18px\"><strong>Ng&agrave;y: {{$date}}</strong></span></p>\n\n<p><span style=\"font-size:18px\"><strong>T&ecirc;n nh&agrave; cung cấp:</strong> {{$company_name}} - <strong>ĐC:</strong> {{$address}} - <strong>ĐT:</strong> {{$phone}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\">&nbsp;</td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:22px\"><strong>Nợ cũ</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:22px\"><strong>Toa mới</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:22px\"><strong>Tổng cộng</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><span style=\"font-size:22px\"><strong>{{$no_cu}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:22px\"><strong>{{$toa_moi}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:22px\"><strong>{{$tong_cong}}</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"text-align: center;\">&nbsp;</div>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người nhận h&agrave;ng</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người thu tiền</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người lập</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Trưởng đơn vị</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><br />\n<br />\n<br />\n<br />\n<span style=\"font-size:16px\"><strong>Phan Thị Khuyến Hạnh</strong></span></td>\n</tr>\n</tbody>\n</table>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:36:43',\n\t\t\t\t'updated_at' => '2015-08-07 16:40:16',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t5 => \n\t\t\tarray (\n\t\t\t\t'id' => 6,\n\t\t\t\t'name' => 'Đơn hàng đại lý trả',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Đơn H&agrave;ng Đại L&yacute; Trả&nbsp;{{$id}}</strong></span><br />\n<span style=\"font-size:18px\"><strong>Ng&agrave;y: {{$date}}</strong></span></p>\n\n<p><span style=\"font-size:18px\"><strong>T&ecirc;n nh&agrave; cung cấp:</strong> {{$company_name}} - <strong>ĐC:</strong> {{$address}} - <strong>ĐT:</strong> {{$phone}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\">&nbsp;</td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:22px\"><strong>Nợ cũ</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:22px\"><strong>Toa mới</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:22px\"><strong>Tổng cộng</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><span style=\"font-size:22px\"><strong>{{$no_cu}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:22px\"><strong>{{$toa_moi}}</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:22px\"><strong>{{$tong_cong}}</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<div style=\"text-align: center;\">&nbsp;</div>\n\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người nhận h&agrave;ng</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người thu tiền</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Người lập</strong></span></td>\n<td style=\"text-align:center; width:25%\"><span style=\"font-size:16px\"><strong>Trưởng đơn vị</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n<td style=\"text-align:center\"><span style=\"font-size:16px\"><strong>(K&yacute;, họ t&ecirc;n)</strong></span></td>\n</tr>\n<tr>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\">&nbsp;</td>\n<td style=\"text-align:center\"><br />\n<br />\n<br />\n<br />\n<span style=\"font-size:16px\"><strong>Phan Thị Khuyến Hạnh</strong></span></td>\n</tr>\n</tbody>\n</table>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:37:01',\n\t\t\t\t'updated_at' => '2015-08-07 16:40:25',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t6 => \n\t\t\tarray (\n\t\t\t\t'id' => 7,\n\t\t\t\t'name' => 'Danh sách đại lý trả',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Danh S&aacute;ch Đại L&yacute; Trả</strong></span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:37:52',\n\t\t\t\t'updated_at' => '2015-08-07 16:38:32',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t7 => \n\t\t\tarray (\n\t\t\t\t'id' => 8,\n\t\t\t\t'name' => 'Danh sách đơn hàng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Danh S&aacute;ch Đơn H&agrave;ng</strong></span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:38:01',\n\t\t\t\t'updated_at' => '2015-08-07 16:38:43',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t8 => \n\t\t\tarray (\n\t\t\t\t'id' => 9,\n\t\t\t\t'name' => 'Danh sách mua hàng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Danh S&aacute;ch Mua&nbsp;H&agrave;ng</strong></span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:38:13',\n\t\t\t\t'updated_at' => '2015-08-07 16:38:50',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t9 => \n\t\t\tarray (\n\t\t\t\t'id' => 10,\n\t\t\t\t'name' => 'Danh sách trả NCC',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Danh S&aacute;ch Trả H&agrave;ng NCC</strong></span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:38:21',\n\t\t\t\t'updated_at' => '2015-08-07 16:39:09',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t10 => \n\t\t\tarray (\n\t\t\t\t'id' => 11,\n\t\t\t\t'name' => 'Công nợ NCC',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>C&ocirc;ng nợ&nbsp;nh&agrave; cung cấp {{$company_name}}</strong><br />\nTh&aacute;ng {{$month}} Năm {{$year}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:50:13',\n\t\t\t\t'updated_at' => '2015-08-07 16:37:55',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t11 => \n\t\t\tarray (\n\t\t\t\t'id' => 12,\n\t\t\t\t'name' => 'Công nợ NCC tháng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">C&ocirc;ng nợ&nbsp;nh&agrave; cung cấp&nbsp;th&aacute;ng {{$month}} năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:50:45',\n\t\t\t\t'updated_at' => '2015-08-07 16:38:11',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t12 => \n\t\t\tarray (\n\t\t\t\t'id' => 13,\n\t\t\t\t'name' => 'Công nợ NCC năm',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">C&ocirc;ng nợ&nbsp;nh&agrave; cung cấp năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:50:52',\n\t\t\t\t'updated_at' => '2015-08-07 16:38:03',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t13 => \n\t\t\tarray (\n\t\t\t\t'id' => 14,\n\t\t\t\t'name' => 'Công nợ KH năm',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">C&ocirc;ng nợ&nbsp;kh&aacute;ch h&agrave;ng&nbsp;năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:51:05',\n\t\t\t\t'updated_at' => '2015-08-07 16:37:17',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t14 => \n\t\t\tarray (\n\t\t\t\t'id' => 15,\n\t\t\t\t'name' => 'Công nợ KH tháng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">C&ocirc;ng nợ&nbsp;kh&aacute;ch h&agrave;ng&nbsp;th&aacute;ng {{$month}} năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:51:09',\n\t\t\t\t'updated_at' => '2015-08-07 16:37:43',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t15 => \n\t\t\tarray (\n\t\t\t\t'id' => 16,\n\t\t\t\t'name' => 'Công nợ KH',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>C&ocirc;ng nợ&nbsp;kh&aacute;ch h&agrave;ng&nbsp;{{$company_name}}</strong><br />\nTh&aacute;ng {{$month}} Năm {{$year}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:51:14',\n\t\t\t\t'updated_at' => '2015-08-07 16:37:02',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t16 => \n\t\t\tarray (\n\t\t\t\t'id' => 17,\n\t\t\t\t'name' => 'Doanh thu KH',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Doanh thu kh&aacute;ch h&agrave;ng&nbsp;{{$company_name}}</strong><br />\nTh&aacute;ng {{$month}} Năm {{$year}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:51:44',\n\t\t\t\t'updated_at' => '2015-08-07 16:40:09',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t17 => \n\t\t\tarray (\n\t\t\t\t'id' => 18,\n\t\t\t\t'name' => 'Doanh thu KH tháng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.com/http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">Doanh số&nbsp;nh&agrave; cung cấp&nbsp;th&aacute;ng {{$month}} năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:51:50',\n\t\t\t\t'updated_at' => '2015-07-31 15:32:08',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t18 => \n\t\t\tarray (\n\t\t\t\t'id' => 19,\n\t\t\t\t'name' => 'Doanh thu KH năm',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.com/http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">Doanh thu kh&aacute;ch h&agrave;ng&nbsp;năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:51:56',\n\t\t\t\t'updated_at' => '2015-07-31 08:57:29',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t19 => \n\t\t\tarray (\n\t\t\t\t'id' => 20,\n\t\t\t\t'name' => 'Doanh số nhân viên',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Doanh số nh&acirc;n vi&ecirc;n&nbsp;{{$user_name}}</strong><br />\nTh&aacute;ng {{$month}} Năm {{$year}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:52:08',\n\t\t\t\t'updated_at' => '2015-08-07 16:39:50',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t20 => \n\t\t\tarray (\n\t\t\t\t'id' => 21,\n\t\t\t\t'name' => 'Doanh số sản phẩm',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">Doanh số sản phẩm&nbsp;th&aacute;ng {{$month}} năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '2015-07-22 09:52:15',\n\t\t\t\t'updated_at' => '2015-08-07 16:40:02',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t21 => \n\t\t\tarray (\n\t\t\t\t'id' => 22,\n\t\t\t\t'name' => 'Doanh số NCC',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><span style=\"font-size:28px\"><strong>Doanh số nh&agrave; cung cấp&nbsp;{{$company_name}}</strong><br />\nTh&aacute;ng {{$month}} Năm {{$year}}</span></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '2015-08-07 16:39:19',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t22 => \n\t\t\tarray (\n\t\t\t\t'id' => 23,\n\t\t\t\t'name' => 'Doanh số NCC tháng',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">Doanh số&nbsp;nh&agrave; cung cấp&nbsp;th&aacute;ng {{$month}} năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '2015-08-07 16:39:43',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t\t23 => \n\t\t\tarray (\n\t\t\t\t'id' => 24,\n\t\t\t\t'name' => 'Doanh số NCC năm',\n\t\t\t\t'template' => '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%\">\n<tbody>\n<tr>\n<td style=\"height:151px; width:211px\"><span style=\"font-size:20px\"><img alt=\"\" src=\"http://khuongnhi2.local.com/upload/64817163917fef09563ef756685a88d9.jpg\" style=\"float:left; height:151px; width:191px\" /></span></td>\n<td style=\"vertical-align:baseline\"><span style=\"font-size:20px\"><strong>CƠ SỞ MAY KHƯƠNG NHI</strong></span><br />\n<span style=\"font-size:16px\">ĐC: 33/6 ĐƯỜNG SỐ 19, P5, G&Ograve; VẤP<br />\n<strong>SHOP KHƯƠNG NHI</strong><br />\nĐC: 5 ĐINH TI&Ecirc;N HO&Agrave;NG, P3, B&Igrave;NH THẠNH - ĐT&nbsp;<strong>08.&nbsp;35171589</strong><br />\nLi&ecirc;n hệ trực tiếp:&nbsp;<strong>KHƯƠNG NHI&nbsp;0903 681 447</strong><br />\nChăm s&oacute;c kh&aacute;ch h&agrave;ng:&nbsp;<strong>091 88 44 179</strong></span></td>\n</tr>\n</tbody>\n</table>\n\n<p style=\"text-align:center\"><strong><span style=\"font-size:28px\">Doanh số nh&agrave; cung cấp&nbsp;năm {{$year}}</span></strong></p>\n\n<p style=\"text-align:center\"><span style=\"font-size:26px\">{{$table_list}}</span></p>\n',\n\t\t\t\t'created_by' => 0,\n\t\t\t\t'updated_by' => 0,\n\t\t\t\t'created_at' => '0000-00-00 00:00:00',\n\t\t\t\t'updated_at' => '2015-08-07 16:39:35',\n\t\t\t\t'oriental' => 'potrait',\n\t\t\t),\n\t\t));\n\t}", "function print_pure_table($query_result, $headers) {\n echo \"<table class=\\\"pure-table pure-table-bordered\\\">\";\n if ($headers) {\n echo $headers;\n } else {\n echo \"<thead><tr>\";\n for ($i = 0; $i < pg_num_fields($query_result); $i++) {\n $fieldname = pg_field_name($query_result, $i);\n echo \"<th>$fieldname</th>\";\n }\n echo \"</tr></thead>\";\n }\n \n echo \"<tbody>\";\n while ($row = pg_fetch_row($query_result)) {\n echo \"<tr>\";\n $num = pg_num_fields($query_result);\n for ($i = 0; $i < $num; $i++) {\n echo \"<td>$row[$i]</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</tbody>\";\n echo \"</table>\";\n }", "protected function renderInfo() {\n\t\t$ret = '';\n\t\t$ret .= $this->start( 'table' );\n\t\t$ret .= $this->element( 'caption', 'Elements ($info)' );\n\t\tksort( $this->def->info );\n\t\t$ret .= $this->heavyHeader( 'Allowed tags', 2 );\n\t\t$ret .= $this->start( 'tr' );\n\t\t$ret .= $this->element( 'td', $this->listifyTagLookup( $this->def->info ), array( 'colspan' => 2 ) );\n\t\t$ret .= $this->end( 'tr' );\n\t\tforeach ( $this->def->info as $name => $def ) {\n\t\t\t$ret .= $this->start( 'tr' );\n\t\t\t$ret .= $this->element( 'th', \"<$name>\", array( 'class' => 'heavy', 'colspan' => 2 ) );\n\t\t\t$ret .= $this->end( 'tr' );\n\t\t\t$ret .= $this->start( 'tr' );\n\t\t\t$ret .= $this->element( 'th', 'Inline content' );\n\t\t\t$ret .= $this->element( 'td', $def->descendants_are_inline ? 'Yes' : 'No' );\n\t\t\t$ret .= $this->end( 'tr' );\n\t\t\tif ( ! empty( $def->excludes ) ) {\n\t\t\t\t$ret .= $this->start( 'tr' );\n\t\t\t\t$ret .= $this->element( 'th', 'Excludes' );\n\t\t\t\t$ret .= $this->element( 'td', $this->listifyTagLookup( $def->excludes ) );\n\t\t\t\t$ret .= $this->end( 'tr' );\n\t\t\t}\n\t\t\tif ( ! empty( $def->attr_transform_pre ) ) {\n\t\t\t\t$ret .= $this->start( 'tr' );\n\t\t\t\t$ret .= $this->element( 'th', 'Pre-AttrTransform' );\n\t\t\t\t$ret .= $this->element( 'td', $this->listifyObjectList( $def->attr_transform_pre ) );\n\t\t\t\t$ret .= $this->end( 'tr' );\n\t\t\t}\n\t\t\tif ( ! empty( $def->attr_transform_post ) ) {\n\t\t\t\t$ret .= $this->start( 'tr' );\n\t\t\t\t$ret .= $this->element( 'th', 'Post-AttrTransform' );\n\t\t\t\t$ret .= $this->element( 'td', $this->listifyObjectList( $def->attr_transform_post ) );\n\t\t\t\t$ret .= $this->end( 'tr' );\n\t\t\t}\n\t\t\tif ( ! empty( $def->auto_close ) ) {\n\t\t\t\t$ret .= $this->start( 'tr' );\n\t\t\t\t$ret .= $this->element( 'th', 'Auto closed by' );\n\t\t\t\t$ret .= $this->element( 'td', $this->listifyTagLookup( $def->auto_close ) );\n\t\t\t\t$ret .= $this->end( 'tr' );\n\t\t\t}\n\t\t\t$ret .= $this->start( 'tr' );\n\t\t\t$ret .= $this->element( 'th', 'Allowed attributes' );\n\t\t\t$ret .= $this->element( 'td', $this->listifyAttr( $def->attr ), array(), 0 );\n\t\t\t$ret .= $this->end( 'tr' );\n\n\t\t\tif ( ! empty( $def->required_attr ) ) {\n\t\t\t\t$ret .= $this->row( 'Required attributes', $this->listify( $def->required_attr ) );\n\t\t\t}\n\n\t\t\t$ret .= $this->renderChildren( $def->child );\n\t\t}\n\t\t$ret .= $this->end( 'table' );\n\n\t\treturn $ret;\n\t}", "function column_template_name($item) {\n $arr_params = array( 'template' => $item->template_id, 'catpdf_action' => 'edit' );\n $editlink = add_query_arg($arr_params);\n\t\t\n $arr_params = array( 'template' => $item->template_id, 'catpdf_action' => 'delete' );\n $deletelink = add_query_arg($arr_params);\n\t\t\n $actions = array(\n 'edit' => '<a href=\"' . $editlink . '\">Edit</a>',\n 'delete' => '<a href=\"' . $deletelink . '\">Delete</a>'\n );\n return sprintf('<strong><a href=\"' . $editlink . '\" title=\"Edit\">%1$s</a></strong> %2$s', $item->template_name, $this->row_actions($actions));\n }", "public function prepareDataTemplate(iTemplate $template) {\n\t\t\t$hierarchy = umiHierarchy::getInstance();\n\n\t\t\t$data = array();\n\t\t\t$info = array();\n\t\t\t$info['attribute:id'] = $template->getId();\n\t\t\t$info['attribute:name'] = $template->getName();\n\t\t\t$info['attribute:title'] = $template->getTitle();\n\t\t\t$info['attribute:filename'] = $template->getFileName();\n\t\t\t$info['attribute:type'] = $template->getType();\n\t\t\t$info['attribute:lang-id'] = $template->getLangId();\n\t\t\t$info['attribute:domain-id'] = $template->getDomainId();\n\n\t\t\t$used_pages = $template->getUsedPages();\n\n\t\t\t$pages = array();\n\t\t\t$hierarchyTypes = array();\n\t\t\tforeach($used_pages as $element_info) {\n\t\t\t\t$element = $hierarchy->getElement($element_info[0]);\n\t\t\t\tif($element instanceof umiHierarchyElement) {\n\t\t\t\t\t$element_id = $element->getId();\n\t\t\t\t\t$page_arr['attribute:id'] = $element_id;\n\t\t\t\t\t$page_arr['xlink:href'] = \"upage://\" . $element_id;\n\t\t\t\t\t$elementTypeId = $element->getTypeId();\n\t\t\t\t\tif ( !isset($hierarchyTypes[$elementTypeId]) ) {\n\t\t\t\t\t\t$hierarchyTypes[$elementTypeId] = selector::get('hierarchy-type')->id($elementTypeId);\n\t\t\t\t\t}\n\t\t\t\t\t$page_arr['basetype'] = $hierarchyTypes[$elementTypeId];\n\t\t\t\t\t$page_arr['name'] = str_replace(\"\\\"\", \"\\\\\\\"\", $element->getName());\n\t\t\t\t\t$pages[] = $page_arr;\n\t\t\t\t}\n\t\t\t\t$hierarchy->unloadElement($element_info[0]);\n\t\t\t}\n\t\t\t$info['used-pages']['nodes:page'] = $pages;\n\t\t\t$data['template'] = $info;\n\t\t\treturn $data;\n\t\t}", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "function table()\n {\n return array('pattern' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,\n 'created' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL);\n }", "public function write() {\n\t\t$table = '<table '.$this->addHTML.'>';\n\t\tif(!is_null($this->tableInfo['head'])) {\n\t\t\t$table .= '<thead><tr>';\n\t\t\tforeach($this->tableInfo['head'] as $value) {\n\t\t\t\t$table .= '<th>'.$value.'</th>';\n\t\t\t}\n\t\t\tif($this->crud) {\n\t\t\t\t\t$table .= '<th>Options</th>';\t\n\t\t\t}\n\t\t\t$table .= '</tr></thead>';\n\t\t}\n\t\t$table .= '<tbody>';\n\t\tif(isset($this->tableInfo['rows'])) {\n\t\t\tforeach($this->tableInfo['rows'] as $row) {\n\t\t\t\t$table .= '<tr>';\n\t\t\t\tforeach($row as $key => $column) {\n\t\t\t\t\tif(($key != $this->crud_id) OR $this->show_crud_id) {\n\t\t\t\t\t\t$table .= '<td>'.$column.'</td>';\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($this->crud && isset($row[$this->crud_id])) {\n\t\t\t\t\t$table .= '<td>';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Details/'.$row[$this->crud_id].'\" title=\"Details\"><i class=\"fa fa-search\"></i></a> | ';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Edit/'.$row[$this->crud_id].'\" title=\"Edit\"><i class=\"fa fa-wrench\"></i></a> | ';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Delete/'.$row[$this->crud_id].'\" title=\"Delete\"><i class=\"fa fa-trash\"></i></a>';\n\t\t\t\t\t$table .= '</td>';\n\t\t\t\t}\n\t\t\t\t$table .= '</tr>';\n\t\t\t}\n\t\t} else {\n\t\t\t$table .= '<tr>';\n\t\t\t$table .= '<td>';\n\t\t\t$table .= 'No Data to show here.';\n\t\t\t$table .= '</td>';\n\t\t\t$table .= '</tr>';\t\n\t\t}\n\t\t\n\t\t$table .= '</tbody></table>';\n\t\treturn $table;\n\t}", "public function templateStrings(){\n \n foreach($this->rules as $field => $rules){\n $array[$field] = array(\n 'rules' => $this->renderRules($field),\n 'value' => $this->value($field) \n );\n }\n \n $array['form_token'] = $this->renderToken();\n \n return $array;\n }", "function it_should_make_the_example_table()\n {\n \t$table = '| Tables | Are | Cool |' . PHP_EOL . \n\t\t\t\t '|----------|:-------------:|------:|' . PHP_EOL .\n\t\t\t\t '| col 1 is | left-aligned | $1600 |' . PHP_EOL .\n\t\t\t\t '| col 2 is | centered | $12 |' . PHP_EOL .\n\t\t\t\t '| col 3 is | right-aligned | $1 |' . PHP_EOL;\n\n \t$this->headers(['Tables','Are','Cool']) //headers\n\t\t\t->align(['L','C','R']) // set column alignment\n\t\t\t->rows([ // add multiple rows at once\n\t\t\t\t['col 1 is', 'left-aligned', '$1600'],\n\t\t\t\t['col 2 is', 'centered', '$12'],\n\t\t\t])\n\t\t\t->row(['col 3 is', 'right-aligned', '$1'])\n\t\t\t->render()\n\t\t\t->shouldReturn($table);\n }", "public function template() {\n return labelTemplate::where([\n ['CUSTOMER',$this->CUSTOMER],\n ['TMPCODE',$this->TEMPLATE],\n ])->first();\n }", "public function build_table()\n {\n if (count($this->properties) > 0)\n {\n foreach ($this->properties as $property => $values)\n {\n $contents = array();\n $contents[] = $property;\n \n if (! is_array($values))\n {\n $values = array($values);\n }\n \n if (count($values) > 0)\n {\n foreach ($values as $value)\n {\n $contents[] = $value;\n }\n }\n \n $this->addRow($contents);\n }\n \n $this->setColAttributes(0, array('class' => 'header'));\n }\n else\n {\n $contents = array();\n $contents[] = Translation::get('NoResults', null, Utilities::COMMON_LIBRARIES);\n $row = $this->addRow($contents);\n $this->setCellAttributes($row, 0, 'style=\"font-style: italic;text-align:center;\" colspan=2');\n }\n }", "public function template()\n\t{\n\t\t$filename = 'template-channeling'; // set filename for csv file to be exported\n\n\t\t$nm_column = array(\n\t\t\t'REK_PEMBAYARAN',\n\t\t\t'NOMORCIF',\n\t\t\t'NAMA_KOPERASI',\n\t\t\t'KD_CABANG',\n\t\t\t'TAHAP_CAIR',\n\t\t\t'NAMA_PERUSAHAAN'\n\t\t);\n\n\t\t$csv_header = '';\n\t\tforeach ($nm_column as $key => $col) {\n\t\t\t$csv_header .= $col . '|';\n\t\t}\n\t\t$csv_header .= \"\\n\";\n\n\t\t$csv_row = '7081935337|79207999|KOPEDANA|ID0010520|1|PT CAHAYA ABADI|';\n\t\t$csv_row .= \"\\n\";\n\n\t\t/* Download as CSV File */\n\t\theader('Content-type: application/csv');\n\t\theader('Content-Disposition: attachment; filename=' . $filename . '.csv');\n\t\techo $csv_header . $csv_row;\n\t\texit;\n\t}", "function multiple_arrayDisplay($multiple_array)\n{\n $r = '';\n $r .= '<style> td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n foreach ($multiple_array[0] as $key => $value) {\n $r .= '<th>'.$key.'</th>';\n }\n $r .= '</tr>';\n foreach ($multiple_array as $key => $value) {\n $r .= '<tr>';\n foreach ($value as $key1 => $value1) {\n if ($key1 == 'price') {\n $r .= '<td> $'.$value1.' </td>';\n } else {\n $r .= '<td>'.$value1.' </td>';\n }\n }\n $r .= '</tr>';\n }\n $r .= '</table>';\n\n return $r;\n}", "function multiple_arrayDisplay($multiple_array)\n{\n $r = '';\n $r .= '<style> td,th{border: solid 2px black;}</style>';\n $r .= '<table>';\n $r .= '<tr>';\n foreach ($multiple_array[0] as $key => $value) {\n $r .= '<th>'.$key.'</th>';\n }\n $r .= '</tr>';\n foreach ($multiple_array as $key => $value) {\n $r .= '<tr>';\n foreach ($value as $key1 => $value1) {\n if ($key1 == 'price') {\n $r .= '<td> $'.$value1.' </td>';\n } else {\n $r .= '<td>'.$value1.' </td>';\n }\n }\n $r .= '</tr>';\n }\n $r .= '</table>';\n\n return $r;\n}", "public function makeTable($headings, $content);", "public static function format($str, $template) {}", "protected function display($templateData) {\n }", "function make_table($table) {\n return print_table($table, true);\n}", "private function createFileHeadings() {\n\t\t// Allow other plugins to add their own column headers\n\t\t$headings = elgg_trigger_plugin_hook('row:headers', 'userexport', array(), $this->fields);\n\n\t\t// Attempt to translate the fields\n\t\tforeach ($headings as $key => $field) {\n\t\t\t$lang_string = \"profile:{$field}\";\n\t\t\t$heading = elgg_echo($lang_string);\n\n\t\t\t// No translation was found, fall back to the original string\n\t\t\tif ($heading === $lang_string) {\n\t\t\t\t$heading = elgg_echo($field);\n\t\t\t}\n\n\t\t\t$headings[$key] = $heading;\n\t\t}\n\n\t\t$this->writeToCSV($headings);\n\t}", "private function get_template( $table ) {\n\t\t$template = new \\WordPress\\CMS\\Template( 'record/admin.html' );\n\t\t$template->table = $table;\n\t\t$template->controller = 'record';\n\t\treturn $template;\n\t}", "public function template_details( $templates ) {\n\n\t\t$templates[] = array(\n\t\t\t'name' => $this->name,\n\t\t\t'slug' => $this->slug,\n\t\t\t'description' => $this->description,\n\t\t\t'includes' => $this->includes,\n\t\t\t'icon' => $this->icon,\n\t\t);\n\n\t\treturn $templates;\n\t}", "function resultsToTable($results) {\n\t$html = \"<table border='1' cellspacing='0' cellpadding='2'>\\n\";\n\t$html .= \"<tr>\\n<th>ID</th>\\n<th>Name</th>\\n<th>Address</th>\\n<th></th>\\n\";\n\t$html .= \"<th>Region</th>\\n<th>State</th>\\n<th>Status</th>\\n\";\n\t$html .= \"<th>Deactivation Date</th>\\n<th>PWS Type</th>\\n</tr>\";\n\tforeach($results as $object) {\n\t\t$html .= \"\\n<tr>\\n<td>{$object->PWSID}</td>\\n<td>{$object->PWS_NAME}</td>\\n\";\n\t\t$html .= \"<td>{$object->ADDRESS_LINE1}</td>\\n<td>{$object->ADDRESS_LINE2}</td>\\n\";\n\t\t$html .= \"<td>{$object->EPA_REGION}</td>\\n\";\n\t\t$html .= \"<td>{$object->STATE_CODE}</th>\\n<td>{$object->SUBMISSION_STATUS_CODE}</td>\\n\";\n\t\t$html .= \"<td>{$object->PWS_DEACTIVATION_DATE}</td>\\n<td>{$object->PWS_TYPE_CODE}</td>\\n\";\n\t\t$html .= \"</tr>\\n\";\n\t}\n\treturn $html . \"</table>\\n\";\n}", "public function renderTableBody() {\n //$models = array_values($this->dataProvider->getModels());\n //$keys = $this->dataProvider->getKeys();\n $rows = [];\n \n foreach ($this->dataProvider as $model) {\n if (is_callable($this->beforeRow)) {\n $row = call_user_func($this->beforeRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows)) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n } else {\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }\n }", "public function formatFields($fields) {\n\n $templateFields = collect($fields);\n\n // Get sections first\n $sections = $templateFields->unique('section')->map(function ($section) {\n return $section['section'];\n });\n\n // Labels for web icons\n $icons = [\n 'Body' => 'view_quilt',\n 'Header' => 'view_stream',\n 'Main' => 'view_headline',\n 'Footer' => 'view_stream'\n ];\n\n $array = [];\n\n $sections->each(function ($item) use ($templateFields, $icons, &$array) {\n\n // Get field elements that are not connected with anything and match this section\n $parentFields = $templateFields->filter(function ($field) use ($item) {\n return !isset($field['connectedWith']) && $field['section'] == $item;\n });\n\n $array[$item]['id'] = str_random(10);\n $array[$item]['section_title'] = $item;\n $array[$item]['icon'] = (isset($icons[$item]) ? $icons[$item] : false);\n\n // Set field-set to $array\n $array[$item]['fields'] = $parentFields->map(function($field, $key) use ($templateFields) {\n\n $parentFieldName = $field['name'];\n\n // Get children for the parent field\n $children = $templateFields->filter(function ($field) use ($parentFieldName) {\n return isset($field['connectedWith']) && $field['connectedWith'] == $parentFieldName;\n });\n\n // Handle multiple color fields, merge into one\n $children = $children->each(function ($index, $key) use (&$children) {\n\n if (count($children) > 1 && $children[$key]['type'] == 'color') {\n\n $children->except($key)->each(function($secondChild, $secondChildKey) use ($key, &$children) {\n if (isset($secondChild['type']) && $secondChild['type'] == 'color' && key($secondChild) != $key) {\n // Set up array if it hasn't been done yet\n if (isset($children[$key]['type']) && $children[$key]['type'] == 'color') {\n $children[$key] = [\n 'type' => 'multipleColor',\n 'attributes' => $children[$key]['attributes'],\n 'colorPickerPosition' => (isset($children[$key]['colorPickerPosition']) ? $children[$key]['colorPickerPosition'] : ''),\n 'value' => [$children[$key]]\n ];\n }\n $children->forget($secondChildKey);\n\n $temp = $children[$key];\n $temp['attributes'] = array_merge($children[$key]['attributes'], $secondChild['attributes']);\n $temp['value'][] = $secondChild;\n\n $children[$key] = $temp;\n }\n });\n\n }\n return $children;\n });\n\n\n // Only sets 'children' variable when children are available\n if (count($children) > 0)\n $field['children'] = $children;\n\n return $field;\n });\n\n });\n\n return $array;\n }", "function ReplaceContentOneRow( $row, $template_html )\n{\n //replace fields with values in template\n $content = $template_html;\n foreach($row as $field => $value)\n {\n $content = str_replace(\"@@$field@@\", $value, $content);\n }\n\n return $content;\n}", "function ReplaceContentOneRow( $row, $template_html )\n{\n //replace fields with values in template\n $content = $template_html;\n foreach($row as $field => $value)\n {\n $content = str_replace(\"@@$field@@\", $value, $content);\n }\n\n return $content;\n}", "public function run()\n\t{\n\t\tDB::table('content_layout_templates')->truncate();\n\n\t\t$timestamp = date('Y-m-d H:i:s');\n\n\t\t$templates = [\n\t\t\t[\n\t\t\t\t'name' => 'Standard',\n\t\t\t\t'layout' => \"<div class=\\\"row\\\">\\n\\t<div class=\\\"col-md-12\\\">{{main}}</div>\\n</div>\",\n\t\t\t\t'static' => true,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Standard with Side (Left)',\n\t\t\t\t'layout' => \"<div class=\\\"row\\\">\\n\\t<div class=\\\"col-md-3\\\"><div class=\\\"content-side\\\">{{side}}</div></div>\\n\\t<div class=\\\"col-md-9\\\">{{main}}</div>\\n</div>\",\n\t\t\t\t'static' => true,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Standard with Side (Right)',\n\t\t\t\t'layout' => \"<div class=\\\"row\\\">\\n\\t<div class=\\\"col-md-9\\\">{{main}}</div>\\n\\t<div class=\\\"col-md-3\\\"><div class=\\\"content-side\\\">{{side}}</div></div>\\n</div>\",\n\t\t\t\t'static' => true,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Standard with Image',\n\t\t\t\t'layout' => \"<div class=\\\"row\\\">\\n\\t<div class=\\\"col-sm-2\\\">{{image}}</div>\\n\\t<div class=\\\"col-sm-10\\\">{{main}}</div>\\n</div>\",\n\t\t\t\t'static' => true,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => '2 Columns',\n\t\t\t\t'layout' => \"<div class=\\\"row\\\">\\n\\t<div class=\\\"col-md-6\\\">{{column-1}}</div>\\n\\t<div class=\\\"col-md-6\\\">{{column-2}}</div>\\n</div>\",\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => '3 Columns',\n\t\t\t\t'layout' => \"<div class=\\\"row\\\">\\n\\t<div class=\\\"col-md-4\\\">{{column-1}}</div>\\n\\t<div class=\\\"col-md-4\\\">{{column-2}}</div>\\n\\t<div class=\\\"col-md-4\\\">{{column-3}}</div>\\n</div>\",\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => '4 Columns',\n\t\t\t\t'layout' => \"<div class=\\\"row\\\">\\n\\t<div class=\\\"col-md-3\\\">{{column-1}}</div>\\n\\t<div class=\\\"col-md-3\\\">{{column-2}}</div>\\n\\t<div class=\\\"col-md-3\\\">{{column-3}}</div>\\n\\t<div class=\\\"col-md-3\\\">{{column-4}}</div>\\n</div>\",\n\t\t\t],\n\t\t];\n\n\t\tforeach ($templates as $template)\n\t\t{\n\t\t\t$template['created_at'] = $timestamp;\n\t\t\t$template['updated_at'] = $timestamp;\n\n\t\t\tDB::table('content_layout_templates')->insert($template);\n\t\t}\n\t}", "function toPlainTable($data)\n{\n\t$keys = $data[0];\n\t$keys = array_flip($keys);\n\t$result = '';\n\tforeach($keys as $key)\n\t{\n\t\t$result .= $key . ' ';\n\t}\n\t$result .= \"\\n\";\n\tforeach($data as $item)\n\t{\n\t\tforeach($item as $value)\n\t\t{\n\t\t\t$result .= $value . ' ';\n\t\t}\n\t\t$result .= \"\\n\";\n\t}\n\treturn $result;\n}", "function get_fields_from_template($tpl){\n global $smarty;\n global $FIELDS;\n $tpl = $smarty->template_dir.'/'.$tpl;\n $data = @file_get_contents($tpl);\n $matches = array();\n preg_match_all('/\\$entry\\.(\\w+)/',$data,$matches);\n $matches = array_unique((array) $matches[1]);\n $return = array();\n foreach($matches as $f){\n if($FIELDS[$f]){\n $return[] = $FIELDS[$f];\n }elseif($FIELDS[\"_$f\"]){\n $return[] = $FIELDS[\"_$f\"];\n }elseif($f = 'markers'){\n $return[] = 'marker';\n }\n }\n return $return;\n}", "function print_table($database_connection, $table_name) {\r\n\r\n $attributes = get_attributes($database_connection, $table_name);\r\n $tuples = get_rows($database_connection, $table_name);\r\n\r\n print(\"<table>\\n\");\r\n print(\"<tr>\\n\");\r\n for($i = 0; $i < count($attributes); $i++) {\r\n print(\"<th>{$attributes[$i]}</th>\\n\");\r\n }\r\n print(\"</tr>\\n\");\r\n for($j = 0; $j < count($tuples); $j++) {\r\n print(\"<tr>\\n\");\r\n foreach($attributes as $attribute) {\r\n print(\"<td>{$tuples[$j][$attribute]}</td>\\n\");\r\n }\r\n print(\"</tr>\\n\");\r\n }\r\n\r\n print(\"</table>\\n\");\r\n }" ]
[ "0.69035006", "0.6461349", "0.63220006", "0.6233582", "0.6224716", "0.6221344", "0.61153215", "0.6110357", "0.61082923", "0.6063199", "0.6023027", "0.60137963", "0.60001534", "0.5992872", "0.5954115", "0.59481657", "0.5946101", "0.5880612", "0.58420336", "0.58179057", "0.58085734", "0.5804826", "0.5802599", "0.57985103", "0.5787874", "0.5767587", "0.57405764", "0.5735924", "0.5735704", "0.5722156", "0.57203907", "0.57050735", "0.56938446", "0.5679147", "0.567331", "0.566437", "0.5636627", "0.56281966", "0.5614167", "0.56010437", "0.5583263", "0.55758995", "0.5562683", "0.55620825", "0.55606323", "0.5544598", "0.55354357", "0.5531376", "0.5516126", "0.55123335", "0.5496156", "0.5491958", "0.5484922", "0.5479725", "0.54757684", "0.54680264", "0.5451159", "0.54495305", "0.5446253", "0.5441659", "0.54396075", "0.54356354", "0.5433415", "0.5431283", "0.5426573", "0.5424796", "0.542004", "0.5419707", "0.5419083", "0.5418252", "0.5418252", "0.5418252", "0.5418252", "0.5418252", "0.5418252", "0.54156125", "0.54133576", "0.54102415", "0.5407146", "0.54070306", "0.54028624", "0.540175", "0.53988755", "0.53988755", "0.5395344", "0.539478", "0.5387053", "0.53862023", "0.53857744", "0.5384949", "0.53842354", "0.5373607", "0.5370354", "0.5368898", "0.5363449", "0.5363449", "0.53632295", "0.5361549", "0.53581744", "0.5357272" ]
0.665865
1
Theme content type settings
function theme_notifications_content_type_settings(&$elements) { $output = ''; $options = _notifications_content_type_options(); $header = array_merge(array(''), array_values($options)); $rows = array(); foreach (element_children($elements) as $key) { $row = array($elements[$key]['#title']); unset($elements[$key]['#title']); foreach (array_keys($options) as $index) { unset($elements[$key][$index]['#title']); $row[] = drupal_render($elements[$key][$index]); } $rows[] = $row; } $output .= theme('table', array('header' => $header, 'rows' =>$rows)); $output .= drupal_render($elements); return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tsc_theme_options() {\n\tadd_theme_page( 'Theme Options', 'Theme Options', 'edit_theme_options', 'theme_options', 'tsc_theme_options_page' );\n}", "function register_content_type( $singular, $plural, $type, $ns = 'theme' )\n{\n // Hook into the 'init' action\n add_action( 'init', function() use ( $singular, $plural, $type, $ns ) {\n\n $labels = [\n 'name' => _x( $plural, 'Post Type General Name', $ns ),\n 'singular_name' => _x( $singular, 'Post Type Singular Name', $ns ),\n 'menu_name' => __( $plural, $ns ),\n 'parent_item_colon' => __( 'Parent ' . $singular . ':', $ns ),\n 'all_items' => __( 'All ' . $plural, $ns ),\n 'view_item' => __( 'View ' . $singular, $ns ),\n 'add_new_item' => __( 'Add New ' . $singular, $ns ),\n 'add_new' => __( 'Add New', $ns ),\n 'edit_item' => __( 'Edit ' . $singular, $ns ),\n 'update_item' => __( 'Update ' . $singular, $ns ),\n 'search_items' => __( 'Search ' . $plural, $ns ),\n 'not_found' => __( 'Not found', $ns ),\n 'not_found_in_trash' => __( 'Not found in Trash', $ns ),\n ];\n $args = [\n 'label' => __( $singular, $ns ),\n 'description' => __( $plural, $ns ),\n 'labels' => $labels,\n 'supports' => [ 'title', 'editor', 'custom-fields', 'thumbnail' ],\n 'taxonomies' => [ 'category', 'post_tag' ],\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n ];\n register_post_type( $type, $args );\n\n }, 0 );\n}", "function theme_content($type) {\n global $theme;\n\n $id = (isset($_REQUEST['id'])) ? intval($_REQUEST['id']) : 0;\n $type = filter_var($type);\n $output = '';\n\n switch ($type) {\n\n case 'image'; // gallery image\n $image = new UN_Gallery();\n $bload = $image->load($id);\n if ($bload) {\n $output .= '<img alt=\"'.$image->origname . '\" src=\"'. LC_UPLOAD . $image->filename.'\"/>'; \n }\n break;\n\n case 'gallery': // gallery thumbnails\n $gallery = new UN_Gallery();\n $where = ' a.catid = '. $id;\n $res = $gallery->pager($pager, $numrows, null, $where);\n\n if ($res) {\n $output .= '<p>';\n while($row = $res->fetch()) {\n $url = 'popup.php?t=image&amp;id='.$row['imgid'].theme_global_url();\n $output .= '<a href=\"'.$url.'\"'.\n ' target=\"_blank\" onClick=\"openWindow(\\''.$url.'\\');return false\"><img alt=\"'.$row['origname'] .\n '\" src=\"'. LC_UPLOAD . 'thumb_'. $row['filename'].'\" border=\"0\" vspace=\"6\" hspace=\"6\"/></a>'; \n } \n $output .= '</p>';\n }\n $output .= $pager->display();\n break;\n\n case 'categories': // gallery categories\n $cat = new UN_GalleryCat();\n $aCats = $cat->getGalleryCats();\n $aTranslations = array();\n $langid = 0;\n if(isset($_REQUEST['langid'])) {\n $langid = (int)$_REQUEST['langid'];\n $tr = new UN_Translate();\n $aTranslations = $tr->getAllTexts($langid);\n }\n foreach($aCats as $catid=>$cattitle) {\n $cattitle = ($langid > 0 && isset($aTranslations[$catid]['gallerycat'])) ? \n $aTranslations[$catid]['gallerycat'] :\n $cattitle;\n $output .= '<p><a href=\"index.php?t=gallery&amp;id='. $catid . theme_global_url(). '\"> ' . $cattitle . '</a></p>';\n }\n break;\n case 'page':// content\n $page = new UN_Content();\n $bload = $page->load($id); \n if ($bload) {\n $output .= '<h2 id=\"title\">'.$page->pagetitle.'</h2>'.$page->pagedetail;\n }\n break;\n case 'news':// news\n $news = new UN_News();\n if ($id > 0) { // load specific news\n $bload = $news->load($id); \n if ($bload) {\n $output .= '<h2 id=\"title\">'.$news->newstitle.'</h2>'.$news->newsdetail;\n }\n } else {\n // load all news with paginate\n $langid = (isset($_REQUEST['langid'])) ? intval($_REQUEST['langid']) : 0;\n $where = ($langid > 0) ? ' langid='.$langid : '';\n $res = $news->pager($pager, $numrows, null, $where); \n if ($res) {\n $output .= '<h2 id=\"title\">'._('News').'</h2>';\n while($row = $res->fetch()) {\n $output .= '<p><a href=\"index.php?t=news&amp;id='. \n $row['newsid'].theme_global_url().'\">'.$row['newstitle'].'</a></p><p>' .\n truncate(clearCodes($row['newsdetail']),400) .'</p>'; \n }\n $output .= $pager->display();\n }// end res\n } // end else\n break;\n }\n return $output;\n}", "public function getTheme();", "function mintshow_theme_setup() {\n \n /**\n * Make theme available for translation.\n * Translations can be placed in the /languages/ directory.\n */\n load_theme_textdomain( 'myfirsttheme', get_template_directory() . '/languages' );\n \n /**\n * Add default posts and comments RSS feed links to <head>.\n */\n add_theme_support( 'automatic-feed-links' );\n \n /**\n * Enable support for post thumbnails and featured images.\n */\n add_theme_support( 'post-thumbnails' );\n \n /**\n * Add support for two custom navigation menus.\n */\n register_nav_menus( array(\n 'primary' => __( 'Primary Menu', 'myfirsttheme' ),\n 'secondary' => __('Secondary Menu', 'myfirsttheme' )\n ) );\n \n /**\n * Enable support for the following post formats:\n * aside, gallery, quote, image, and video\n */\n add_theme_support( 'post-formats', array ( 'aside', 'gallery', 'quote', 'image', 'video' ) );\n}", "function content_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Content Types', 'Taxonomy General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'Content Type', 'Taxonomy Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'Content Type', 'text_domain' ),\n\t\t'all_items' => __( 'All Items', 'text_domain' ),\n\t\t'parent_item' => __( 'Parent Item', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n\t\t'new_item_name' => __( 'New Item Name', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Item', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Item', 'text_domain' ),\n\t\t'update_item' => __( 'Update Item', 'text_domain' ),\n\t\t'view_item' => __( 'View Item', 'text_domain' ),\n\t\t'separate_items_with_commas' => __( 'Separate items with commas', 'text_domain' ),\n\t\t'add_or_remove_items' => __( 'Add or remove items', 'text_domain' ),\n\t\t'choose_from_most_used' => __( 'Choose from the most used', 'text_domain' ),\n\t\t'popular_items' => __( 'Popular Items', 'text_domain' ),\n\t\t'search_items' => __( 'Search Items', 'text_domain' ),\n\t\t'not_found' => __( 'Not Found', 'text_domain' ),\n\t\t'no_terms' => __( 'No items', 'text_domain' ),\n\t\t'items_list' => __( 'Items list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => true,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_tagcloud' => true,\n\t\t'has-archive'\t\t\t\t => true\n\t);\n\tregister_taxonomy( 'content_type', array( 'post' ), $args );\n\n}", "public function setup_theme()\n {\n }", "public function getDesignTheme();", "function theme(&$content) {\n global $theme;\n $t = PT_THEME . $theme->theme . '/index.php';\n if(file_exists($t)){\n include $t;\n }\n}", "function yt_bbpress_after_setup_theme(){\r\n\t//forum\r\n\tadd_post_type_support( 'forum', 'thumbnail' );\r\n\t//add_post_type_support( 'topic', 'thumbnail' );\r\n\r\n}", "function prso_init_theme_post_types() {\n\t\n\t//Init vars\n\tglobal $prso_posttype_admin_icon;\n\t$file_path = plugin_dir_path( __FILE__ ) . \"theme-post-types\";\n\t\n\t$prso_posttype_admin_icon = get_stylesheet_directory_uri() . '/images/admin/custom_post_icon.png';\n\t\n\t//include_once( $file_path . '/cuztom-post-type_TEMPLATE.php' );\n\t\n}", "protected function _content_template()\n {\n ?>\n <#\n view.addInlineEditingAttributes( 'blog_content_top', 'none' );\n view.addInlineEditingAttributes( 'blog_content_middle', 'none' );\n view.addInlineEditingAttributes( 'blog_content_bottom', 'none' );\n console.log(settings);\n #>\n <div class=\"tabs tabs-article\" data-tabs=\"secondary\">\n <div data-tab=\"blog\" class=\"blog active\">\n <div class=\"hero\">\n </div>\n\n <div class=\"columnar\">\n <div class=\"columns-twelve\">\n <a href=\"#\" class=\"article-category\">Cryptocurrency</a>\n <h1>{{{ settings.page_title }}}</h1>\n <div class=\"subtitle-article\">{{{ settings.page_subtitle }}}</div>\n </div>\n </div>\n\n <div class=\"columnar article-share\">\n\n <div class=\"share-social-info columns-four-one\">\n <div class=\"photo\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/drawkit-folder-man-colour.svg\"></div>\n <div class=\"text-wrap\">\n <div class=\"text\">Permission</div>\n <a href=\"#\">@permissionIO</a>\n </div>\n </div>\n <div class=\"share-social-icons columns-four-nine\">\n <div class=\"share-text\">share</div>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/tw-icon.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/fa-icon.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/LinkedInLogo.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/reddit.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/telegram.svg\"></a>\n </div>\n\n </div>\n\n <div class=\"columnar article-img\">\n <div class=\"columns-twelve\">\n <img src=\"/wp-content/plugins/elementor-custom-widgets/assets/img-e.png\">\n <p>Source</p>\n </div>\n </div>\n\n <div class=\"columnar article-date\">\n <div class=\"columns-eight\">\n <p>PUBLISHED </p>\n </div>\n </div>\n <div class=\"columnar article-content\">\n <div class=\"columns-eight\">\n <p>{{{ settings.blog_content_top }}}</p>\n <div class=\"wp-block-considerable-quote left\">\n <div class=\"quote\">{{{ settings.the_quote }}}</div>\n </div>\n\n {{{ settings.blog_content_middle }}}\n\n {{{ settings.blog_content_bottom }}}\n <div class=\"tags\">TAGS: List of tags</div>\n <div class=\"share-social-icons\">\n <div class=\"share-text\">share</div>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/tw-icon.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/fa-icon.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/LinkedInLogo.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/reddit.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/telegram.svg\"></a>\n </div>\n </div>\n </div>\n\n <div class=\"columnar article-nav\">\n <div class=\"columns-four-two\">\n <div class=\"text\">Previous Post</div>\n <a href=\"\">Previous post title</a>\n </div>\n <div class=\"columns-four-eight\">\n <div class=\"text\">Next Post</div>\n <a href=\"\">Next post title</a>\n </div>\n </div>\n </div>\n </div>\n <?php\n }", "function cpotheme_metadata_theme()\n{\n $cpotheme_data = array();\n\n $cpotheme_data[] = array(\n 'name' => 'download_title',\n 'std' => '',\n 'label' => 'Título del Producto',\n 'type' => 'text',\n 'desc' => 'Indica la etiqueta de título (H1) del tema.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'download_cta_title',\n 'std' => '',\n 'label' => 'Call to action title',\n 'type' => 'text',\n 'desc' => 'Call to action title, right below the header'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'download_cta_text',\n 'std' => '',\n 'label' => 'Call to action text',\n 'type' => 'text',\n 'desc' => 'Call to action text, right below the header'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'download_demo_url',\n 'std' => '',\n 'label' => 'URL de la Demo',\n 'type' => 'text',\n 'desc' => 'Especifica la URL de la demo del tema.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'download_url',\n 'std' => '',\n 'label' => 'External URL',\n 'type' => 'text',\n 'desc' => 'Especifica la URL del tema si es un archivo externo.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'download_product',\n 'std' => '',\n 'label' => 'ID de Producto',\n 'type' => 'select',\n 'option' => cpotheme_metadata_productlist_optional(),\n 'desc' => 'Indica la ID del producto para enlazarlo.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'download_features',\n 'label' => 'Funcionalidades',\n 'type' => 'collection',\n 'option' => cpotheme_metadata_theme_features(),\n 'desc' => ''\n );\n\n $cpotheme_data[] = array(\n 'name' => 'download_smartphone',\n 'label' => 'Imagen Movil (250x425)',\n 'type' => 'upload',\n 'desc' => ''\n );\n\n return $cpotheme_data;\n}", "function init_theme() {\r\n\r\n\t\t$possible_names = self::get_theme_name();\r\n\r\n\t\tforeach( $possible_names as $type => $name ){\r\n\r\n\t\t\t$theme_class = \"WP_Job_Manager_Field_Editor_Themes_\" . ucfirst( $name );\r\n\r\n\t\t\tif( class_exists( $theme_class ) ) {\r\n\t\t\t\t$theme = new $theme_class();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "function tcsn_theme_setup() {\n\t\n\t// Makes theme available for translation.\n\t// Translations can be added to the /languages/ directory.\n\tload_theme_textdomain( 'tcsn_theme', get_template_directory() . '/languages' );\n\t\n // Styles the visual editor to resemble the theme style,\n\tadd_editor_style('css/editor-style.css');\n\n // Adds RSS feed links to <head> for posts and comments.\n\tadd_theme_support( 'automatic-feed-links' );\n\n // Switches default core markup for search form, comment form, and comments \n\t// to output valid HTML5.\n\tadd_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) );\n\n\t// This theme supports all available post formats by default.\n\tadd_theme_support( 'post-formats', array(\n\t\t'aside', 'audio', 'gallery', 'image', 'link', 'video'\n\t) );\n\n\t// Add Menu Support\n register_nav_menus( array(\n 'primary_menu' => 'Primary menu',\n 'secondary_menu' => 'Secondary Menu'\n ) );\n\n // Thumbnail support\n\tadd_theme_support( 'post-thumbnails' );\n\tadd_image_size('portfolio-thumb', 530, 370, true);\n\n}", "function gt_init() {\n add_theme_support('post-thumbnails');\n // title based on the page and General Settings\n add_theme_support('title-tag');\n // HTML support\n add_theme_support('html5', \n array('comment-list', 'comment-form', 'search-form'));\n}", "private function setup_theme() {\n\n // Use post thumbnails as featured images\n add_theme_support( 'post-thumbnails' );\n\n // Post formats aren't used in this theme.\n remove_theme_support( 'post-formats' );\n\n // Enable support for HTML5 markup.\n add_theme_support( 'html5', [\n 'comment-list',\n 'search-form',\n 'comment-form',\n 'gallery',\n 'caption',\n ] );\n\n // Enable RSS feed links\n add_theme_support( 'automatic-feed-links' );\n\n // Disable comment RSS feeds\n add_filter( 'feed_links_show_comments_feed', '__return_false' );\n\n // Images\n add_image_size( 'medium-square', 300, 300, true );\n\n // Image sizes for responsive content images\n add_image_size( '2048-wide', 2048 );\n add_image_size( '1024-wide', 1024 );\n add_image_size( '800-wide', 800 );\n add_image_size( '640-wide', 640 );\n add_image_size( '480-wide', 480 );\n add_image_size( '400-wide', 400 );\n add_image_size( '320-wide', 320 );\n\n // 16x9 for the lead image\n add_image_size( '2048-16x9', 2048, 1152, true );\n add_image_size( '1024-16x9', 1024, 576, true ); // The size of the lead image\n add_image_size( '800-16x9', 800, 450, true );\n add_image_size( '640-16x9', 640, 360, true );\n add_image_size( '480-16x9', 480, 270, true );\n add_image_size( '400-16x9', 400, 225, true );\n add_image_size( '320-16x9', 320, 180, true );\n\n add_image_size( 'twitter-card', 120, 120, true );\n add_image_size( 'facebook-open-graph', 1200, 630, true );\n\n $sidebars = [\n 'homepage' => esc_html__( 'Homepage', 'pedestal' ),\n ];\n foreach ( $sidebars as $id => $sidebar ) {\n $args = [\n 'name' => $sidebar,\n 'id' => \"sidebar-$id\",\n 'description' => '',\n 'class' => '',\n 'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</li>\\n\",\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => \"</h3>\\n\",\n ];\n register_sidebar( $args );\n }\n\n }", "function theme($tipo=\"link\"){\n\t\n\t$theme_encontrado=0;\n\tif($theme_encontrado>=1){\n\t}else{\n\t\t$theme=\"default\";\n\t}\n\t\t\n\tglobal $AYV;\t\n\t\n\tif($tipo==\"dir\"){\n\t\treturn DIR_WEB.'/themes/'.$theme;\t\t\n\t}else{\n\t\treturn URL_WEB.'/themes/'.$theme;\t\t\n\t}\n\n}", "function get_site_allowed_themes()\n {\n }", "function autodidact_theme_setup() {\n\n}", "function feed_content_type($type = '')\n {\n }", "function blueauthentic_theme_settings() {\n\tadd_settings_section(\n\t\t'social_section',\n\t\t'Social Media Account Links/URLs',\n\t\t'blueauthentic_social_section_description',\n\t\t'theme-options-section-social'\n\t);\n\n\tadd_option( 'social_facebook_option', 1 );\n\tadd_settings_field(\n\t\t'social_facebook_option',\n\t\t'Facebook Account',\n\t\t'social_facebook_option_callback',\n\t\t'theme-options-section-social',\n\t\t'social_section'\n\t);\n\tregister_setting( 'theme-options-group-social', 'social_facebook_option' );\n\n\tadd_option( 'social_twitter_option', 2 );\n\tadd_settings_field(\n\t\t'social_twitter_option',\n\t\t'Twitter Account',\n\t\t'social_twitter_option_callback',\n\t\t'theme-options-section-social',\n\t\t'social_section'\n\t);\n\tregister_setting( 'theme-options-group-social', 'social_twitter_option' );\n\n\tadd_option( 'social_youtube_option', 3 );\n\tadd_settings_field(\n\t\t'social_youtube_option',\n\t\t'Youtube Account',\n\t\t'social_youtube_option_callback',\n\t\t'theme-options-section-social',\n\t\t'social_section'\n\t);\n\tregister_setting( 'theme-options-group-social', 'social_youtube_option' );\n}", "function custom_theme_options()\n{\n\tif ( ! defined( 'UNCODE_SLIM' ) ) {\n\t\treturn;\n\t}\n\n\tglobal $wpdb, $uncode_colors, $uncode_post_types;\n\n\tif (!isset($uncode_post_types)) $uncode_post_types = uncode_get_post_types();\n\t/**\n\t * Get a copy of the saved settings array.\n\t */\n\t$saved_settings = get_option(ot_settings_id() , array());\n\n\t/**\n\t * Custom settings array that will eventually be\n\t * passes to the OptionTree Settings API Class.\n\t */\n\n\tif (!function_exists('ot_filter_measurement_unit_types'))\n\t{\n\t\tfunction ot_filter_measurement_unit_types($array, $field_id)\n\t\t{\n\t\t\treturn array(\n\t\t\t\t'px' => 'px',\n\t\t\t\t'%' => '%'\n\t\t\t);\n\t\t}\n\t}\n\n\tadd_filter('ot_measurement_unit_types', 'ot_filter_measurement_unit_types', 10, 2);\n\n\tfunction run_array_to($array, $key = '', $value = '')\n\t{\n\t\t$array[$key] = $value;\n\t\treturn $array;\n\t}\n\n\t$stylesArrayMenu = array(\n\t\tarray(\n\t\t\t'value' => 'light',\n\t\t\t'label' => esc_html__('Light', 'uncode') ,\n\t\t\t'src' => ''\n\t\t) ,\n\t\tarray(\n\t\t\t'value' => 'dark',\n\t\t\t'label' => esc_html__('Dark', 'uncode') ,\n\t\t\t'src' => ''\n\t\t)\n\t);\n\n\t$menus = get_terms( 'nav_menu', array( 'hide_empty' => true ) );\n\t$menus_array = array();\n\t$menus_array[] = array(\n\t\t'value' => '',\n\t\t'label' => esc_html__('Inherit', 'uncode')\n\t);\n\tforeach ($menus as $menu)\n\t{\n\t\t$menus_array[] = array(\n\t\t\t'value' => $menu->slug,\n\t\t\t'label' => $menu->name\n\t\t);\n\t}\n\n\t$uncodeblock = array(\n\t\t'value' => 'header_uncodeblock',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t);\n\n\t$uncodeblocks = array(\n\t\tarray(\n\t\t\t'value' => '','label' => esc_html__('Inherit', 'uncode')\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'none','label' => esc_html__('None', 'uncode')\n\t\t)\n\t);\n\n\t$blocks_query = new WP_Query( 'post_type=uncodeblock&posts_per_page=-1&post_status=publish&orderby=title&order=ASC' );\n\n\tforeach ($blocks_query->posts as $block) {\n\t\t$uncodeblocks[] = array(\n\t\t\t'value' => $block->ID,\n\t\t\t'label' => $block->post_title,\n\t\t\t'postlink' => get_edit_post_link($block->ID),\n\t\t);\n\t}\n\n\tif ($blocks_query->post_count === 0) {\n\t\t$uncodeblocks[] = array(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('No Content Blocks found', 'uncode')\n\t\t);\n\t}\n\n\t$uncodeblock_404 = array(\n\t\t'id' => '_uncode_404_body',\n\t\t'label' => esc_html__('404 content', 'uncode') ,\n\t\t'desc' => esc_html__('Specify a content for the 404 page.', 'uncode'),\n\t\t'std' => '',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Default', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'body_uncodeblock',\n\t\t\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t\t),\n\t\t),\n\t\t'section' => 'uncode_404_section',\n\t);\n\n\t$uncodeblocks_404 = array(\n\t\t'id' => '_uncode_404_body_block',\n\t\t'label' => esc_html__('404 Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Specify a content for the 404 page.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => $uncodeblocks,\n\t\t'section' => 'uncode_404_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_404_body:is(body_uncodeblock)',\n\t);\n\n\tif ( class_exists( 'RevSliderFront' ) )\n\t{\n\n\t\t$revslider = array(\n\t\t\t'value' => 'header_revslider',\n\t\t\t'label' => esc_html__('Revolution Slider', 'uncode') ,\n\t\t);\n\n\t\t$rs = $wpdb->get_results(\"SELECT id, title, alias FROM \" . $wpdb->prefix . \"revslider_sliders WHERE type != 'template' ORDER BY id ASC LIMIT 999\");\n\t\t$revsliders = array();\n\t\tif ($rs)\n\t\t{\n\t\t\tforeach ($rs as $slider)\n\t\t\t{\n\t\t\t\t$revsliders[] = array(\n\t\t\t\t\t'value' => $slider->alias,\n\t\t\t\t\t'label' => $slider->title,\n\t\t\t\t\t'postlink' => admin_url( 'admin.php?page=revslider&view=slider&id=' . $slider->id ),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$revsliders[] = array(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('No Revolution Sliders found', 'uncode')\n\t\t\t);\n\t\t}\n\t}\n\telse $revslider = $revsliders = '';\n\n\tif ( class_exists( 'LS_Config' ) )\n\t{\n\n\t\t$layerslider = array(\n\t\t\t'value' => 'header_layerslider',\n\t\t\t'label' => esc_html__('LayerSlider', 'uncode') ,\n\t\t);\n\n\t\t$ls = $wpdb->get_results(\"SELECT id, name FROM \" . $wpdb->prefix . \"layerslider WHERE flag_deleted != '1' ORDER BY id ASC LIMIT 999\");\n\t\t$layersliders = array();\n\t\tif ($ls)\n\t\t{\n\t\t\tforeach ($ls as $slider)\n\t\t\t{\n\t\t\t\t$layersliders[] = array(\n\t\t\t\t\t'value' => $slider->id,\n\t\t\t\t\t'label' => $slider->name,\n\t\t\t\t\t'postlink' => admin_url( 'admin.php?page=layerslider&action=edit&id=' . $slider->id ),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$layersliders[] = array(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('No LayerSliders found', 'uncode')\n\t\t\t);\n\t\t}\n\t}\n\telse $layerslider = $layersliders = '';\n\n\t$title_size = array(\n\t\tarray(\n\t\t\t'value' => 'h1',\n\t\t\t'label' => esc_html__('h1', 'uncode')\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h2',\n\t\t\t'label' => esc_html__('h2', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h3',\n\t\t\t'label' => esc_html__('h3', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h4',\n\t\t\t'label' => esc_html__('h4', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h5',\n\t\t\t'label' => esc_html__('h5', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h6',\n\t\t\t'label' => esc_html__('h6', 'uncode'),\n\t\t),\n\t);\n\n\t$font_sizes = ot_get_option('_uncode_heading_font_sizes');\n\tif (!empty($font_sizes)) {\n\t\tforeach ($font_sizes as $key => $value) {\n\t\t\t$title_size[] = array(\n\t\t\t\t'value' => $value['_uncode_heading_font_size_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$title_size[] = array(\n\t\t'value' => 'bigtext',\n\t\t'label' => esc_html__('BigText', 'uncode'),\n\t);\n\n\t$title_height = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\")\n\t\t),\n\t);\n\n\t$font_heights = ot_get_option('_uncode_heading_font_heights');\n\tif (!empty($font_heights)) {\n\t\tforeach ($font_heights as $key => $value) {\n\t\t\t$title_height[] = array(\n\t\t\t\t'value' => $value['_uncode_heading_font_height_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$title_spacing = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\")\n\t\t),\n\t);\n\n\t$btn_letter_spacing = $title_spacing;\n\t$btn_letter_spacing[] = array(\n\t\t'value' => 'uncode-fontspace-zero',\n\t\t'label' => esc_html__('Letter Spacing 0', \"uncode\")\n\t);\n\n\t$font_spacings = ot_get_option('_uncode_heading_font_spacings');\n\tif (!empty($font_spacings)) {\n\t\tforeach ($font_spacings as $key => $value) {\n\t\t\t$btn_letter_spacing[] = $title_spacing[] = array(\n\t\t\t\t'value' => $value['_uncode_heading_font_spacing_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$fonts = get_option('uncode_font_options');\n\t$title_font = array();\n\n\tif (isset($fonts['font_stack']) && $fonts['font_stack'] !== '[]')\n\t{\n\t\t$font_stack_string = $fonts['font_stack'];\n\t\t$font_stack = json_decode(str_replace('&quot;', '\"', $font_stack_string) , true);\n\n\t\tforeach ($font_stack as $font)\n\t\t{\n\t\t\tif ($font['source'] === 'Font Squirrel')\n\t\t\t{\n\t\t\t\t$variants = explode(',', $font['variants']);\n\t\t\t\t$label = (string)$font['family'] . ' - ';\n\t\t\t\t$weight = array();\n\t\t\t\tforeach ($variants as $variant)\n\t\t\t\t{\n\t\t\t\t\tif (strpos(strtolower($variant) , 'hairline') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 100;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'light') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 200;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'regular') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 400;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'semibold') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 500;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'bold') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 600;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'black') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 800;\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$weight[] = 400;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$label.= implode(',', $weight);\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode((string)$font['family']),\n\t\t\t\t\t'label' => $label\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if ($font['source'] === 'Google Web Fonts')\n\t\t\t{\n\t\t\t\t$label = (string)$font['family'] . ' - ' . $font['variants'];\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode((string)$font['family']),\n\t\t\t\t\t'label' => $label\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if ($font['source'] === 'Adobe Fonts' || $font['source'] === 'Typekit' )\n\t\t\t{\n\t\t\t\t$label = (string)$font['family'] . ' - ';\n\t\t\t\t$variants = explode(',', $font['variants']);\n\t\t\t\tforeach ($variants as $key => $variant) {\n\t\t\t\t\tif ( $variants[$key] !== '' ) {\n\t\t\t\t\t\tpreg_match(\"|\\d+|\", $variants[$key], $weight);\n\t\t\t\t\t\t$variants[$key] = $weight[0] . '00';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$label.= implode(',', $variants);\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode(str_replace('\"', '', (string)$font['stub'])),\n\t\t\t\t\t'label' => $label\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode((string)$font['family']),\n\t\t\t\t\t'label' => (string)$font['family']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t$title_font = array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('No fonts activated.', \"uncode\"),\n\t\t\t)\n\t\t);\n\t}\n\n\t$title_font[] = array(\n\t\t'value' => 'manual',\n\t\t'label' => esc_html__('Manually entered','uncode')\n\t);\n\n\t$custom_fonts = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\"),\n\t\t)\n\t);\n\n\t$custom_fonts_array = ot_get_option('_uncode_font_groups');\n\tif (!empty($custom_fonts_array)) {\n\t\tforeach ($custom_fonts_array as $key => $value) {\n\t\t\t$custom_fonts[] = array(\n\t\t\t\t'value' => $value['_uncode_font_group_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$title_weight = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\"),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 100,\n\t\t\t'label' => '100',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 200,\n\t\t\t'label' => '200',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 300,\n\t\t\t'label' => '300',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 400,\n\t\t\t'label' => '400',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 500,\n\t\t\t'label' => '500',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 600,\n\t\t\t'label' => '600',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 700,\n\t\t\t'label' => '700',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 800,\n\t\t\t'label' => '800',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 900,\n\t\t\t'label' => '900',\n\t\t)\n\t);\n\n\t$menu_section_title = array(\n\t\t'id' => '_uncode_%section%_menu_block_title',\n\t\t'label' => ' <i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu = array(\n\t\t'id' => '_uncode_%section%_menu',\n\t\t'label' => esc_html__('Menu', 'uncode') ,\n\t\t'desc' => esc_html__('Override the primary menu created in \\'Appearance -> Menus\\'.','uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => $menus_array,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_width = array(\n\t\t'id' => '_uncode_%section%_menu_width',\n\t\t'label' => esc_html__('Menu width', 'uncode') ,\n\t\t'desc' => esc_html__('Override the menu width.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_opaque = array(\n\t\t'id' => '_uncode_%section%_menu_opaque',\n\t\t'label' => esc_html__('Remove transparency', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Override to remove the transparency eventually declared in \\'Customize -> Light/Dark skin\\'.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_no_padding = array(\n\t\t'id' => '_uncode_%section%_menu_no_padding',\n\t\t'label' => esc_html__('Remove menu content padding', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Remove the additional menu padding in the header.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_no_padding_mobile = array(\n\t\t'id' => '_uncode_%section%_menu_no_padding_mobile',\n\t\t'label' => esc_html__('Remove menu content padding on mobile', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Remove the additional menu padding in the header on mobile.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$title_archive_custom_activate = array(\n\t\t'id' => '_uncode_%section%_custom_title_activate',\n\t\t'label' => esc_html__('Activate custom title and subtitle', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate this to enable the custom title and subtitle.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$title_archive_custom_text = array(\n\t\t'id' => '_uncode_%section%_custom_title_text',\n\t\t'label' => esc_html__('Custom title', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'desc' => esc_html__('Insert your custom main archive page title.', 'uncode') ,\n\t\t'std' => '',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_custom_title_activate:is(on)',\n\t);\n\n\t$subtitle_archive_custom_text = array(\n\t\t'id' => '_uncode_%section%_custom_subtitle_text',\n\t\t'label' => esc_html__('Custom subtitle', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'desc' => esc_html__('Insert your custom main archive page subtitle.', 'uncode') ,\n\t\t'std' => '',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_custom_title_activate:is(on)',\n\t);\n\n\t$header_section_title = array(\n\t\t'id' => '_uncode_%section%_header_block_title',\n\t\t'label' => '<i class=\"fa fa-columns2\"></i> ' . esc_html__('Header', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_type = array(\n\t\t'id' => '_uncode_%section%_header',\n\t\t'label' => esc_html__('Type', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the header type.', 'uncode'),\n\t\t'std' => 'none',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'none',\n\t\t\t\t'label' => esc_html__('Select…', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header_basic',\n\t\t\t\t'label' => esc_html__('Basic', 'uncode') ,\n\t\t\t) ,\n\t\t\t$uncodeblock,\n\t\t\t$revslider,\n\t\t\t$layerslider,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_uncode_block = array(\n\t\t'id' => '_uncode_%section%_blocks',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the Content Block.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'condition' => '_uncode_%section%_header:is(header_uncodeblock)',\n\t\t'operator' => 'or',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_revslider = array(\n\t\t'id' => '_uncode_%section%_revslider',\n\t\t'label' => esc_html__('Revslider', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the RevSlider.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_revslider)',\n\t\t'operator' => 'or',\n\t\t'choices' => $revsliders,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_layerslider = array(\n\t\t'id' => '_uncode_%section%_layerslider',\n\t\t'label' => esc_html__('LayerSlider', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the LayerSlider.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_layerslider)',\n\t\t'operator' => 'or',\n\t\t'choices' => $layersliders,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title = array(\n\t\t'label' => esc_html__('Title in header', 'uncode') ,\n\t\t'id' => '_uncode_%section%_header_title',\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate to show title in the header.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_title_text = array(\n\t\t'id' => '_uncode_%section%_header_title_text',\n\t\t'label' => esc_html__('Custom text', 'uncode') ,\n\t\t'desc' => esc_html__('Add custom text for the header. Every newline in the field is a new line in the title.', 'uncode') ,\n\t\t'type' => 'textarea-simple',\n\t\t'rows' => '15',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t);\n\n\t$header_style = array(\n\t\t'id' => '_uncode_%section%_header_style',\n\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the header text skin.', 'uncode') ,\n\t\t'std' => 'light',\n\t\t'type' => 'select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'and',\n\t\t'choices' => $stylesArrayMenu\n\t);\n\n\t$header_width = array(\n\t\t'id' => '_uncode_%section%_header_width',\n\t\t'label' => esc_html__('Header width', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'desc' => esc_html__('Override the header width.', 'uncode') ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:contains(header)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_content_width = array(\n\t\t'id' => '_uncode_%section%_header_content_width',\n\t\t'label' => esc_html__('Content full width', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate to expand the header content to full width.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'and',\n\t);\n\n\t$header_custom_width = array(\n\t\t'id' => '_uncode_%section%_header_custom_width',\n\t\t'label' => esc_html__('Custom inner width','uncode'),\n\t\t'desc' => esc_html__('Adjust the inner content width in %.', 'uncode') ,\n\t\t'std' => '100',\n\t\t'type' => 'numeric-slider',\n\t\t'min_max_step' => '0,100,1',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'and',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_align = array(\n\t\t'id' => '_uncode_%section%_header_align',\n\t\t'label' => esc_html__('Content alignment', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the text/content alignment.', 'uncode') ,\n\t\t'std' => 'center',\n\t\t'type' => 'select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'left',\n\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'center',\n\t\t\t\t'label' => esc_html__('Center', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'right',\n\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t)\n\t\t)\n\t);\n\n\t$header_height = array(\n\t\t'id' => '_uncode_%section%_header_height',\n\t\t'label' => esc_html__('Height', 'uncode') ,\n\t\t'desc' => esc_html__('Define the height of the header in px or in % (relative to the window height).', 'uncode') ,\n\t\t'type' => 'measurement',\n\t\t'std' => array(\n\t\t\t'60',\n\t\t\t'%'\n\t\t) ,\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_min_height = array(\n\t\t'id' => '_uncode_%section%_header_min_height',\n\t\t'label' => esc_html__('Minimal height', 'uncode') ,\n\t\t'desc' => esc_html__('Enter a minimun height for the header in pixel.', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'std' => '300',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_position = array(\n\t\t'id' => '_uncode_%section%_header_position',\n\t\t'label' => esc_html__('Position', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the position of the header content inside the container.', 'uncode') ,\n\t\t'std' => 'header-center header-middle',\n\t\t'type' => 'select',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'header-left header-top',\n\t\t\t\t'label' => esc_html__('Left Top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-left header-center',\n\t\t\t\t'label' => esc_html__('Left Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-left header-bottom',\n\t\t\t\t'label' => esc_html__('Left Bottom', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-center header-top',\n\t\t\t\t'label' => esc_html__('Center Top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-center header-middle',\n\t\t\t\t'label' => esc_html__('Center Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-center header-bottom',\n\t\t\t\t'label' => esc_html__('Center Bottom', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-right header-top',\n\t\t\t\t'label' => esc_html__('Right Top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-right header-center',\n\t\t\t\t'label' => esc_html__('Right Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-right header-bottom',\n\t\t\t\t'label' => esc_html__('Right Bottom', 'uncode') ,\n\t\t\t) ,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_font = array(\n\t\t'id' => '_uncode_%section%_header_title_font',\n\t\t'label' => esc_html__('Title font family', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the font for the title.', 'uncode') ,\n\t\t'std' => 'font-555555',\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $custom_fonts,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_size = array(\n\t\t'id' => '_uncode_%section%_header_title_size',\n\t\t'label' => esc_html__('Title font size', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the font size for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_size,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_height = array(\n\t\t'id' => '_uncode_%section%_header_title_height',\n\t\t'label' => esc_html__('Title line height', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the line height for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_height,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_spacing = array(\n\t\t'id' => '_uncode_%section%_header_title_spacing',\n\t\t'label' => esc_html__('Title letter spacing', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the letter spacing for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_spacing,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_weight = array(\n\t\t'id' => '_uncode_%section%_header_title_weight',\n\t\t'label' => esc_html__('Title font weight', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the font weight for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_weight,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_italic = array(\n\t\t'id' => '_uncode_%section%_header_title_italic',\n\t\t'label' => esc_html__('Title italic', 'uncode') ,\n\t\t'desc' => esc_html__('Activate the font style italic for the title.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t);\n\n\t$header_title_transform = array(\n\t\t'id' => '_uncode_%section%_header_title_transform',\n\t\t'label' => esc_html__('Title text transform', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the title text transformation.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Default CSS', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'uppercase',\n\t\t\t\t'label' => esc_html__('Uppercase', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'lowercase',\n\t\t\t\t'label' => esc_html__('Lowercase', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'capitalize',\n\t\t\t\t'label' => esc_html__('Capitalize', 'uncode') ,\n\t\t\t) ,\n\t\t)\n\t);\n\n\t$header_text_animation = array(\n\t\t'id' => '_uncode_%section%_header_text_animation',\n\t\t'label' => esc_html__('Text animation', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the entrance animation of the title text.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Select…', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'top-t-bottom',\n\t\t\t\t'label' => esc_html__('Top to bottom', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'left-t-right',\n\t\t\t\t'label' => esc_html__('Left to right', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'right-t-left',\n\t\t\t\t'label' => esc_html__('Right to left', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'bottom-t-top',\n\t\t\t\t'label' => esc_html__('Bottom to top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'zoom-in',\n\t\t\t\t'label' => esc_html__('Zoom in', 'uncode') ,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'value' => 'zoom-out',\n\t\t\t\t'label' => esc_html__('Zoom out', 'uncode') ,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'value' => 'alpha-anim',\n\t\t\t\t'label' => esc_html__('Alpha', 'uncode') ,\n\t\t\t)\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_animation_delay = array(\n\t\t'id' => '_uncode_%section%_header_animation_delay',\n\t\t'label' => esc_html__('Animation delay', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the entrance animation delay of the title text in milliseconds.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on),_uncode_%section%_header_text_animation:not()',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '100',\n\t\t\t\t'label' => esc_html__('ms 100', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '200',\n\t\t\t\t'label' => esc_html__('ms 200', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '300',\n\t\t\t\t'label' => esc_html__('ms 300', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '400',\n\t\t\t\t'label' => esc_html__('ms 400', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '500',\n\t\t\t\t'label' => esc_html__('ms 500', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '600',\n\t\t\t\t'label' => esc_html__('ms 600', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '700',\n\t\t\t\t'label' => esc_html__('ms 700', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '800',\n\t\t\t\t'label' => esc_html__('ms 800', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '900',\n\t\t\t\t'label' => esc_html__('ms 900', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1000',\n\t\t\t\t'label' => esc_html__('ms 1000', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1100',\n\t\t\t\t'label' => esc_html__('ms 1100', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1200',\n\t\t\t\t'label' => esc_html__('ms 1200', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1300',\n\t\t\t\t'label' => esc_html__('ms 1300', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1400',\n\t\t\t\t'label' => esc_html__('ms 1400', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1500',\n\t\t\t\t'label' => esc_html__('ms 1500', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1600',\n\t\t\t\t'label' => esc_html__('ms 1600', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1700',\n\t\t\t\t'label' => esc_html__('ms 1700', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1800',\n\t\t\t\t'label' => esc_html__('ms 1800', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1900',\n\t\t\t\t'label' => esc_html__('ms 1900', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '2000',\n\t\t\t\t'label' => esc_html__('ms 2000', 'uncode') ,\n\t\t\t) ,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_animation_speed = array(\n\t\t'id' => '_uncode_%section%_header_animation_speed',\n\t\t'label' => esc_html__('Animation speed', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the entrance animation speed of the title text in milliseconds.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on),_uncode_%section%_header_text_animation:not()',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Default (400)', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '100',\n\t\t\t\t'label' => esc_html__('ms 100', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '200',\n\t\t\t\t'label' => esc_html__('ms 200', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '300',\n\t\t\t\t'label' => esc_html__('ms 300', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '400',\n\t\t\t\t'label' => esc_html__('ms 400', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '500',\n\t\t\t\t'label' => esc_html__('ms 500', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '600',\n\t\t\t\t'label' => esc_html__('ms 600', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '700',\n\t\t\t\t'label' => esc_html__('ms 700', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '800',\n\t\t\t\t'label' => esc_html__('ms 800', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '900',\n\t\t\t\t'label' => esc_html__('ms 900', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1000',\n\t\t\t\t'label' => esc_html__('ms 1000', 'uncode') ,\n\t\t\t) ,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_featured = array(\n\t\t'label' => esc_html__('Featured media in header', 'uncode') ,\n\t\t'id' => '_uncode_%section%_header_featured',\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate to use the featured image in the header.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_background = array(\n\t\t'id' => '_uncode_%section%_header_background',\n\t\t'label' => esc_html__('Background', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the background media and color.', 'uncode') ,\n\t\t'type' => 'background',\n\t\t'std' => array(\n\t\t\t'background-color' => 'color-gyho',\n\t\t\t'background-repeat' => '',\n\t\t\t'background-attachment' => '',\n\t\t\t'background-position' => '',\n\t\t\t'background-size' => '',\n\t\t\t'background-image' => '',\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_parallax = array(\n\t\t'id' => '_uncode_%section%_header_parallax',\n\t\t'label' => esc_html__('Parallax', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate the background parallax effect.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_kburns = array(\n\t\t'id' => '_uncode_%section%_header_kburns',\n\t\t'label' => esc_html__('Zoom Effect', 'uncode') ,\n\t\t'desc' => esc_html__('Select the background zoom effect you prefer.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'on',\n\t\t\t\t'label' => esc_html__('Ken Burns', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'zoom',\n\t\t\t\t'label' => esc_html__('Zoom Out', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_overlay_color = array(\n\t\t'id' => '_uncode_%section%_header_overlay_color',\n\t\t'label' => esc_html__('Overlay color', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the overlay background color.', 'uncode') ,\n\t\t'type' => 'uncode_color',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_overlay_color_alpha = array(\n\t\t'id' => '_uncode_%section%_header_overlay_color_alpha',\n\t\t'label' => esc_html__('Overlay color opacity', 'uncode') ,\n\t\t'desc' => esc_html__('Set the overlay opacity.', 'uncode') ,\n\t\t'std' => '100',\n\t\t'min_max_step' => '0,100,1',\n\t\t'type' => 'numeric-slider',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_scroll_opacity = array(\n\t\t'id' => '_uncode_%section%_header_scroll_opacity',\n\t\t'label' => esc_html__('Scroll opacity', 'uncode') ,\n\t\t'desc' => esc_html__('Activate alpha animation when scrolling down.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header:is(header_uncodeblock)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_scrolldown = array(\n\t\t'id' => '_uncode_%section%_header_scrolldown',\n\t\t'label' => esc_html__('Scroll down arrow', 'uncode') ,\n\t\t'desc' => esc_html__('Activate the scroll down arrow button.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:not(none)',\n\t\t'operator' => 'or',\n\t);\n\n\t$show_breadcrumb = array(\n\t\t'id' => '_uncode_%section%_breadcrumb',\n\t\t'label' => esc_html__('Show breadcrumb', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the navigation breadcrumb.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$breadcrumb_align = array(\n\t\t'id' => '_uncode_%section%_breadcrumb_align',\n\t\t'label' => esc_html__('Breadcrumb align', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the breadcrumb alignment','uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'center',\n\t\t\t\t'label' => esc_html__('Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'left',\n\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_breadcrumb:is(on)',\n\t\t'operator' => 'or',\n\t);\n\n\t$show_title = array(\n\t\t'id' => '_uncode_%section%_title',\n\t\t'label' => esc_html__('Show title', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the title in the content area.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'or'\n\t);\n\n\t$remove_pagination = array(\n\t\t'id' => '_uncode_%section%_remove_pagination',\n\t\t'label' => esc_html__('Remove pagination', 'uncode') ,\n\t\t'desc' => esc_html__('Activate this to remove the pagination (useful when you use a custom Content Block with Pagination or Load More options).', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'or'\n\t);\n\n\t$products_per_page = array(\n\t\t'id' => '_uncode_%section%_ppp',\n\t\t'label' => esc_html__('Number of products', 'uncode') ,\n\t\t'desc' => esc_html__('Set the number of items to display on product archives. \\'Inherit\\' inherits the WordPress Settings > Readings > Blog Number of Posts', 'uncode') ,\n\t\t'std' => '0',\n\t\t'min_max_step' => '0,100,1',\n\t\t'type' => 'numeric-slider',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_media = array(\n\t\t'id' => '_uncode_%section%_media',\n\t\t'label' => esc_html__('Show media', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the medias in the content area.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_featured_media = array(\n\t\t'id' => '_uncode_%section%_featured_media',\n\t\t'label' => esc_html__('Show featured image', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the featured image in the content area.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'condition' => '_uncode_%section%_media:not(on)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_tags = array(\n\t\t'id' => '_uncode_%section%_tags',\n\t\t'label' => esc_html__('Show tags', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the tags and choose visbility by post to post bases.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_tags_align = array(\n\t\t'id' => '_uncode_%section%_tags_align',\n\t\t'label' => esc_html__('Tags alignment', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the tags alignment.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'left',\n\t\t\t\t'label' => esc_html__('Left align', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'center',\n\t\t\t\t'label' => esc_html__('Center align', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'right',\n\t\t\t\t'label' => esc_html__('Right align', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t)\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_tags:is(on)',\n\t\t'operator' => 'or',\n\t);\n\n\t$show_comments = array(\n\t\t'id' => '_uncode_%section%_comments',\n\t\t'label' => esc_html__('Show comments', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the comments and choose visbility by post to post bases.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_share = array(\n\t\t'id' => '_uncode_%section%_share',\n\t\t'label' => esc_html__('Show share', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the share module.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$image_layout = array(\n\t\t'id' => '_uncode_%section%_image_layout',\n\t\t'label' => esc_html__('Media layout', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the layout mode for the product images section.', 'uncode') ,\n\t\t'std' => '',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Standard', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'stack',\n\t\t\t\t'label' => esc_html__('Stack', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$media_size = array(\n\t\t'id' => '_uncode_%section%_media_size',\n\t\t'label' => esc_html__('Media layout size', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the size of the media layout area.', 'uncode') ,\n\t\t'std' => '6',\n\t\t'min_max_step' => '1,11,1',\n\t\t'type' => 'numeric-slider',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$enable_sticky_desc = array(\n\t\t'id' => '_uncode_%section%_sticky_desc',\n\t\t'label' => esc_html__('Sticky content', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to enable sticky effect for product description.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_image_layout:is(stack)',\n\t);\n\n\t$enable_woo_zoom = array(\n\t\t'id' => '_uncode_%section%_enable_zoom',\n\t\t'label' => esc_html__('Zoom', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to enable drag zoom effect on product image.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$thumb_cols = array(\n\t\t'id' => '_uncode_%section%_thumb_cols',\n\t\t'label' => esc_html__('Thumbnails columns', 'uncode') ,\n\t\t'desc' => esc_html__('Specify how many columns to display for your product gallery thumbs.', 'uncode') ,\n\t\t'std' => '',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '2',\n\t\t\t\t'label' => '2',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => '3',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '4',\n\t\t\t\t'label' => '4',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '5',\n\t\t\t\t'label' => '5',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '6',\n\t\t\t\t'label' => '6',\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_image_layout:is()',\n\t);\n\n\t$enable_woo_slider = array(\n\t\t'id' => '_uncode_%section%_enable_slider',\n\t\t'label' => esc_html__('Thumbnails carousel', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to enable carousel slider when you click gallery thumbs.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_image_layout:is()',\n\t);\n\n\t$body_section_title = array(\n\t\t'id' => '_uncode_%section%_body_title',\n\t\t'label' => '<i class=\"fa fa-layout\"></i> ' . esc_html__('Content', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block = array(\n\t\t'id' => '_uncode_%section%_content_block',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use. NB. Select \"Inherit\" to use the default template.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => $uncodeblocks,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block_before = array(\n\t\t'id' => '_uncode_%section%_content_block_before',\n\t\t'label' => esc_html__('Content Block - Before Content', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block_after_pre = array(\n\t\t'id' => '_uncode_%section%_content_block_after_pre',\n\t\t'label' => esc_html__('After Content (ex: Author Profile)', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block_after = array(\n\t\t'id' => '_uncode_%section%_content_block_after',\n\t\t'label' => esc_html__('After Content (ex: Related Posts)', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_layout_width = array(\n\t\t'id' => '_uncode_%section%_layout_width',\n\t\t'label' => esc_html__('Content width', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the content width.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_layout_width_custom = array(\n\t\t'id' => '_uncode_%section%_layout_width_custom',\n\t\t'label' => esc_html__('Custom width', 'uncode') ,\n\t\t'desc' => esc_html__('Define the custom width for the content area in px or in %. This option takes effect with normal contents (not Page Builder).', 'uncode') ,\n\t\t'type' => 'measurement',\n\t\t'condition' => '_uncode_%section%_layout_width:is(limit)',\n\t\t'operator' => 'or',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_single_post_width = array(\n\t\t'id' => '_uncode_%section%_single_width',\n\t\t'label' => esc_html__('Single post width', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the single post width from 1 to 12.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'std' => '4',\n\t\t'condition' => '_uncode_%section%_content_block:is(),_uncode_%section%_content_block:is(none)',\n\t\t'operator' => 'or',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '1',\n\t\t\t\t'label' => '1' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '2',\n\t\t\t\t'label' => '2' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '3',\n\t\t\t\t'label' => '3' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '4',\n\t\t\t\t'label' => '4' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '5',\n\t\t\t\t'label' => '5' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '6',\n\t\t\t\t'label' => '6' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '7',\n\t\t\t\t'label' => '7' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '8',\n\t\t\t\t'label' => '8' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '9',\n\t\t\t\t'label' => '9' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '10',\n\t\t\t\t'label' => '10' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '11',\n\t\t\t\t'label' => '11' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '12',\n\t\t\t\t'label' => '12' ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_single_text_lenght = array(\n\t\t'id' => '_uncode_%section%_single_text_length',\n\t\t'label' => esc_html__('Single teaser text length', 'uncode') ,\n\t\t'desc' => esc_html__('Enter the number of words you want for the teaser. If nothing in entered the full content will be showed.', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_content_block:is(),_uncode_%section%_content_block:is(none)',\n\t\t'operator' => 'or',\n\t);\n\n\t$sidebar_section_title = array(\n\t\t'id' => '_uncode_%section%_sidebar_title',\n\t\t'label' => '<i class=\"fa fa-content-right\"></i> ' . esc_html__('Sidebar', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_activate = array(\n\t\t'id' => '_uncode_%section%_activate_sidebar',\n\t\t'label' => esc_html__('Activate the sidebar', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the sidebar.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_widget = array(\n\t\t'id' => '_uncode_%section%_sidebar',\n\t\t'label' => esc_html__('Sidebar', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the sidebar.', 'uncode') ,\n\t\t'type' => 'sidebar-select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$sidebar_position = array(\n\t\t'id' => '_uncode_%section%_sidebar_position',\n\t\t'label' => esc_html__('Position', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the position of the sidebar.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'sidebar_right',\n\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'sidebar_left',\n\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_size = array(\n\t\t'id' => '_uncode_%section%_sidebar_size',\n\t\t'label' => esc_html__('Size', 'uncode') ,\n\t\t'desc' => esc_html__('Set the size of the sidebar.', 'uncode') ,\n\t\t'std' => '4',\n\t\t'min_max_step' => '1,11,1',\n\t\t'type' => 'numeric-slider',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_sticky = array(\n\t\t'id' => '_uncode_%section%_sidebar_sticky',\n\t\t'label' => esc_html__('Sticky sidebar', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to have a sticky sidebar.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_style = array(\n\t\t'id' => '_uncode_%section%_sidebar_style',\n\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t'desc' => esc_html__('Override the sidebar text skin color.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', \"uncode\") ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'light',\n\t\t\t\t'label' => esc_html__('Light', \"uncode\") ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'dark',\n\t\t\t\t'label' => esc_html__('Dark', \"uncode\") ,\n\t\t\t)\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$sidebar_bgcolor = array(\n\t\t'id' => '_uncode_%section%_sidebar_bgcolor',\n\t\t'label' => esc_html__('Background color', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the sidebar background color.', 'uncode') ,\n\t\t'type' => 'uncode_color',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$sidebar_fill = array(\n\t\t'id' => '_uncode_%section%_sidebar_fill',\n\t\t'label' => esc_html__('Sidebar filling space', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to remove padding around the sidebar and fill the height.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'std' => 'off',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_sidebar_bgcolor:not(),_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$navigation_section_title = array(\n\t\t'id' => '_uncode_%section%_navigation_title',\n\t\t'label' => '<i class=\"fa fa-location\"></i> ' . esc_html__('Navigation', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$navigation_activate = array(\n\t\t'id' => '_uncode_%section%_navigation_activate',\n\t\t'label' => esc_html__('Navigation bar', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the navigation bar.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$navigation_page_index = array(\n\t\t'id' => '_uncode_%section%_navigation_index',\n\t\t'label' => esc_html__('Navigation index', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the page you want to use as index.', 'uncode'),\n\t\t'type' => 'page-select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_navigation_activate:not(off)',\n\t);\n\n\t$navigation_index_label = array(\n\t\t'id' => '_uncode_%section%_navigation_index_label',\n\t\t'label' => esc_html__('Index custom label', 'uncode') ,\n\t\t'desc' => esc_html__('Enter a custom label for the index button.', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_navigation_activate:not(off)',\n\t);\n\n\t$navigation_nextprev_title = array(\n\t\t'id' => '_uncode_%section%_navigation_nextprev_title',\n\t\t'label' => esc_html__('Navigation titles', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the next/prev post title.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_navigation_activate:not(off)',\n\t);\n\n\t$footer_section_title = array(\n\t\t'id' => '_uncode_%section%_footer_block_title',\n\t\t'label' => '<i class=\"fa fa-ellipsis\"></i> ' . esc_html__('Footer', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$footer_uncode_block = array(\n\t\t'id' => '_uncode_%section%_footer_block',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Override the Content Block.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => $uncodeblocks,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$footer_width = array(\n\t\t'id' => '_uncode_%section%_footer_width',\n\t\t'label' => esc_html__('Footer width', 'uncode') ,\n\t\t'desc' => esc_html__('Override the footer width.' ,'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$custom_fields_section_title = array(\n\t\t'id' => '_uncode_%section%_cf_title',\n\t\t'label' => '<i class=\"fa fa-pencil3\"></i> ' . esc_html__('Custom fields', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$custom_fields_list = array(\n\t\t'id' => '_uncode_%section%_custom_fields',\n\t\t'class' => 'uncode-custom-fields-list',\n\t\t'label' => esc_html__('Custom fields', 'uncode') ,\n\t\t'desc' => esc_html__('Create here all the custom fields that can be used inside the posts module.', 'uncode') ,\n\t\t'type' => 'list-item',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'settings' => array(\n\t\t\tarray(\n\t\t\t\t'id' => '_uncode_cf_unique_id',\n\t\t\t\t'class' => 'unique_id',\n\t\t\t\t'std' => 'detail-',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => esc_html__('Unique custom field ID','uncode') ,\n\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t),\n\t\t)\n\t);\n\n\t$portfolio_cpt_name = ot_get_option('_uncode_portfolio_cpt');\n\tif ($portfolio_cpt_name == '') $portfolio_cpt_name = 'portfolio';\n\n\t$cpt_single_sections = array();\n\t$cpt_index_sections = array();\n\t$cpt_single_options = array();\n\t$cpt_index_options = array();\n\n\tif (count($uncode_post_types) > 0) {\n\t\tforeach ($uncode_post_types as $key => $value) {\n\t\t\tif ($value !== 'portfolio' && $value !== 'product') {\n\t\t\t\t$cpt_obj = get_post_type_object($value);\n\n\t\t\t\tif ( is_object($cpt_obj) ) {\n\t\t\t\t\t$cpt_name = $cpt_obj->labels->name;\n\t\t\t\t\t$cpt_sing_name = $cpt_obj->labels->singular_name;\n\t\t\t\t\t$cpt_single_sections[] = array(\n\t\t\t\t\t\t'id' => 'uncode_'.$value.'_section',\n\t\t\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . ucfirst($cpt_sing_name) . '</span>',\n\t\t\t\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t\t\t\t);\n\t\t\t\t\t$cpt_index_sections[] = array(\n\t\t\t\t\t\t'id' => 'uncode_'.$value.'_index_section',\n\t\t\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . ucfirst($cpt_name) . '</span>',\n\t\t\t\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t\t\t\t);\n\t\t\t\t} elseif ( $value == 'author' ) {\n\t\t\t\t\t$cpt_index_sections[] = array(\n\t\t\t\t\t\t'id' => 'uncode_'.$value.'_index_section',\n\t\t\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Authors', 'uncode') . '</span>',\n\t\t\t\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tforeach ($uncode_post_types as $key => $value) {\n\t\t\tif ($value !== 'portfolio' && $value !== 'product' && $value !== 'author') {\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu_opaque);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_type);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_uncode_block);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_revslider);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_layerslider);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_height);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_min_height);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_style);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_content_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_custom_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_align);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_position);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_font);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_size);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_height);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_spacing);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_weight);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_transform);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_italic);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_text_animation);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_animation_speed);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_animation_delay);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_featured);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_background);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_parallax);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_kburns);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_overlay_color);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_overlay_color_alpha);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_scroll_opacity);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_scrolldown);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_layout_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_layout_width_custom);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_breadcrumb);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $breadcrumb_align);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, run_array_to($show_title, 'std', 'on'));\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_media);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_featured_media);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_comments);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_share);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $image_layout);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $media_size);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $enable_sticky_desc);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $enable_woo_zoom);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $thumb_cols);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $enable_woo_slider);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_uncode_block_after_pre);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_uncode_block_after);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_activate);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_widget);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_position);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_size);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_sticky);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_style);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_bgcolor);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_fill);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_activate);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_page_index);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_index_label);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_nextprev_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $footer_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $footer_uncode_block);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $footer_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $custom_fields_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $custom_fields_list);\n\t\t\t}\n\t\t}\n\t\tforeach ($uncode_post_types as $key => $value) {\n\t\t\tif ($value !== 'portfolio' && $value !== 'product') {\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_opaque);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', run_array_to($header_type, 'std', 'header_basic'));\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_uncode_block);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_revslider);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_layerslider);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_height);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_min_height);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_style);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_content_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_custom_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_align);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_position);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_font);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_size);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_height);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_spacing);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_weight);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_transform);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_italic);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_text_animation);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_animation_speed);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_animation_delay);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_featured);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_background);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_parallax);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_kburns);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_overlay_color);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_overlay_color_alpha);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_scroll_opacity);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_scrolldown);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_no_padding);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_no_padding_mobile);\n\t\t\t\tif ($value !== 'author') {\n\t\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $title_archive_custom_activate);\n\t\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $title_archive_custom_text);\n\t\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $subtitle_archive_custom_text);\n\t\t\t\t}\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $show_breadcrumb);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $breadcrumb_align);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_uncode_block);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_layout_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_single_post_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_single_text_lenght);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $show_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $remove_pagination);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', run_array_to($sidebar_activate, 'std', 'on'));\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_widget);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_position);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_size);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_sticky);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_style);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_bgcolor);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_fill);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $footer_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $footer_uncode_block);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $footer_width);\n\t\t\t}\n\t\t}\n\t}\n\n\t$custom_settings_section_one = array(\n\t\tarray(\n\t\t\t'id' => 'uncode_header_section',\n\t\t\t'title' => '<i class=\"fa fa-heart3\"></i> ' . esc_html__('Navbar', 'uncode'),\n\t\t\t'group' => esc_html__('General', 'uncode'),\n\t\t\t'group_icon' => 'fa-layout'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_main_section',\n\t\t\t'title' => '<i class=\"fa fa-layers\"></i> ' . esc_html__('Layout', 'uncode'),\n\t\t\t'group' => esc_html__('General', 'uncode'),\n\t\t) ,\n\t\t// array(\n\t\t// \t'id' => 'uncode_header_section',\n\t\t// \t'title' => '<i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode'),\n\t\t// \t'group' => esc_html__('General', 'uncode')\n\t\t// ) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_footer_section',\n\t\t\t'title' => '<i class=\"fa fa-ellipsis\"></i> ' . esc_html__('Footer', 'uncode'),\n\t\t\t'group' => esc_html__('General', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_post_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . esc_html__('Post', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode'),\n\t\t\t'group_icon' => 'fa-file2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_page_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . esc_html__('Page', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_portfolio_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . ucfirst($portfolio_cpt_name) . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t) ,\n\t);\n\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $cpt_single_sections );\n\n\t$custom_settings_section_two = array(\n\t\tarray(\n\t\t\t'id' => 'uncode_post_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Posts', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode'),\n\t\t\t'group_icon' => 'fa-archive2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_page_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Pages', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_portfolio_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . ucfirst($portfolio_cpt_name) . 's</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t) ,\n\t);\n\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $custom_settings_section_two );\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $cpt_index_sections );\n\n\t$custom_settings_section_three = array(\n\t\tarray(\n\t\t\t'id' => 'uncode_search_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Search', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_404_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-help\"></i> ' . esc_html__('404', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_colors_section',\n\t\t\t'title' => '<i class=\"fa fa-drop\"></i> ' . esc_html__('Palette', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode'),\n\t\t\t'group_icon' => 'fa-eye2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_typography_section',\n\t\t\t'title' => '<i class=\"fa fa-font\"></i> ' . esc_html__('Typography', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_customize_section',\n\t\t\t'title' => '<i class=\"fa fa-box\"></i> ' . esc_html__('Customize', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_extra_section',\n\t\t\t'title' => esc_html__('Extra', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_sidebars_section',\n\t\t\t'title' => '<i class=\"fa fa-content-right\"></i> ' . esc_html__('Sidebars', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode'),\n\t\t\t'group_icon' => 'fa-cog2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_connections_section',\n\t\t\t'title' => '<i class=\"fa fa-share2\"></i> ' . esc_html__('Socials', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_gmaps_section',\n\t\t\t'title' => '<i class=\"fa fa-map-o\"></i> ' . esc_html__('Google Maps', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_redirect_section',\n\t\t\t'title' => '<i class=\"fa fa-reply2\"></i> ' . esc_html__('Redirect', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_cssjs_section',\n\t\t\t'title' => '<i class=\"fa fa-code\"></i> ' . esc_html__('CSS & JS', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_performance_section',\n\t\t\t'title' => '<i class=\"fa fa-loader\"></i> ' . esc_html__('Performance', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t);\n\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $custom_settings_section_three );\n\n\t$custom_settings_one = array(\n\t\tarray(\n\t\t\t'id' => '_uncode_general_block_title',\n\t\t\t'label' => '<i class=\"fa fa-globe3\"></i> ' . esc_html__('General', 'uncode') ,\n\t\t\t'desc' => '',\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_main_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_main_width',\n\t\t\t'label' => esc_html__('Site width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter the width of your site.', 'uncode') ,\n\t\t\t'std' => array(\n\t\t\t\t'1200',\n\t\t\t\t'px'\n\t\t\t) ,\n\t\t\t'type' => 'measurement',\n\t\t\t'section' => 'uncode_main_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_main_align',\n\t\t\t'label' => esc_html__('Site layout align', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the alignment of the content area when is less then 100% width.', 'uncode') ,\n\t\t\t'std' => 'center',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'center',\n\t\t\t\t\t'label' => esc_html__('Center align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_boxed',\n\t\t\t'label' => esc_html__('Boxed', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate for the boxed layout.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_main_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_border',\n\t\t\t'label' => esc_html__('Body frame', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the thickness of the frame around the body', 'uncode') ,\n\t\t\t'std' => '0',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0,36,9',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_border_color',\n\t\t\t'label' => esc_html__('Body frame color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body frame color.', 'uncode') ,\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off),_uncode_body_border:not(0)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tstr_replace('%section%', 'main', run_array_to($header_section_title, 'condition', '_uncode_boxed:is(off)')),\n\t\tarray(\n\t\t\t'id' => '_uncode_header_full',\n\t\t\t'label' => esc_html__('Container full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to expand the header container to full width.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tstr_replace('%section%', 'main', run_array_to($body_section_title, 'condition', '_uncode_boxed:is(off)')),\n\t\tarray(\n\t\t\t'id' => '_uncode_body_full',\n\t\t\t'label' => esc_html__('Content area full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to expand the content area to full width.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_logo_block_title',\n\t\t\t'label' => '<i class=\"fa fa-heart3\"></i> ' . esc_html__('Logo', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_switch',\n\t\t\t'label' => esc_html__('Switchable logo', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to upload different logo for each skin.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo',\n\t\t\t'label' => esc_html__('Logo', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo. You can use Images, SVG code or HTML code.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_switch:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_light',\n\t\t\t'label' => esc_html__('Logo - Light', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo for the light skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_dark',\n\t\t\t'label' => esc_html__('Logo - Dark', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo for the dark skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile_switch',\n\t\t\t'label' => esc_html__('Different Logo Mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to upload different logo for mobile devices.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile',\n\t\t\t'label' => esc_html__('Logo Mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo for mobile. You can use Images, SVG code or HTML code.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_mobile_switch:is(on),_uncode_logo_switch:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile_light',\n\t\t\t'label' => esc_html__('Logo Mobile - Light', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo mobile for the light skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_mobile_switch:is(on),_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile_dark',\n\t\t\t'label' => esc_html__('Logo Mobile - Dark', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo mobile for the dark skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_mobile_switch:is(on),_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_height',\n\t\t\t'label' => esc_html__('Logo height', 'uncode'),\n\t\t\t'desc' => esc_html__('Enter the height of the logo in px.', 'uncode') ,\n\t\t\t'std' => '20',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_height_mobile',\n\t\t\t'label' => esc_html__('Logo height mobile', 'uncode'),\n\t\t\t'desc' => esc_html__('Enter the height of the logo in px for mobile version.', 'uncode') ,\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_headers_block_title',\n\t\t\t'label' => '<i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_headers',\n\t\t\t'desc' => esc_html__('Specify the menu layout.', 'uncode') ,\n\t\t\t'label' => '' ,\n\t\t\t'std' => 'hmenu-right',\n\t\t\t'type' => 'radio-image',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_hmenu_position',\n\t\t\t'label' => esc_html__('Menu horizontal position', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the horizontal position of the menu.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_position',\n\t\t\t'label' => esc_html__('Menu horizontal position', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the horizontal position of the menu.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_v_position',\n\t\t\t'label' => esc_html__('Menu vertical alignment', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the vertical alignment of the menu.', 'uncode') ,\n\t\t\t'std' => 'middle',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'top',\n\t\t\t\t\t'label' => esc_html__('Top', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'middle',\n\t\t\t\t\t'label' => esc_html__('Middle', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'bottom',\n\t\t\t\t\t'label' => esc_html__('Bottom', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_align',\n\t\t\t'label' => esc_html__('Menu horizontal alignment', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the horizontal alignment of the menu.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left Align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'center',\n\t\t\t\t\t'label' => esc_html__('Center Align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right Align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_width',\n\t\t\t'label' => esc_html__('Vertical menu width','uncode') ,\n\t\t\t'desc' => esc_html__('Vertical menu width in px', 'uncode') ,\n\t\t\t'std' => '252',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'rows' => '',\n\t\t\t'post_type' => '',\n\t\t\t'taxonomy' => '',\n\t\t\t'min_max_step' => '108,504,12',\n\t\t\t'class' => '',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_accordion_active',\n\t\t\t'label' => esc_html__('Vertical menu open', 'uncode') ,\n\t\t\t'desc' => esc_html__('Open the accordion menu at the current item menu on page loading.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:is(vmenu)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_full',\n\t\t\t'label' => esc_html__('Menu full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to expand the menu to full width. (Only for the horizontal menus).', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_visuals_block_title',\n\t\t\t'label' => '<i class=\"fa fa-eye2\"></i> ' . esc_html__('Visuals', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_shadows',\n\t\t\t'label' => esc_html__('Menu divider shadow', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the menu divider shadow.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_shadows',\n\t\t\t'label' => esc_html__('Menu dropdown shadow', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this for the shadow effect on menu dropdown on desktop view. NB. this option works for horizontal menus only.', 'uncode') ,\n\t\t\t'std' => 'none',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'std' => '',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'xs',\n\t\t\t\t\t'label' => esc_html__('Extra Small', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sm',\n\t\t\t\t\t'label' => esc_html__('Small', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'std',\n\t\t\t\t\t'label' => esc_html__('Standard', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'lg',\n\t\t\t\t\t'label' => esc_html__('Large', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'xl',\n\t\t\t\t\t'label' => esc_html__('Extra Large', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t),\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(vmenu-offcanvas),_uncode_headers:is(menu-overlay)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_darker_shadows',\n\t\t\t'label' => esc_html__('Menu dropdown darker shadow', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this for the dark shadow effect on menu dropdown on desktop view.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_submenu_shadows:not()',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_borders',\n\t\t\t'label' => esc_html__('Menu borders', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the menu borders.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_no_arrows',\n\t\t\t'label' => esc_html__('Hide dropdown arrows', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to hide the dropdow arrows.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_transparency',\n\t\t\t'label' => esc_html__('Menu mobile transparency', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the menu transparency when possible.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_custom_padding',\n\t\t\t'label' => esc_html__('Custom vertical padding', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate custom padding above and below the logo.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_custom_padding_desktop',\n\t\t\t'label' => esc_html__('Padding on desktop', 'uncode') ,\n\t\t\t'desc' => esc_html__('Set custom padding on desktop devices.', 'uncode') ,\n\t\t\t'std' => '27',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0,36,9',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_custom_padding:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_custom_padding_mobile',\n\t\t\t'label' => esc_html__('Padding on mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Set custom padding on mobile devices.', 'uncode') ,\n\t\t\t'std' => '27',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0,36,9',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_custom_padding:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_animation_block_title',\n\t\t\t'label' => '<i class=\"fa fa-fast-forward2\"></i> ' . esc_html__('Animation', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t// 'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(vmenu-offcanvas),_uncode_headers:is(menu-overlay)',\n\t\t\t// 'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_sticky',\n\t\t\t'label' => esc_html__('Menu sticky', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the sticky menu. This is a menu that is locked into place so that it does not disappear when the user scrolls down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(vmenu-offcanvas),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_sticky_mobile',\n\t\t\t'label' => esc_html__('Menu sticky mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the sticky menu on mobile devices. This is a menu that is locked into place so that it does not disappear when the user scrolls down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_centered',\n\t\t\t'label' => esc_html__('Menu centered mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the centered style for mobile menu. NB. You need to have the Menu Sticky Mobile active.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_sticky_mobile:is(on)',\n\t\t\t'operator' => 'and',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_hide',\n\t\t\t'label' => esc_html__('Menu hide', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the autohide menu. This is a menu that is hiding after the user have scrolled down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center),_uncode_headers:is(vmenu-offcanvas)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_hide_mobile',\n\t\t\t'label' => esc_html__('Menu hide mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the autohide menu on mobile devices. This is a menu that is hiding after the user have scrolled down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_shrink',\n\t\t\t'label' => esc_html__('Menu shrink', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the shrink menu. This is a menu where the logo shrinks after the user have scrolled down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center),_uncode_headers:is(vmenu-offcanvas)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_li_animation',\n\t\t\t'label' => esc_html__('Menu sub-levels animated', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the animation for menu sub-levels. NB. this option works for horizontal menus only.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:not(vmenu)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_animation',\n\t\t\t'label' => esc_html__('Menu open items animation', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu items animation when opening.', 'uncode') ,\n\t\t\t'std' => 'none',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_sticky_mobile:is(on),_uncode_menu_hide_mobile:is(on)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'none',\n\t\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'scale',\n\t\t\t\t\t'label' => esc_html__('Scale', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_overlay_animation',\n\t\t\t'label' => esc_html__('Menu overlay animation', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the overlay menu animation when opening and closing.', 'uncode') ,\n\t\t\t'std' => 'sequential',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '3d',\n\t\t\t\t\t'label' => esc_html__('3D', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sequential',\n\t\t\t\t\t'label' => esc_html__('Flat', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_min_logo',\n\t\t\t'label' => esc_html__('Minimum logo height', 'uncode'),\n\t\t\t'desc' => esc_html__('Enter the minimal height of the shrinked logo in <b>px</b>.', 'uncode') ,\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_shrink:is(on),_uncode_headers:not(vmenu)',\n\t\t\t'operator' => 'and',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_add_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square-plus\"></i> ' . esc_html__('Additionals', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_no_secondary',\n\t\t\t'label' => esc_html__('Hide secondary menu', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to hide the secondary menu.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_no_cta',\n\t\t\t'label' => esc_html__('Hide Call To Action menu', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to hide the Call To Action menu.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secondary_padding',\n\t\t\t'label' => esc_html__('Secondary menu padding', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to increase secondary menu padding.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_no_secondary:is(off)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_socials',\n\t\t\t'label' => esc_html__('Social icons', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the social connection icons in the menu bar.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_search',\n\t\t\t'label' => esc_html__('Search icon', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the search icon in the menu bar.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_search_animation',\n\t\t\t'label' => esc_html__('Search overlay animation', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the search overlay animation when opening and closing.', 'uncode') ,\n\t\t\t'std' => 'sequential',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '3d',\n\t\t\t\t\t'label' => esc_html__('3D', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sequential',\n\t\t\t\t\t'label' => esc_html__('Flat', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t) ,\n\t\t\t'condition' => '_uncode_menu_search:is(on)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_woocommerce_cart',\n\t\t\t'label' => esc_html__('Woocommerce cart', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the Woocommerce icon in the menu bar.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_woocommerce_cart_desktop',\n\t\t\t'label' => esc_html__('Woocommerce cart on menu bar', 'uncode') ,\n\t\t\t'desc' => esc_html__('Show the cart icon in the menu bar when layout is on desktop mode (only for Overlay and Offcanvas menu).', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_woocommerce_cart:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_woocommerce_cart_mobile',\n\t\t\t'label' => esc_html__('Woocommerce cart on menu bar for mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Show the cart icon in the menu bar when layout is on mobile mode.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_woocommerce_cart:is(on)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bloginfo',\n\t\t\t'label' => esc_html__('Top line text', 'uncode') ,\n\t\t\t'desc' => esc_html__('Insert additional text on top of the menu.','uncode') ,\n\t\t\t'type' => 'textarea',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:is(hmenu-right),_uncode_headers:is(hmenu-left),_uncode_headers:is(hmenu-justify),_uncode_headers:is(hmenu-center),_uncode_headers:is(hmenu-center-split)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\t//////////////////////\n\t\t// Post Single\t\t///\n\t\t//////////////////////\n\t\tstr_replace('%section%', 'post', $menu_section_title),\n\t\tstr_replace('%section%', 'post', $menu),\n\t\tstr_replace('%section%', 'post', $menu_width),\n\t\tstr_replace('%section%', 'post', $menu_opaque),\n\t\tstr_replace('%section%', 'post', $header_section_title),\n\t\tstr_replace('%section%', 'post', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'post', $header_uncode_block),\n\t\tstr_replace('%section%', 'post', $header_revslider),\n\t\tstr_replace('%section%', 'post', $header_layerslider),\n\n\t\tstr_replace('%section%', 'post', $header_width),\n\t\tstr_replace('%section%', 'post', $header_height),\n\t\tstr_replace('%section%', 'post', $header_min_height),\n\t\tstr_replace('%section%', 'post', $header_title),\n\t\tstr_replace('%section%', 'post', $header_style),\n\t\tstr_replace('%section%', 'post', $header_content_width),\n\t\tstr_replace('%section%', 'post', $header_custom_width),\n\t\tstr_replace('%section%', 'post', $header_align),\n\t\tstr_replace('%section%', 'post', $header_position),\n\t\tstr_replace('%section%', 'post', $header_title_font),\n\t\tstr_replace('%section%', 'post', $header_title_size),\n\t\tstr_replace('%section%', 'post', $header_title_height),\n\t\tstr_replace('%section%', 'post', $header_title_spacing),\n\t\tstr_replace('%section%', 'post', $header_title_weight),\n\t\tstr_replace('%section%', 'post', $header_title_transform),\n\t\tstr_replace('%section%', 'post', $header_title_italic),\n\t\tstr_replace('%section%', 'post', $header_text_animation),\n\t\tstr_replace('%section%', 'post', $header_animation_speed),\n\t\tstr_replace('%section%', 'post', $header_animation_delay),\n\t\tstr_replace('%section%', 'post', $header_featured),\n\t\tstr_replace('%section%', 'post', $header_background),\n\t\tstr_replace('%section%', 'post', $header_parallax),\n\t\tstr_replace('%section%', 'post', $header_kburns),\n\t\tstr_replace('%section%', 'post', $header_overlay_color),\n\t\tstr_replace('%section%', 'post', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'post', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'post', $header_scrolldown),\n\n\t\tstr_replace('%section%', 'post', $body_section_title),\n\t\tstr_replace('%section%', 'post', $body_layout_width),\n\t\tstr_replace('%section%', 'post', $body_layout_width_custom),\n\t\tstr_replace('%section%', 'post', $show_breadcrumb),\n\t\tstr_replace('%section%', 'post', $breadcrumb_align),\n\t\t// str_replace('%section%', 'post', $body_uncode_block_before),\n\t\tstr_replace('%section%', 'post', $show_title),\n\t\tstr_replace('%section%', 'post', $show_media),\n\t\tstr_replace('%section%', 'post', $show_featured_media),\n\t\tstr_replace('%section%', 'post', $show_comments),\n\t\tstr_replace('%section%', 'post', $show_share),\n\t\tstr_replace('%section%', 'post', $show_tags),\n\t\tstr_replace('%section%', 'post', $show_tags_align),\n\t\tstr_replace('%section%', 'post', $body_uncode_block_after_pre),\n\t\tstr_replace('%section%', 'post', $body_uncode_block_after),\n\t\tstr_replace('%section%', 'post', $sidebar_section_title),\n\t\tstr_replace('%section%', 'post', run_array_to($sidebar_activate, 'std', 'on')),\n\t\tstr_replace('%section%', 'post', $sidebar_widget),\n\t\tstr_replace('%section%', 'post', $sidebar_position),\n\t\tstr_replace('%section%', 'post', $sidebar_size),\n\t\tstr_replace('%section%', 'post', $sidebar_sticky),\n\t\tstr_replace('%section%', 'post', $sidebar_style),\n\t\tstr_replace('%section%', 'post', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'post', $sidebar_fill),\n\n\t\tstr_replace('%section%', 'post', $navigation_section_title),\n\t\tstr_replace('%section%', 'post', $navigation_activate),\n\t\tstr_replace('%section%', 'post', $navigation_page_index),\n\t\tstr_replace('%section%', 'post', $navigation_index_label),\n\t\tstr_replace('%section%', 'post', $navigation_nextprev_title),\n\t\tstr_replace('%section%', 'post', $footer_section_title),\n\t\tstr_replace('%section%', 'post', $footer_uncode_block),\n\t\tstr_replace('%section%', 'post', $footer_width),\n\t\tstr_replace('%section%', 'post', $custom_fields_section_title),\n\t\tstr_replace('%section%', 'post', $custom_fields_list),\n\t\t///////////////\n\t\t// Page\t\t///\n\t\t///////////////\n\t\tstr_replace('%section%', 'page', $menu_section_title),\n\t\tstr_replace('%section%', 'page', $menu),\n\t\tstr_replace('%section%', 'page', $menu_width),\n\t\tstr_replace('%section%', 'page', $menu_opaque),\n\t\tstr_replace('%section%', 'page', $header_section_title),\n\t\tstr_replace('%section%', 'page', $header_type),\n\t\tstr_replace('%section%', 'page', $header_uncode_block),\n\t\tstr_replace('%section%', 'page', $header_revslider),\n\t\tstr_replace('%section%', 'page', $header_layerslider),\n\n\t\tstr_replace('%section%', 'page', $header_width),\n\t\tstr_replace('%section%', 'page', $header_height),\n\t\tstr_replace('%section%', 'page', $header_min_height),\n\t\tstr_replace('%section%', 'page', $header_title),\n\t\tstr_replace('%section%', 'page', $header_style),\n\t\tstr_replace('%section%', 'page', $header_content_width),\n\t\tstr_replace('%section%', 'page', $header_custom_width),\n\t\tstr_replace('%section%', 'page', $header_align),\n\t\tstr_replace('%section%', 'page', $header_position),\n\t\tstr_replace('%section%', 'page', $header_title_font),\n\t\tstr_replace('%section%', 'page', $header_title_size),\n\t\tstr_replace('%section%', 'page', $header_title_height),\n\t\tstr_replace('%section%', 'page', $header_title_spacing),\n\t\tstr_replace('%section%', 'page', $header_title_weight),\n\t\tstr_replace('%section%', 'page', $header_title_transform),\n\t\tstr_replace('%section%', 'page', $header_title_italic),\n\t\tstr_replace('%section%', 'page', $header_text_animation),\n\t\tstr_replace('%section%', 'page', $header_animation_speed),\n\t\tstr_replace('%section%', 'page', $header_animation_delay),\n\t\tstr_replace('%section%', 'page', $header_featured),\n\t\tstr_replace('%section%', 'page', $header_background),\n\t\tstr_replace('%section%', 'page', $header_parallax),\n\t\tstr_replace('%section%', 'page', $header_kburns),\n\t\tstr_replace('%section%', 'page', $header_overlay_color),\n\t\tstr_replace('%section%', 'page', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'page', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'page', $header_scrolldown),\n\t\tstr_replace('%section%', 'page', $body_section_title),\n\t\tstr_replace('%section%', 'page', $body_layout_width),\n\t\tstr_replace('%section%', 'page', $body_layout_width_custom),\n\t\tstr_replace('%section%', 'page', $show_breadcrumb),\n\t\tstr_replace('%section%', 'page', $breadcrumb_align),\n\t\tstr_replace('%section%', 'page', run_array_to($show_title, 'std', 'on')),\n\t\tstr_replace('%section%', 'page', $show_media),\n\t\tstr_replace('%section%', 'page', $show_featured_media),\n\t\tstr_replace('%section%', 'page', $show_comments),\n\t\tstr_replace('%section%', 'page', $body_uncode_block_after),\n\t\tstr_replace('%section%', 'page', $sidebar_section_title),\n\t\tstr_replace('%section%', 'page', $sidebar_activate),\n\t\tstr_replace('%section%', 'page', $sidebar_widget),\n\t\tstr_replace('%section%', 'page', $sidebar_position),\n\t\tstr_replace('%section%', 'page', $sidebar_size),\n\t\tstr_replace('%section%', 'page', $sidebar_sticky),\n\t\tstr_replace('%section%', 'page', $sidebar_style),\n\t\tstr_replace('%section%', 'page', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'page', $sidebar_fill),\n\t\tstr_replace('%section%', 'page', $footer_section_title),\n\t\tstr_replace('%section%', 'page', $footer_uncode_block),\n\t\tstr_replace('%section%', 'page', $footer_width),\n\t\tstr_replace('%section%', 'page', $custom_fields_section_title),\n\t\tstr_replace('%section%', 'page', $custom_fields_list),\n\t\t///////////////////////////\n\t\t// Portfolio Single\t\t///\n\t\t///////////////////////////\n\t\tstr_replace('%section%', 'portfolio', $menu_section_title),\n\t\tstr_replace('%section%', 'portfolio', $menu),\n\t\tstr_replace('%section%', 'portfolio', $menu_width),\n\t\tstr_replace('%section%', 'portfolio', $menu_opaque),\n\t\tstr_replace('%section%', 'portfolio', $header_section_title),\n\t\tstr_replace('%section%', 'portfolio', $header_type),\n\t\tstr_replace('%section%', 'portfolio', $header_uncode_block),\n\t\tstr_replace('%section%', 'portfolio', $header_revslider),\n\t\tstr_replace('%section%', 'portfolio', $header_layerslider),\n\n\t\tstr_replace('%section%', 'portfolio', $header_width),\n\t\tstr_replace('%section%', 'portfolio', $header_height),\n\t\tstr_replace('%section%', 'portfolio', $header_min_height),\n\t\tstr_replace('%section%', 'portfolio', $header_title),\n\t\tstr_replace('%section%', 'portfolio', $header_style),\n\t\tstr_replace('%section%', 'portfolio', $header_content_width),\n\t\tstr_replace('%section%', 'portfolio', $header_custom_width),\n\t\tstr_replace('%section%', 'portfolio', $header_align),\n\t\tstr_replace('%section%', 'portfolio', $header_position),\n\t\tstr_replace('%section%', 'portfolio', $header_title_font),\n\t\tstr_replace('%section%', 'portfolio', $header_title_size),\n\t\tstr_replace('%section%', 'portfolio', $header_title_height),\n\t\tstr_replace('%section%', 'portfolio', $header_title_spacing),\n\t\tstr_replace('%section%', 'portfolio', $header_title_weight),\n\t\tstr_replace('%section%', 'portfolio', $header_title_transform),\n\t\tstr_replace('%section%', 'portfolio', $header_title_italic),\n\t\tstr_replace('%section%', 'portfolio', $header_text_animation),\n\t\tstr_replace('%section%', 'portfolio', $header_animation_speed),\n\t\tstr_replace('%section%', 'portfolio', $header_animation_delay),\n\t\tstr_replace('%section%', 'portfolio', $header_featured),\n\t\tstr_replace('%section%', 'portfolio', $header_background),\n\t\tstr_replace('%section%', 'portfolio', $header_parallax),\n\t\tstr_replace('%section%', 'portfolio', $header_kburns),\n\t\tstr_replace('%section%', 'portfolio', $header_overlay_color),\n\t\tstr_replace('%section%', 'portfolio', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'portfolio', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'portfolio', $header_scrolldown),\n\n\t\tstr_replace('%section%', 'portfolio', $body_section_title),\n\t\tstr_replace('%section%', 'portfolio', $body_layout_width),\n\t\tstr_replace('%section%', 'portfolio', $body_layout_width_custom),\n\t\tstr_replace('%section%', 'portfolio', $show_breadcrumb),\n\t\tstr_replace('%section%', 'portfolio', $breadcrumb_align),\n\t\tstr_replace('%section%', 'portfolio', run_array_to($show_title, 'std', 'on')),\n\t\tstr_replace('%section%', 'portfolio', $show_media),\n\t\tstr_replace('%section%', 'portfolio', $show_featured_media),\n\t\tstr_replace('%section%', 'portfolio', run_array_to($show_comments, 'std', 'off')),\n\t\tstr_replace('%section%', 'portfolio', $show_share),\n\t\tstr_replace('%section%', 'portfolio', $body_uncode_block_after),\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_details_title',\n\t\t\t'label' => '<i class=\"fa fa-briefcase3\"></i> ' . esc_html__('Details', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_details',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('details', 'uncode') ,\n\t\t\t'desc' => sprintf(esc_html__('Create here all the %s details label that you need.', 'uncode') , $portfolio_cpt_name) ,\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_portfolio_detail_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'detail-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => sprintf(esc_html__('Unique %s detail ID','uncode') , $portfolio_cpt_name) ,\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_position',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('details layout', 'uncode') ,\n\t\t\t'desc' => sprintf(esc_html__('Specify the layout template for all the %s posts.', 'uncode') , $portfolio_cpt_name) ,\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Select…', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'portfolio_top',\n\t\t\t\t\t'label' => esc_html__('Details on the top', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sidebar_right',\n\t\t\t\t\t'label' => esc_html__('Details on the right', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'portfolio_bottom',\n\t\t\t\t\t'label' => esc_html__('Details on the bottom', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sidebar_left',\n\t\t\t\t\t'label' => esc_html__('Details on the left', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_sidebar_size',\n\t\t\t'label' => esc_html__('Sidebar size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Set the sidebar size.', 'uncode') ,\n\t\t\t'std' => '4',\n\t\t\t'min_max_step' => '1,12,1',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_portfolio_position:not(),_uncode_portfolio_position:contains(sidebar)',\n\t\t) ,\n\t\tstr_replace('%section%', 'portfolio', run_array_to($sidebar_sticky, 'condition', '_uncode_portfolio_position:not(),_uncode_portfolio_position:contains(sidebar)')),\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_style',\n\t\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the sidebar text skin color.', 'uncode') ,\n\t\t\t'type' => 'select',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Inherit', \"uncode\") ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'light',\n\t\t\t\t\t'label' => esc_html__('Light', \"uncode\") ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'dark',\n\t\t\t\t\t'label' => esc_html__('Dark', \"uncode\") ,\n\t\t\t\t)\n\t\t\t),\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'condition' => '_uncode_portfolio_position:not()',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_bgcolor',\n\t\t\t'label' => esc_html__('Sidebar color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the sidebar background color.', 'uncode') ,\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'condition' => '_uncode_portfolio_position:not()',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_sidebar_fill',\n\t\t\t'label' => esc_html__('Sidebar filling space', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to remove padding around the sidebar and fill the height.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'std' => 'off',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_portfolio_position:not(),_uncode_portfolio_sidebar_bgcolor:not(),_uncode_portfolio_position:contains(sidebar)',\n\t\t),\n\t\tstr_replace('%section%', 'portfolio', $navigation_section_title),\n\t\tstr_replace('%section%', 'portfolio', $navigation_activate),\n\t\tstr_replace('%section%', 'portfolio', $navigation_page_index),\n\t\tstr_replace('%section%', 'portfolio', $navigation_index_label),\n\t\tstr_replace('%section%', 'portfolio', $navigation_nextprev_title),\n\t\tstr_replace('%section%', 'portfolio', $footer_section_title),\n\t\tstr_replace('%section%', 'portfolio', $footer_uncode_block),\n\t\tstr_replace('%section%', 'portfolio', $footer_width),\n\t\tstr_replace('%section%', 'portfolio', $custom_fields_section_title),\n\t\tstr_replace('%section%', 'portfolio', $custom_fields_list),\n\t);\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $cpt_single_options );\n\n\t$custom_settings_two = array(\n\t\t///////////////////\n\t\t// Page 404\t\t///\n\t\t///////////////////\n\t\tstr_replace('%section%', '404', $menu_section_title),\n\t\tstr_replace('%section%', '404', $menu),\n\t\tstr_replace('%section%', '404', $menu_width),\n\t\tstr_replace('%section%', '404', $menu_opaque),\n\t\tstr_replace('%section%', '404', $header_section_title),\n\t\tstr_replace('%section%', '404', $header_type),\n\t\tstr_replace('%section%', '404', $header_uncode_block),\n\t\tstr_replace('%section%', '404', $header_revslider),\n\t\tstr_replace('%section%', '404', $header_layerslider),\n\n\t\tstr_replace('%section%', '404', $header_width),\n\t\tstr_replace('%section%', '404', $header_height),\n\t\tstr_replace('%section%', '404', $header_min_height),\n\t\tstr_replace('%section%', '404', $header_title),\n\t\tstr_replace('%section%', '404', $header_title_text),\n\t\tstr_replace('%section%', '404', $header_style),\n\t\tstr_replace('%section%', '404', $header_content_width),\n\t\tstr_replace('%section%', '404', $header_custom_width),\n\t\tstr_replace('%section%', '404', $header_align),\n\t\tstr_replace('%section%', '404', $header_position),\n\t\tstr_replace('%section%', '404', $header_title_font),\n\t\tstr_replace('%section%', '404', $header_title_size),\n\t\tstr_replace('%section%', '404', $header_title_height),\n\t\tstr_replace('%section%', '404', $header_title_spacing),\n\t\tstr_replace('%section%', '404', $header_title_weight),\n\t\tstr_replace('%section%', '404', $header_title_transform),\n\t\tstr_replace('%section%', '404', $header_title_italic),\n\t\tstr_replace('%section%', '404', $header_text_animation),\n\t\tstr_replace('%section%', '404', $header_animation_speed),\n\t\tstr_replace('%section%', '404', $header_animation_delay),\n\t\tstr_replace('%section%', '404', $header_background),\n\t\tstr_replace('%section%', '404', $header_parallax),\n\t\tstr_replace('%section%', '404', $header_kburns),\n\t\tstr_replace('%section%', '404', $header_overlay_color),\n\t\tstr_replace('%section%', '404', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', '404', $header_scroll_opacity),\n\t\tstr_replace('%section%', '404', $header_scrolldown),\n\n\t\tstr_replace('%section%', '404', $body_section_title),\n\t\tstr_replace('%section%', '404', $body_layout_width),\n\t\tstr_replace('%section%', '404', $uncodeblock_404),\n\t\tstr_replace('%section%', '404', $uncodeblocks_404),\n\t\tstr_replace('%section%', '404', $footer_section_title),\n\t\tstr_replace('%section%', '404', $footer_uncode_block),\n\t\tstr_replace('%section%', '404', $footer_width),\n\t\t//////////////////////\n\t\t// Posts Index\t\t///\n\t\t//////////////////////\n\t\tstr_replace('%section%', 'post_index', $menu_section_title),\n\t\tstr_replace('%section%', 'post_index', $menu),\n\t\tstr_replace('%section%', 'post_index', $menu_width),\n\t\tstr_replace('%section%', 'post_index', $menu_opaque),\n\t\tstr_replace('%section%', 'post_index', $header_section_title),\n\t\tstr_replace('%section%', 'post_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'post_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'post_index', $header_revslider),\n\t\tstr_replace('%section%', 'post_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'post_index', $header_width),\n\t\tstr_replace('%section%', 'post_index', $header_height),\n\t\tstr_replace('%section%', 'post_index', $header_min_height),\n\t\tstr_replace('%section%', 'post_index', $header_title),\n\t\tstr_replace('%section%', 'post_index', $header_style),\n\t\tstr_replace('%section%', 'post_index', $header_content_width),\n\t\tstr_replace('%section%', 'post_index', $header_custom_width),\n\t\tstr_replace('%section%', 'post_index', $header_align),\n\t\tstr_replace('%section%', 'post_index', $header_position),\n\t\tstr_replace('%section%', 'post_index', $header_title_font),\n\t\tstr_replace('%section%', 'post_index', $header_title_size),\n\t\tstr_replace('%section%', 'post_index', $header_title_height),\n\t\tstr_replace('%section%', 'post_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'post_index', $header_title_weight),\n\t\tstr_replace('%section%', 'post_index', $header_title_transform),\n\t\tstr_replace('%section%', 'post_index', $header_title_italic),\n\t\tstr_replace('%section%', 'post_index', $header_text_animation),\n\t\tstr_replace('%section%', 'post_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'post_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'post_index', $header_featured),\n\t\tstr_replace('%section%', 'post_index', $header_background),\n\t\tstr_replace('%section%', 'post_index', $header_parallax),\n\t\tstr_replace('%section%', 'post_index', $header_kburns),\n\t\tstr_replace('%section%', 'post_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'post_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'post_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'post_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'post_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'post_index', $menu_no_padding_mobile),\n\t\tstr_replace('%section%', 'post_index', $title_archive_custom_activate),\n\t\tstr_replace('%section%', 'post_index', $title_archive_custom_text),\n\t\tstr_replace('%section%', 'post_index', $subtitle_archive_custom_text),\n\n\t\tstr_replace('%section%', 'post_index', $body_section_title),\n\t\tstr_replace('%section%', 'post_index', $show_breadcrumb),\n\t\tstr_replace('%section%', 'post_index', $breadcrumb_align),\n\t\tstr_replace('%section%', 'post_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'post_index', $body_layout_width),\n\t\tstr_replace('%section%', 'post_index', $body_single_post_width),\n\t\tstr_replace('%section%', 'post_index', $body_single_text_lenght),\n\t\tstr_replace('%section%', 'post_index', $show_title),\n\t\tstr_replace('%section%', 'post_index', $remove_pagination),\n\t\tstr_replace('%section%', 'post_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'post_index', run_array_to($sidebar_activate, 'std', 'on')),\n\t\tstr_replace('%section%', 'post_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'post_index', $sidebar_position),\n\t\tstr_replace('%section%', 'post_index', $sidebar_size),\n\t\tstr_replace('%section%', 'post_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'post_index', $sidebar_style),\n\t\tstr_replace('%section%', 'post_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'post_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'post_index', $footer_section_title),\n\t\tstr_replace('%section%', 'post_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'post_index', $footer_width),\n\t\t//////////////////////\n\t\t// Pages Index\t\t///\n\t\t//////////////////////\n\t\tstr_replace('%section%', 'page_index', $menu_section_title),\n\t\tstr_replace('%section%', 'page_index', $menu),\n\t\tstr_replace('%section%', 'page_index', $menu_width),\n\t\tstr_replace('%section%', 'page_index', $menu_opaque),\n\t\tstr_replace('%section%', 'page_index', $header_section_title),\n\t\tstr_replace('%section%', 'page_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'page_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'page_index', $header_revslider),\n\t\tstr_replace('%section%', 'page_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'page_index', $header_width),\n\t\tstr_replace('%section%', 'page_index', $header_height),\n\t\tstr_replace('%section%', 'page_index', $header_min_height),\n\t\tstr_replace('%section%', 'page_index', $header_title),\n\t\tstr_replace('%section%', 'page_index', $header_style),\n\t\tstr_replace('%section%', 'page_index', $header_content_width),\n\t\tstr_replace('%section%', 'page_index', $header_custom_width),\n\t\tstr_replace('%section%', 'page_index', $header_align),\n\t\tstr_replace('%section%', 'page_index', $header_position),\n\t\tstr_replace('%section%', 'page_index', $header_title_font),\n\t\tstr_replace('%section%', 'page_index', $header_title_size),\n\t\tstr_replace('%section%', 'page_index', $header_title_height),\n\t\tstr_replace('%section%', 'page_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'page_index', $header_title_weight),\n\t\tstr_replace('%section%', 'page_index', $header_title_transform),\n\t\tstr_replace('%section%', 'page_index', $header_title_italic),\n\t\tstr_replace('%section%', 'page_index', $header_text_animation),\n\t\tstr_replace('%section%', 'page_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'page_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'page_index', $header_featured),\n\t\tstr_replace('%section%', 'page_index', $header_background),\n\t\tstr_replace('%section%', 'page_index', $header_parallax),\n\t\tstr_replace('%section%', 'page_index', $header_kburns),\n\t\tstr_replace('%section%', 'page_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'page_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'page_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'page_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'page_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'page_index', $menu_no_padding_mobile),\n\n\t\tstr_replace('%section%', 'page_index', $body_section_title),\n\t\tstr_replace('%section%', 'page_index', $show_breadcrumb),\n\t\tstr_replace('%section%', 'page_index', $breadcrumb_align),\n\t\tstr_replace('%section%', 'page_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'page_index', $body_layout_width),\n\t\tstr_replace('%section%', 'page_index', $body_single_post_width),\n\t\tstr_replace('%section%', 'page_index', $body_single_text_lenght),\n\t\tstr_replace('%section%', 'page_index', $show_title),\n\t\tstr_replace('%section%', 'page_index', $remove_pagination),\n\t\tstr_replace('%section%', 'page_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'page_index', run_array_to($sidebar_activate, 'std', 'on')),\n\t\tstr_replace('%section%', 'page_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'page_index', $sidebar_position),\n\t\tstr_replace('%section%', 'page_index', $sidebar_size),\n\t\tstr_replace('%section%', 'page_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'page_index', $sidebar_style),\n\t\tstr_replace('%section%', 'page_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'page_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'page_index', $footer_section_title),\n\t\tstr_replace('%section%', 'page_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'page_index', $footer_width),\n\t\t////////////////////////\n\t\t// Archive Index\t\t///\n\t\t////////////////////////\n\t\tstr_replace('%section%', 'portfolio_index', $menu_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $menu),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_width),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_opaque),\n\t\tstr_replace('%section%', 'portfolio_index', $header_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'portfolio_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'portfolio_index', $header_revslider),\n\t\tstr_replace('%section%', 'portfolio_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'portfolio_index', $header_width),\n\t\tstr_replace('%section%', 'portfolio_index', $header_height),\n\t\tstr_replace('%section%', 'portfolio_index', $header_min_height),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title),\n\t\tstr_replace('%section%', 'portfolio_index', $header_style),\n\t\tstr_replace('%section%', 'portfolio_index', $header_content_width),\n\t\tstr_replace('%section%', 'portfolio_index', $header_custom_width),\n\t\tstr_replace('%section%', 'portfolio_index', $header_align),\n\t\tstr_replace('%section%', 'portfolio_index', $header_position),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_font),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_size),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_height),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_weight),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_transform),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_italic),\n\t\tstr_replace('%section%', 'portfolio_index', $header_text_animation),\n\t\tstr_replace('%section%', 'portfolio_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'portfolio_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'portfolio_index', $header_featured),\n\t\tstr_replace('%section%', 'portfolio_index', $header_background),\n\t\tstr_replace('%section%', 'portfolio_index', $header_parallax),\n\t\tstr_replace('%section%', 'portfolio_index', $header_kburns),\n\t\tstr_replace('%section%', 'portfolio_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'portfolio_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'portfolio_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'portfolio_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_no_padding_mobile),\n\t\tstr_replace('%section%', 'portfolio_index', $title_archive_custom_activate),\n\t\tstr_replace('%section%', 'portfolio_index', $title_archive_custom_text),\n\t\tstr_replace('%section%', 'portfolio_index', $subtitle_archive_custom_text),\n\n\t\tstr_replace('%section%', 'portfolio_index', $body_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $show_breadcrumb),\n\t\tstr_replace('%section%', 'portfolio_index', $breadcrumb_align),\n\t\tstr_replace('%section%', 'portfolio_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'portfolio_index', $body_layout_width),\n\t\tstr_replace('%section%', 'portfolio_index', $body_single_post_width),\n\t\tstr_replace('%section%', 'portfolio_index', $show_title),\n\t\tstr_replace('%section%', 'portfolio_index', $remove_pagination),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_activate),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_position),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_size),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_style),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'portfolio_index', $footer_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'portfolio_index', $footer_width),\n\t);\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_two );\n\t$custom_settings_one = array_merge( $custom_settings_one, $cpt_index_options );\n\n\t$custom_settings_three = array(\n\t\t///////////////////////\n\t\t// Search Index\t\t///\n\t\t///////////////////////\n\t\tstr_replace('%section%', 'search_index', $menu_section_title),\n\t\tstr_replace('%section%', 'search_index', $menu),\n\t\tstr_replace('%section%', 'search_index', $menu_width),\n\t\tstr_replace('%section%', 'search_index', $menu_opaque),\n\t\tstr_replace('%section%', 'search_index', $header_section_title),\n\t\tstr_replace('%section%', 'search_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'search_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'search_index', $header_revslider),\n\t\tstr_replace('%section%', 'search_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'search_index', $header_width),\n\t\tstr_replace('%section%', 'search_index', $header_height),\n\t\tstr_replace('%section%', 'search_index', $header_min_height),\n\t\tstr_replace('%section%', 'search_index', $header_title),\n\t\tstr_replace('%section%', 'search_index', $header_title_text),\n\t\tstr_replace('%section%', 'search_index', $header_style),\n\t\tstr_replace('%section%', 'search_index', $header_content_width),\n\t\tstr_replace('%section%', 'search_index', $header_custom_width),\n\t\tstr_replace('%section%', 'search_index', $header_align),\n\t\tstr_replace('%section%', 'search_index', $header_position),\n\t\tstr_replace('%section%', 'search_index', $header_title_font),\n\t\tstr_replace('%section%', 'search_index', $header_title_size),\n\t\tstr_replace('%section%', 'search_index', $header_title_height),\n\t\tstr_replace('%section%', 'search_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'search_index', $header_title_weight),\n\t\tstr_replace('%section%', 'search_index', $header_title_transform),\n\t\tstr_replace('%section%', 'search_index', $header_title_italic),\n\t\tstr_replace('%section%', 'search_index', $header_text_animation),\n\t\tstr_replace('%section%', 'search_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'search_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'search_index', $header_background),\n\t\tstr_replace('%section%', 'search_index', $header_parallax),\n\t\tstr_replace('%section%', 'search_index', $header_kburns),\n\t\tstr_replace('%section%', 'search_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'search_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'search_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'search_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'search_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'search_index', $menu_no_padding_mobile),\n\t\tstr_replace('%section%', 'search_index', $title_archive_custom_activate),\n\t\tstr_replace('%section%', 'search_index', $title_archive_custom_text),\n\t\tstr_replace('%section%', 'search_index', $subtitle_archive_custom_text),\n\n\t\tstr_replace('%section%', 'search_index', $body_section_title),\n\t\tstr_replace('%section%', 'search_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'search_index', $body_layout_width),\n\t\tstr_replace('%section%', 'search_index', $remove_pagination),\n\t\tstr_replace('%section%', 'search_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'search_index', $sidebar_activate),\n\t\tstr_replace('%section%', 'search_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'search_index', $sidebar_position),\n\t\tstr_replace('%section%', 'search_index', $sidebar_size),\n\t\tstr_replace('%section%', 'search_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'search_index', $sidebar_style),\n\t\tstr_replace('%section%', 'search_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'search_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'search_index', $footer_section_title),\n\t\tstr_replace('%section%', 'search_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'search_index', $footer_width),\n\n\t\tarray(\n\t\t\t'id' => '_uncode_sidebars',\n\t\t\t'label' => esc_html__('Site sidebars', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the sidebars you will need. A default sidebar is already defined.', 'uncode') ,\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_sidebars_section',\n\t\t\t'class' => 'list-item',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_sidebar_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'sidebar-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique sidebar ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_font_groups',\n\t\t\t'label' => esc_html__('Custom fonts', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the fonts you will need.', 'uncode') ,\n\t\t\t'std' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'title' => 'Font Default',\n\t\t\t\t\t'_uncode_font_group_unique_id' => 'font-555555',\n\t\t\t\t\t'_uncode_font_group' => 'manual',\n\t\t\t\t\t'_uncode_font_manual' => '-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif'\n\t\t\t\t),\n\t\t\t),\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_font_group_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'font-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique font ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_font_group',\n\t\t\t\t\t'label' => esc_html__('Uncode font', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify a font.', 'uncode') ,\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'choices' => $title_font,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_font_manual',\n\t\t\t\t\t'label' => esc_html__('Font family', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Enter a font family.', 'uncode') ,\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'condition' => '_uncode_font_group:is(manual)',\n\t\t\t\t\t'operator' => 'and'\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_font_size',\n\t\t\t'label' => esc_html__('Default font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for p,li,dt,dd,dl,address,label,small,pre in px.', 'uncode') ,\n\t\t\t'std' => '15',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_large_text_size',\n\t\t\t'label' => esc_html__('Large text font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for large text in px.', 'uncode') ,\n\t\t\t'std' => '18',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h1',\n\t\t\t'label' => esc_html__('Font size H1', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H1 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '35',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h2',\n\t\t\t'label' => esc_html__('Font size H2', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H2 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '29',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h3',\n\t\t\t'label' => esc_html__('Font size H3', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H3 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '24',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h4',\n\t\t\t'label' => esc_html__('Font size H4', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H4 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '20',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h5',\n\t\t\t'label' => esc_html__('Font size H5', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H5 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '17',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h6',\n\t\t\t'label' => esc_html__('Font size H6', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H6 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '14',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_sizes',\n\t\t\t'label' => esc_html__('Custom font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the additional font sizes you will need.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_size_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'fontsize-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique font size ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_size',\n\t\t\t\t\t'label' => esc_html__('Font size', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Font size in <b>px</b>.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_heights',\n\t\t\t'label' => esc_html__('Custom line height', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the additional font line heights you will need.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_height_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'fontheight-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique font height ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_height',\n\t\t\t\t\t'label' => esc_html__('Font line height', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Insert a line height.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_spacings',\n\t\t\t'label' => esc_html__('Custom letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the letter spacings you will need.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_spacing_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'fontspace-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique letter spacing ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_spacing',\n\t\t\t\t\t'label' => esc_html__('Letter spacing', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Letter spacing with the unit (em or px). Ex. 0.2em', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_colors_list',\n\t\t\t'label' => esc_html__('Color palettes', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define all the colors you will need.', 'uncode') ,\n\t\t\t'std' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Black','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-jevc',\n\t\t\t\t\t'_uncode_custom_color' => '#000000',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 1','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-nhtu',\n\t\t\t\t\t'_uncode_custom_color' => '#101213',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 2','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-wayh',\n\t\t\t\t\t'_uncode_custom_color' => '#141618',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 3','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-rgdb',\n\t\t\t\t\t'_uncode_custom_color' => '#1b1d1f',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 4','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-prif',\n\t\t\t\t\t'_uncode_custom_color' => '#303133',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('White','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-xsdn',\n\t\t\t\t\t'_uncode_custom_color' => '#ffffff',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 1','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-lxmt',\n\t\t\t\t\t'_uncode_custom_color' => '#f7f7f7',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 2','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-gyho',\n\t\t\t\t\t'_uncode_custom_color' => '#eaeaea',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 3','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-uydo',\n\t\t\t\t\t'_uncode_custom_color' => '#dddddd',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 4','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-wvjs',\n\t\t\t\t\t'_uncode_custom_color' => '#777',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Cerulean','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-vyce',\n\t\t\t\t\t'_uncode_custom_color' => '#0cb4ce',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Blue Ribbon','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-210407',\n\t\t\t\t\t'_uncode_custom_color' => '#006cff',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_colors_section',\n\t\t\t'class' => 'list-colors',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color_unique_id',\n\t\t\t\t\t'std' => 'color-',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique color ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color_regular',\n\t\t\t\t\t'label' => esc_html__('Monochrome', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Activate to assign a monochromatic color, otherwise a gradient will be used.', 'uncode') ,\n\t\t\t\t\t'std' => 'on',\n\t\t\t\t\t'type' => 'on-off',\n\t\t\t\t\t'section' => 'uncode_customize_section',\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color',\n\t\t\t\t\t'label' => esc_html__('Colorpicker', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify the color for this palette. You can also define a color with the alpha value.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t'condition' => '_uncode_custom_color_regular:is(on)',\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color_gradient',\n\t\t\t\t\t'label' => esc_html__('Gradient', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify the gradient color for this palette. NB. You can use a gradient color only as a background color.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'gradientpicker',\n\t\t\t\t\t'condition' => '_uncode_custom_color_regular:is(off)',\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_light_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square-o\"></i> ' . esc_html__('Light skin', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_color_light',\n\t\t\t'label' => esc_html__('SVG/Text logo color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the logo color if it\\'s a SVG or textual.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_color_light',\n\t\t\t'label' => esc_html__('Menu text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu text color.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_color_light',\n\t\t\t'label' => esc_html__('Primary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_alpha_light',\n\t\t\t'label' => esc_html__('Primary menu background opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu background transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_bg_color_light',\n\t\t\t'label' => esc_html__('Primary submenu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary submenu background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_color_light',\n\t\t\t'label' => esc_html__('Primary menu border color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu border color.', 'uncode') ,\n\t\t\t'std' => 'color-gyho',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_alpha_light',\n\t\t\t'label' => esc_html__('Primary menu border opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu border transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secmenu_bg_color_light',\n\t\t\t'label' => esc_html__('Secondary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the secondary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_color_light',\n\t\t\t'label' => esc_html__('Headings color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the headings text color.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_text_color_light',\n\t\t\t'label' => esc_html__('Content text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content area text color.', 'uncode') ,\n\t\t\t'std' => 'color-wvjs',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_background_color_light',\n\t\t\t'label' => esc_html__('Content background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_dark_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square\"></i> ' . esc_html__('Dark skin', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_color_dark',\n\t\t\t'label' => esc_html__('SVG/Text logo color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the logo color if it\\'s a SVG or textual.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_color_dark',\n\t\t\t'label' => esc_html__('Menu text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu text color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_color_dark',\n\t\t\t'label' => esc_html__('Primary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-wayh',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_alpha_dark',\n\t\t\t'label' => esc_html__('Primary menu background opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu background transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_bg_color_dark',\n\t\t\t'label' => esc_html__('Primary submenu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary submenu background color.', 'uncode') ,\n\t\t\t'std' => 'color-rgdb',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_color_dark',\n\t\t\t'label' => esc_html__('Primary menu border color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu border color.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_alpha_dark',\n\t\t\t'label' => esc_html__('Primary menu border opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu border transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secmenu_bg_color_dark',\n\t\t\t'label' => esc_html__('Secondary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the secondary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-wayh',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_color_dark',\n\t\t\t'label' => esc_html__('Headings color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the headings text color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_text_color_dark',\n\t\t\t'label' => esc_html__('Content text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content area text color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_background_color_dark',\n\t\t\t'label' => esc_html__('Content background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content background color.', 'uncode') ,\n\t\t\t'std' => 'color-wayh',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_general_block_title',\n\t\t\t'label' => '<i class=\"fa fa-globe3\"></i> ' . esc_html__('General', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_background',\n\t\t\t'label' => esc_html__('HTML body background', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body background color and media.', 'uncode') ,\n\t\t\t'type' => 'background',\n\t\t\t'std' => array(\n\t\t\t\t'background-color' => 'color-lxmt',\n\t\t\t\t'background-repeat' => '',\n\t\t\t\t'background-attachment' => '',\n\t\t\t\t'background-position' => '',\n\t\t\t\t'background-size' => '',\n\t\t\t\t'background-image' => '',\n\t\t\t),\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_accent_color',\n\t\t\t'label' => esc_html__('Accent color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the accent color.', 'uncode') ,\n\t\t\t'std' => 'color-210407',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_link_color',\n\t\t\t'label' => esc_html__('Links color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the color of links in page textual contents.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Default', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'accent',\n\t\t\t\t\t'label' => esc_html__('Accent color', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_font_family',\n\t\t\t'label' => esc_html__('Body font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_font_weight',\n\t\t\t'label' => esc_html__('Body font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body font weight.', 'uncode') ,\n\t\t\t'std' => '400',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_ui_font_family',\n\t\t\t'label' => esc_html__('UI font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the UI font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_ui_font_weight',\n\t\t\t'label' => esc_html__('UI font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the UI font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_family',\n\t\t\t'label' => esc_html__('Headings font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the headings font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_weight',\n\t\t\t'label' => esc_html__('Headings font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the Headings font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_letter_spacing',\n\t\t\t'label' => esc_html__('Headings letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the letter spacing in EMs.', 'uncode') ,\n\t\t\t'std' => '0.00',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_input_underline',\n\t\t\t'label' => esc_html__('Input text underlined', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to style all the input text with the underline.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_fallback_font',\n\t\t\t'label' => esc_html__('Fallback font', 'uncode') ,\n\t\t\t'desc' => esc_html__('Select a font to use as fallback when Google Fonts import is not available.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_style_block_title',\n\t\t\t'label' => '<i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_overlay_menu_style',\n\t\t\t'label' => esc_html__('Overlay menu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the overlay menu skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_color_hover',\n\t\t\t'label' => esc_html__('Menu highlight color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu active and hover effect color (If not specified an opaque version of the menu color will be used).', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_primary_menu_style',\n\t\t\t'label' => esc_html__('Primary menu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_primary_submenu_style',\n\t\t\t'label' => esc_html__('Primary submenu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary submenu skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secondary_menu_style',\n\t\t\t'label' => esc_html__('Secondary menu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the secondary menu skin.', 'uncode') ,\n\t\t\t'std' => 'dark',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '_uncode_headers:is(hmenu-right),_uncode_headers:is(hmenu-left),_uncode_headers:is(hmenu-justify),_uncode_headers:is(hmenu-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_font_size',\n\t\t\t'label' => esc_html__('Menu font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font size. NB: the Overlay menu font size is automatic relative to the viewport.', 'uncode') ,\n\t\t\t'std' => '12',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_font_size',\n\t\t\t'label' => esc_html__('Submenu font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the submenu font size. NB: the Overlay submenu font size is automatic relative to the viewport.', 'uncode') ,\n\t\t\t'std' => '12',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_font_size',\n\t\t\t'label' => esc_html__('Mobile menu font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font size for mobile (when the Navbar > Animation > is not Menu Centered Mobile).', 'uncode') ,\n\t\t\t'std' => '12',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_font_family',\n\t\t\t'label' => esc_html__('Menu font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_font_weight',\n\t\t\t'label' => esc_html__('Menu font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_letter_spacing',\n\t\t\t'label' => esc_html__('Menu letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the letter spacing in EMs (the default value is 0.05).', 'uncode') ,\n\t\t\t'std' => '0.05',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_first_uppercase',\n\t\t\t'label' => esc_html__('Menu first level uppercase', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to transform the first menu level to uppercase.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_other_uppercase',\n\t\t\t'label' => esc_html__('Menu other levels uppercase', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to transform all the others menu level to uppercase.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_content_block_title',\n\t\t\t'label' => '<i class=\"fa fa-layout\"></i> ' . esc_html__('Content', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_general_style',\n\t\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'light',\n\t\t\t\t\t'label' => esc_html__('Light', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'dark',\n\t\t\t\t\t'label' => esc_html__('Dark', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_general_bg_color',\n\t\t\t'label' => esc_html__('Background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify a custom content background color.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_buttons_block_title',\n\t\t\t'label' => '<i class=\"fa fa-download3\"></i> ' . esc_html__('Buttons and Forms', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_font_family',\n\t\t\t'label' => esc_html__('Buttons font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the buttons font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_font_weight',\n\t\t\t'label' => esc_html__('Buttons font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the buttons font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_text_transform',\n\t\t\t'label' => esc_html__('Buttons text transform', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the buttons text transform.', 'uncode') ,\n\t\t\t'std' => 'uppercase',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'initial',\n\t\t\t\t\t'label' => esc_html__('Default', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'uppercase',\n\t\t\t\t\t'label' => esc_html__('Uppercase', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'lowercase',\n\t\t\t\t\t'label' => esc_html__('Lowercase', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'capitalize',\n\t\t\t\t\t'label' => esc_html__('Capitalize', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t) ,\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_letter_spacing',\n\t\t\t'label' => esc_html__('Buttons letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the letter spacing value.', 'uncode') ,\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $btn_letter_spacing,\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_border_width',\n\t\t\t'label' => esc_html__('Button and form fields border', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the width of the borders for buttons and form fields', 'uncode') ,\n\t\t\t'std' => '1',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '1,5,1',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_button_hover',\n\t\t\t'label' => esc_html__('Button hover effect', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify an effect on hover state.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Outlined', 'uncode')\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'full-colored',\n\t\t\t\t\t'label' => esc_html__('Flat', 'uncode')\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_style_block_title',\n\t\t\t'label' => '<i class=\"fa fa-ellipsis\"></i> ' . esc_html__('Footer', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_last_style',\n\t\t\t'label' => esc_html__('Copyright area skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the copyright area skin color.', 'uncode') ,\n\t\t\t'std' => 'dark',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_bg_color',\n\t\t\t'label' => esc_html__('Copyright area custom background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify a custom copyright area background color.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_customize_extra_block_title',\n\t\t\t'label' => '<i class=\"fa fa-download3\"></i> ' . esc_html__('Scroll & Parallax', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_scroll_constant',\n\t\t\t'label' => esc_html__('ScrollTo constant speed', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to always have a constant speed when scrolling to point.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_scroll_constant_factor',\n\t\t\t'label' => esc_html__('ScrollTo constant speed factor', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the constant scroll speed factor. Default 2', 'uncode') ,\n\t\t\t'std' => '2',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '1,15,0.25',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_scroll_constant:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_scroll_speed_value',\n\t\t\t'label' => esc_html__('ScrollTo speed fixed', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the scroll speed time in milliseconds.', 'uncode') ,\n\t\t\t'std' => '1000',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_scroll_constant:is(off)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_parallax_factor',\n\t\t\t'label' => esc_html__('Parallax speed factor', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the parallax speed factor. Default 2.5', 'uncode') ,\n\t\t\t'std' => '2.5',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0.5,3,0.5',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_portfolio_block_title',\n\t\t\t'label' => '<i class=\"fa fa-briefcase3\"></i> ' . ucfirst($portfolio_cpt_name) . ' ' . esc_html__('CPT', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_cpt',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('CPT label', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter a custom portfolio post type label.', 'uncode') ,\n\t\t\t'std' => 'portfolio',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_cpt_slug',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('CPT slug', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter a custom portfolio post type slug.', 'uncode') ,\n\t\t\t'std' => 'portfolio',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t)\n\t);\n\n\tif (class_exists('WooCommerce')) {\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_block_title',\n\t\t\t'label' => '<i class=\"fa fa-shopping-cart\"></i> ' . esc_html__('WooCommerce', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t);\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_cart_icon',\n\t\t\t'label' => esc_html__('Cart icon', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the cart icon', 'uncode') ,\n\t\t\t'std' => 'fa fa-bag',\n\t\t\t'type' => 'text',\n\t\t\t'class' => 'button_icon_container',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t);\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_hooks',\n\t\t\t'label' => esc_html__('Enable Hooks', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to enable default WooCommerce hooks on product loops.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t);\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_enhanced_atc',\n\t\t\t'label' => esc_html__('Enhance Add To Cart Button', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to enable the enhanced Add To Cart button on loops.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t);\n\t}\n\n\t$custom_settings_four = array(\n\t\tarray(\n\t\t\t'id' => '_uncode_customize_admin_block_title',\n\t\t\t'label' => '<i class=\"fa fa-dashboard\"></i> ' . esc_html__('Admin', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_admin_help',\n\t\t\t'label' => esc_html__('Help button in admin bar', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the Uncode help button in the WP admin bar.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t);\n\n\t$custom_settings_five = array(\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_layout_block_title',\n\t\t\t'label' => '<i class=\"fa fa-layers\"></i> ' . esc_html__('Layout', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_full',\n\t\t\t'label' => esc_html__('Footer full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Expand the footer to full width.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_content_block_title',\n\t\t\t'label' => '<i class=\"fa fa-cog2\"></i> ' . esc_html__('Widget area', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_block',\n\t\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the Content Block to use as a footer content.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'custom-post-type-select',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'post_type' => 'uncodeblock',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_last_block_title',\n\t\t\t'label' => '<i class=\"fa fa-copyright\"></i> ' . esc_html__('Copyright area', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_copy_hide',\n\t\t\t'label' => esc_html__('Hide Copyright Area', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'desc' => esc_html__('Activate this to hide the Copyright Area.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_copyright',\n\t\t\t'label' => esc_html__('Automatic copyright text', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to use an automatic copyright text.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_text',\n\t\t\t'label' => esc_html__('Custom copyright text', 'uncode') ,\n\t\t\t'desc' => esc_html__('Insert a custom text for the footer copyright area.', 'uncode') ,\n\t\t\t'type' => 'textarea',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_footer_copyright:is(off)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_position',\n\t\t\t'label' => esc_html__('Content alignment', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the footer copyright text alignment.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode')\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'center',\n\t\t\t\t\t'label' => esc_html__('Center', 'uncode')\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode')\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_social',\n\t\t\t'label' => esc_html__('Social links', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to have the social icons in the footer copyright area.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_add_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square-plus\"></i> ' . esc_html__('Additionals', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_uparrow',\n\t\t\t'label' => esc_html__('Scroll up button', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to add a scroll up button in the footer.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'std' => 'on',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_uparrow_mobile',\n\t\t\t'label' => esc_html__('Scroll up button on mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to add a scroll up button in the footer for mobile devices.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'std' => 'on',\n\t\t\t'condition' => '_uncode_footer_uparrow:is(on)',\n\t\t\t'operator' => 'and',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_social_list',\n\t\t\t'label' => esc_html__('Social Networks', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the social networks you will need.', 'uncode') ,\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_connections_section',\n\t\t\t'class' => 'list-social',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_social_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'social-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique social ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_social',\n\t\t\t\t\t'label' => esc_html__('Social Network Icon', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify the social network icon.', 'uncode') ,\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'class' => 'button_icon_container',\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_link',\n\t\t\t\t\t'label' => esc_html__('Social Network Link', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Enter your social network link.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'condition' => '',\n\t\t\t\t\t'operator' => 'and'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_menu_hidden',\n\t\t\t\t\t'label' => esc_html__('Hide In The Menu', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Activate to hide the social icon in the menu (if the social connections in the menu is active).', 'uncode') ,\n\t\t\t\t\t'std' => 'off',\n\t\t\t\t\t'type' => 'on-off',\n\t\t\t\t\t'condition' => '',\n\t\t\t\t\t'operator' => 'and'\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_gmaps_api',\n\t\t\t'label' => esc_html__('Google Maps API KEY', 'uncode') ,\n\t\t\t'desc' => sprintf( wp_kses(__( 'To use Uncode custom styled Google Maps you need to create <a href=\"%s\" target=\"_blank\">here the Google API KEY</a> and paste it in this field.', 'uncode' ), array( 'a' => array( 'href' => array(),'target' => array() ) ) ), 'https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key' ),\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_gmaps_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_css',\n\t\t\t'label' => esc_html__('CSS', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter here your custom CSS.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'css',\n\t\t\t'section' => 'uncode_cssjs_section',\n\t\t\t'rows' => '20',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_js',\n\t\t\t'label' => esc_html__('Javascript', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter here your custom Javacript code.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'textarea-simple',\n\t\t\t'section' => 'uncode_cssjs_section',\n\t\t\t'rows' => '20',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_tracking',\n\t\t\t'label' => esc_html__('Tracking', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter here your custom Tracking code.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'textarea-simple',\n\t\t\t'section' => 'uncode_cssjs_section',\n\t\t\t'rows' => '20',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive',\n\t\t\t'label' => esc_html__('Adaptive images', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to take advantage of the Adaptive Images system. Adaptive Images detects your visitor\\'s screen size and automatically delivers device appropriate re-scaled images.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_async',\n\t\t\t'label' => esc_html__('Asynchronous adaptive image system', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to load the adaptive images asynchronously, this will improve the loading performance and it\\'s necessary if using an aggresive caching system.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_async_blur',\n\t\t\t'label' => esc_html__('Asynchronous loading blur effect', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to use a bluring effect when loading the images.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_adaptive:is(on),_uncode_adaptive_async:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_mobile_advanced',\n\t\t\t'label' => esc_html__('Mobile settings', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to set specific mobile options.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_use_orientation_width',\n\t\t\t'label' => esc_html__('Use current mobile orientation width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to use the current mobile orientation width (portrait or landscape) instead of the max device\\'s width (landscape).', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_adaptive:is(on),_uncode_adaptive_mobile_advanced:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_limit_density',\n\t\t\t'label' => esc_html__('Limit device density', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to limit the pixel density to 2 when generating the most appropriate image for high pixel density displays.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_adaptive:is(on),_uncode_adaptive_mobile_advanced:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_quality',\n\t\t\t'label' => esc_html__('Image quality', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the images compression quality.', 'uncode') ,\n\t\t\t'std' => '90',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '60,100,1',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_sizes',\n\t\t\t'label' => esc_html__('Image sizes range', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter all the image sizes you want use for the Adaptive Images system. NB. The values needs to be comma separated.', 'uncode') ,\n\t\t\t'type' => 'text',\n\t\t\t'std' => '258,516,720,1032,1440,2064,2880',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_htaccess',\n\t\t\t'label' => esc_html__('Apache Server Configs', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the enhanced .htaccess, this will improve the web site\\'s performance and security.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_production',\n\t\t\t'label' => esc_html__('Production mode', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to switch to production mode, the CSS and JS will be cached by the browser and the JS minified.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_redirect',\n\t\t\t'label' => esc_html__('Activate page redirect', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to redirect all the website calls to a specific page. NB. This can only be visible when the user is not logged in.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_redirect_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_redirect_page',\n\t\t\t'label' => esc_html__('Redirect page', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the redirect page. NB. This page will be presented without menu and footer.', 'uncode') ,\n\t\t\t'type' => 'page_select',\n\t\t\t'section' => 'uncode_redirect_section',\n\t\t\t'post_type' => 'page',\n\t\t\t'condition' => '_uncode_redirect:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t);\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_three );\n\n\tif ( ! defined('ENVATO_HOSTED_SITE') )\n\t\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_four );\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_five );\n\n\t$custom_settings = array(\n\t\t'sections' => $custom_settings_section_one,\n\t\t'settings' => $custom_settings_one,\n\t);\n\n\tif (class_exists('WooCommerce'))\n\t{\n\n\t\t$woo_section = array(\n\t\t\t// array(\n\t\t\t// \t'id' => 'uncode_woocommerce_section',\n\t\t\t// \t'title' => '<i class=\"fa fa-shopping-cart\"></i> ' . esc_html__('WooCommerce', 'uncode')\n\t\t\t// ),\n\t\t\tarray(\n\t\t\t\t'id' => 'uncode_product_section',\n\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . esc_html__('Product', 'uncode') . '</span>',\n\t\t\t\t'group' => esc_html__('Single', 'uncode'),\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'id' => 'uncode_product_index_section',\n\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Products', 'uncode') . '</span>',\n\t\t\t\t'group' => esc_html__('Archives', 'uncode'),\n\t\t\t) ,\n\t\t);\n\n\t\t$menus_array[] = array(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Select…', 'uncode')\n\t\t);\n\t\t$menu_array = array();\n\t\t$nav_menus = get_registered_nav_menus();\n\n\t\tforeach ($nav_menus as $location => $description)\n\t\t{\n\n\t\t\t$menu_array['value'] = $location;\n\t\t\t$menu_array['label'] = $description;\n\t\t\t$menus_array[] = $menu_array;\n\t\t}\n\n\t\t$menus_array[] = array(\n\t\t\t'value' => 'social',\n\t\t\t'label' => esc_html__('Social Menu', 'uncode')\n\t\t);\n\n\t\t$woocommerce_post = array(\n\t\t\t/////////////////////////\n\t\t\t// Product Single\t\t///\n\t\t\t/////////////////////////\n\t\t\tstr_replace('%section%', 'product', $menu_section_title),\n\t\t\tstr_replace('%section%', 'product', $menu),\n\t\t\tstr_replace('%section%', 'product', $menu_width),\n\t\t\tstr_replace('%section%', 'product', $menu_opaque),\n\t\t\tstr_replace('%section%', 'product', $header_section_title),\n\t\t\tstr_replace('%section%', 'product', $header_type),\n\t\t\tstr_replace('%section%', 'product', $header_uncode_block),\n\t\t\tstr_replace('%section%', 'product', $header_revslider),\n\t\t\tstr_replace('%section%', 'product', $header_layerslider),\n\n\t\t\tstr_replace('%section%', 'product', $header_width),\n\t\t\tstr_replace('%section%', 'product', $header_height),\n\t\t\tstr_replace('%section%', 'product', $header_min_height),\n\t\t\tstr_replace('%section%', 'product', $header_title),\n\t\t\tstr_replace('%section%', 'product', $header_style),\n\t\t\tstr_replace('%section%', 'product', $header_content_width),\n\t\t\tstr_replace('%section%', 'product', $header_custom_width),\n\t\t\tstr_replace('%section%', 'product', $header_align),\n\t\t\tstr_replace('%section%', 'product', $header_position),\n\t\t\tstr_replace('%section%', 'product', $header_title_font),\n\t\t\tstr_replace('%section%', 'product', $header_title_size),\n\t\t\tstr_replace('%section%', 'product', $header_title_height),\n\t\t\tstr_replace('%section%', 'product', $header_title_spacing),\n\t\t\tstr_replace('%section%', 'product', $header_title_weight),\n\t\t\tstr_replace('%section%', 'product', $header_title_transform),\n\t\t\tstr_replace('%section%', 'product', $header_title_italic),\n\t\t\tstr_replace('%section%', 'product', $header_text_animation),\n\t\t\tstr_replace('%section%', 'product', $header_animation_speed),\n\t\t\tstr_replace('%section%', 'product', $header_animation_delay),\n\t\t\tstr_replace('%section%', 'product', $header_featured),\n\t\t\tstr_replace('%section%', 'product', $header_background),\n\t\t\tstr_replace('%section%', 'product', $header_parallax),\n\t\t\tstr_replace('%section%', 'product', $header_kburns),\n\t\t\tstr_replace('%section%', 'product', $header_overlay_color),\n\t\t\tstr_replace('%section%', 'product', $header_overlay_color_alpha),\n\t\t\tstr_replace('%section%', 'product', $header_scroll_opacity),\n\t\t\tstr_replace('%section%', 'product', $header_scrolldown),\n\n\t\t\tstr_replace('%section%', 'product', $body_section_title),\n\t\t\tstr_replace('%section%', 'product', $body_layout_width),\n\t\t\tstr_replace('%section%', 'product', $body_layout_width_custom),\n\t\t\tstr_replace('%section%', 'product', $show_breadcrumb),\n\t\t\tstr_replace('%section%', 'product', $breadcrumb_align),\n\t\t\tstr_replace('%section%', 'product', $show_title),\n\t\t\tstr_replace('%section%', 'product', $show_share),\n\t\t\tstr_replace('%section%', 'product', $image_layout),\n\t\t\tstr_replace('%section%', 'product', $media_size),\n\t\t\tstr_replace('%section%', 'product', $enable_sticky_desc),\n\t\t\tstr_replace('%section%', 'product', $enable_woo_zoom),\n\t\t\tstr_replace('%section%', 'product', $thumb_cols),\n\t\t\tstr_replace('%section%', 'product', $enable_woo_slider),\n\t\t\tstr_replace('%section%', 'product', $body_uncode_block_after),\n\t\t\tstr_replace('%section%', 'product', $navigation_section_title),\n\t\t\tstr_replace('%section%', 'product', $navigation_activate),\n\t\t\tstr_replace('%section%', 'product', $navigation_page_index),\n\t\t\tstr_replace('%section%', 'product', $navigation_index_label),\n\t\t\tstr_replace('%section%', 'product', $navigation_nextprev_title),\n\t\t\tstr_replace('%section%', 'product', $footer_section_title),\n\t\t\tstr_replace('%section%', 'product', $footer_uncode_block),\n\t\t\tstr_replace('%section%', 'product', $footer_width),\n\t\t\tstr_replace('%section%', 'product', $custom_fields_section_title),\n\t\t\tstr_replace('%section%', 'product', $custom_fields_list),\n\t\t\t/////////////////////////\n\t\t\t// Products Index\t\t///\n\t\t\t/////////////////////////\n\t\t\tstr_replace('%section%', 'product_index', $menu_section_title),\n\t\t\tstr_replace('%section%', 'product_index', $menu),\n\t\t\tstr_replace('%section%', 'product_index', $menu_width),\n\t\t\tstr_replace('%section%', 'product_index', $menu_opaque),\n\t\t\tstr_replace('%section%', 'product_index', $header_section_title),\n\t\t\tstr_replace('%section%', 'product_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\t\tstr_replace('%section%', 'product_index', $header_uncode_block),\n\t\t\tstr_replace('%section%', 'product_index', $header_revslider),\n\t\t\tstr_replace('%section%', 'product_index', $header_layerslider),\n\n\t\t\tstr_replace('%section%', 'product_index', $header_width),\n\t\t\tstr_replace('%section%', 'product_index', $header_height),\n\t\t\tstr_replace('%section%', 'product_index', $header_min_height),\n\t\t\tstr_replace('%section%', 'product_index', $header_title),\n\t\t\tstr_replace('%section%', 'product_index', $header_style),\n\t\t\tstr_replace('%section%', 'product_index', $header_content_width),\n\t\t\tstr_replace('%section%', 'product_index', $header_custom_width),\n\t\t\tstr_replace('%section%', 'product_index', $header_align),\n\t\t\tstr_replace('%section%', 'product_index', $header_position),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_font),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_size),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_height),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_spacing),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_weight),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_transform),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_italic),\n\t\t\tstr_replace('%section%', 'product_index', $header_text_animation),\n\t\t\tstr_replace('%section%', 'product_index', $header_animation_speed),\n\t\t\tstr_replace('%section%', 'product_index', $header_animation_delay),\n\t\t\tstr_replace('%section%', 'product_index', $header_featured),\n\t\t\tstr_replace('%section%', 'product_index', $header_background),\n\t\t\tstr_replace('%section%', 'product_index', $header_parallax),\n\t\t\tstr_replace('%section%', 'product_index', $header_kburns),\n\t\t\tstr_replace('%section%', 'product_index', $header_overlay_color),\n\t\t\tstr_replace('%section%', 'product_index', $header_overlay_color_alpha),\n\t\t\tstr_replace('%section%', 'product_index', $header_scroll_opacity),\n\t\t\tstr_replace('%section%', 'product_index', $header_scrolldown),\n\t\t\tstr_replace('%section%', 'product_index', $menu_no_padding),\n\t\t\tstr_replace('%section%', 'product_index', $menu_no_padding_mobile),\n\t\t\tstr_replace('%section%', 'product_index', $title_archive_custom_activate),\n\t\t\tstr_replace('%section%', 'product_index', $title_archive_custom_text),\n\t\t\tstr_replace('%section%', 'product_index', $subtitle_archive_custom_text),\n\n\t\t\tstr_replace('%section%', 'product_index', $body_section_title),\n\t\t\tstr_replace('%section%', 'product_index', $show_breadcrumb),\n\t\t\tstr_replace('%section%', 'product_index', $breadcrumb_align),\n\t\t\tstr_replace('%section%', 'product_index', $body_uncode_block),\n\t\t\tstr_replace('%section%', 'product_index', $body_layout_width),\n\t\t\tstr_replace('%section%', 'product_index', $body_single_post_width),\n\t\t\tstr_replace('%section%', 'product_index', $show_title),\n\t\t\tstr_replace('%section%', 'product_index', $remove_pagination),\n\t\t\tstr_replace('%section%', 'product_index', $products_per_page),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_section_title),\n\t\t\tstr_replace('%section%', 'product_index', run_array_to($sidebar_activate, 'std', 'on')),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_widget),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_position),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_size),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_sticky),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_style),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_bgcolor),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_fill),\n\t\t\tstr_replace('%section%', 'product_index', $footer_section_title),\n\t\t\tstr_replace('%section%', 'product_index', $footer_uncode_block),\n\t\t\tstr_replace('%section%', 'product_index', $footer_width),\n\t\t);\n\n\t\t$custom_settings['sections'] = array_merge( $custom_settings['sections'], $woo_section );\n\t\t// array_push($custom_settings['settings'], $woocommerce_cart_icon);\n\t\t// array_push($custom_settings['settings'], $woocommerce_hooks);\n\t\t$custom_settings['settings'] = array_merge( $custom_settings['settings'], $woocommerce_post );\n\n\t}\n\n\t$custom_settings['settings'] = array_filter( $custom_settings['settings'], 'uncode_is_not_null' );\n\n\t/* allow settings to be filtered before saving */\n\t$custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);\n\n\t/* settings are not the same update the DB */\n\tif ($saved_settings !== $custom_settings)\n\t{\n\t\tupdate_option(ot_settings_id() , $custom_settings);\n\t}\n\n\t/**\n\t * Filter on layout images.\n\t */\n\tfunction filter_layout_radio_images($array, $layout)\n\t{\n\n\t\t/* only run the filter where the field ID is my_radio_images */\n\t\tif ($layout == '_uncode_headers')\n\t\t{\n\t\t\t$array = array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-right.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-justify',\n\t\t\t\t\t'label' => esc_html__('Justify', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-justify.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-left.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-center',\n\t\t\t\t\t'label' => esc_html__('Center', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-center.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-center-split',\n\t\t\t\t\t'label' => esc_html__('Center Split', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-splitted.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-center-double',\n\t\t\t\t\t'label' => esc_html__('Center Double', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-center-double.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'vmenu',\n\t\t\t\t\t'label' => esc_html__('Lateral', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/vmenu.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'vmenu-offcanvas',\n\t\t\t\t\t'label' => esc_html__('Offcanvas', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/offcanvas.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'menu-overlay',\n\t\t\t\t\t'label' => esc_html__('Overlay', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/overlay.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'menu-overlay-center',\n\t\t\t\t\t'label' => esc_html__('Overlay Center', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/overlay-center.jpg'\n\t\t\t\t) ,\n\t\t\t);\n\t\t}\n\t\treturn $array;\n\t}\n\tadd_filter('ot_radio_images', 'filter_layout_radio_images', 10, 2);\n}", "function charity_create_contenttype() {\n $content = \"\\t\";\n $content .= \"<meta http-equiv=\\\"Content-Type\\\" content=\\\"\";\n $content .= get_bloginfo('html_type'); \n $content .= \"; charset=\";\n $content .= get_bloginfo('charset');\n $content .= \"\\\" />\";\n $content .= \"\\n\\n\";\n echo apply_filters('charity_create_contenttype', $content);\n}", "function segments_after_theme_setup() {\n load_theme_textdomain( 'segments', get_template_directory() . '/languages' );\n\n add_theme_support( 'automatic-feed-links' );\n add_theme_support( 'post-thumbnails' );\n add_theme_support( 'menus' );\n add_theme_support( 'custom-logo' );\n add_theme_support( 'title-tag' );\n add_theme_support( 'custom-header' );\n add_theme_support( 'custom-background' );\n\n if ( ! isset( $content_width ) ) {\n $content_width = 1200; \n }\n}", "function get_themes()\n {\n }", "function hook_teaser_types() {\n return array(\n 'teaser' => 1,\n );\n}", "function custom_theme_options() {\n \n /* OptionTree is not loaded yet */\n if ( ! function_exists( 'ot_settings_id' ) )\n return false;\n \n /**\n * Get a copy of the saved settings array. \n */\n $saved_settings = get_option( ot_settings_id(), array() );\n \n /**\n * Custom settings array that will eventually be \n * passes to the OptionTree Settings API Class.\n */\n $custom_settings = array( \n 'contextual_help' => array( \n 'sidebar' => ''\n ),\n 'sections' => array( \n array(\n 'id' => 'general_default',\n 'title' => '基本设置'\n ),\n array(\n 'id' => 'advanced_settings',\n 'title' => '高级设置'\n ),\n array(\n 'id' => 'appearance',\n 'title' => '外观样式'\n ),\n array(\n 'id' => 'social_icons',\n 'title' => '社交网络'\n ),\n array(\n 'id' => 'analytics_seo',\n 'title' => '统计代码&amp;SEO'\n )\n ),\n 'settings' => array( \n array(\n 'id' => 'owner_photo',\n 'label' => '首页头像',\n 'desc' => '请填写图片网址或者上传图片,建议尺寸:100x100',\n 'std' => '',\n 'type' => 'upload',\n 'section' => 'general_default',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'owner_first_name',\n 'label' => '姓氏',\n 'desc' => '将显示在头像的左侧。建议1-4个字,或者留空',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'general_default',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'owner_last_name',\n 'label' => '名字',\n 'desc' => '将显示在头像的右侧。建议1-4个字,或者留空',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'general_default',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'contact_info',\n 'label' => '欢迎辞/网站公告',\n 'desc' => '填写后将出现在首页右上角、社交图标的上方',\n 'std' => '',\n 'type' => 'textarea',\n 'section' => 'general_default',\n 'rows' => '5',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'copyright_text',\n 'label' => '页脚文字',\n 'desc' => '显示于每个页面的最下方,可以是版权信息、站点地图链接等,支持HTML代码',\n 'std' => '',\n 'type' => 'textarea',\n 'section' => 'general_default',\n 'rows' => '5',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'profile_page',\n 'label' => '指定首页页面',\n 'desc' => '首页内容一般为简要的自我介绍。新建相应页面后,在这里选中,网站首页显示的即为该页面的内容',\n 'std' => '',\n 'type' => 'page-select',\n 'section' => 'general_default',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'resume_page',\n 'label' => '指定简历页面',\n 'desc' => '新建相应页面后,在这里选中,“简历”显示的即为该页面的内容',\n 'std' => '',\n 'type' => 'page-select',\n 'section' => 'general_default',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'portfolio_page',\n 'label' => '指定作品页面',\n 'desc' => '新建相应页面(页面的模板必须为“Portofolio 模版”)后,在这里选中,新建的“作品”将显示在该页面内',\n 'std' => '',\n 'type' => 'page-select',\n 'section' => 'general_default',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'blog_page',\n 'label' => '指定博客页面',\n 'desc' => '新建相应页面(页面的模板必须为“Blog 模版”)后,在这里选中,新建的“文章”将显示在该页面内',\n 'std' => '',\n 'type' => 'page-select',\n 'section' => 'general_default',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'contact_page',\n 'label' => '指定留言页面',\n 'desc' => '新建相应页面(页面的模板为“Contact 模版”)后,在这里选中,将其指定为“留言”页面',\n 'std' => '',\n 'type' => 'page-select',\n 'section' => 'general_default',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'if_ajaxify',\n 'label' => '是否开启全站Ajax',\n 'desc' => '如果希望全站播放背景音乐,请务必开启此项',\n 'std' => '',\n 'type' => 'on-off',\n 'section' => 'advanced_settings',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'custom_reloadjs',\n 'label' => '重载JS',\n 'desc' => '开启全站Ajax后可能导致某些document.ready触发的功能失效(比如百度推荐),请在此处粘贴相应JS代码',\n 'std' => '',\n 'type' => 'textarea-simple',\n 'section' => 'advanced_settings',\n 'rows' => '6',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'bgm',\n 'label' => '背景音乐列表',\n 'desc' => '请填写js列表网址或直接上传文件,此处留空则不播放背景音乐。js列表格式请参照“无需上传文件”文件夹中的 radio_content_example.js',\n 'std' => '',\n 'type' => 'upload',\n 'section' => 'advanced_settings',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'work_items_link_status',\n 'label' => '作品链接至详情页面',\n 'desc' => '勾选后点击作品的名字可以进入该作品页面。适用于每个作品都有详细介绍的情况',\n 'std' => '',\n 'type' => 'on-off',\n 'section' => 'advanced_settings',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'blog_sidebar',\n 'label' => '博客侧边栏小工具',\n 'desc' => '是否启用博客页面的侧边栏小工具',\n 'std' => '',\n 'type' => 'on-off',\n 'section' => 'advanced_settings',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'duoshuo_domain',\n 'label' => '多说域名(×××.duoshuo.com)',\n 'desc' => '填写后多说“最近访客”小工具才能正常使用。已经注册过多说的用户直接填写×××处内容,未注册的请先到 <a href=\"http://duoshuo.com/create-site/\" title=\"创建多说站点\" target=\"_blank\">这里</a> 创建站点,然后填写',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'advanced_settings',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'background_pattern',\n 'label' => '背景图片',\n 'desc' => '请填写图片网址或者上传图片',\n 'std' => '',\n 'type' => 'upload',\n 'section' => 'appearance',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'background_grid',\n 'label' => '背景网点',\n 'desc' => '背景图上是否加一层网点',\n 'std' => '',\n 'type' => 'radio',\n 'section' => 'appearance',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and',\n 'choices' => array( \n array(\n 'value' => 'bright',\n 'label' => '灰色网点(偏亮)',\n 'src' => ''\n ),\n array(\n 'value' => 'dark',\n 'label' => '黑色网点(偏暗)',\n 'src' => ''\n ),\n array(\n 'value' => 'no',\n 'label' => '不使用',\n 'src' => ''\n )\n )\n ),\n array(\n 'id' => 'custom_css',\n 'label' => '自定义CSS',\n 'desc' => '请直接粘贴你的CSS源代码',\n 'std' => '',\n 'type' => 'textarea-simple',\n 'section' => 'appearance',\n 'rows' => '8',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'fav_icon',\n 'label' => 'Favicon图标',\n 'desc' => '请填写图标网址或者上传图标,建议尺寸:16x16',\n 'std' => '',\n 'type' => 'upload',\n 'section' => 'appearance',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'apple_touch_icon',\n 'label' => 'Favicon图标(57x57)',\n 'desc' => '请填写图标网址或者上传图标,建议尺寸:57x57',\n 'std' => '',\n 'type' => 'upload',\n 'section' => 'appearance',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'apple_touch_icon_72',\n 'label' => 'Favicon图标(72x72)',\n 'desc' => '请填写图标网址或者上传图标,建议尺寸:72x72',\n 'std' => '',\n 'type' => 'upload',\n 'section' => 'appearance',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'apple_touch_icon_114',\n 'label' => 'Favicon图标(114x114)',\n 'desc' => '请填写图标网址或者上传图标,建议尺寸:114x114',\n 'std' => '',\n 'type' => 'upload',\n 'section' => 'appearance',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'sina_id',\n 'label' => '新浪微博(http://weibo.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'tencent_id',\n 'label' => '腾讯微博(http://t.qq.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'baidu_id',\n 'label' => '百度贴吧(http://www.baidu.com/p/×××?from=tieba 或者 http://tieba.baidu.com/home/main?id=×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'renren_id',\n 'label' => '人人(http://www.renren.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'kaixin_id',\n 'label' => '开心网(http://www.kaixin001.com/home/?uid=×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'qq_id',\n 'label' => 'QQ',\n 'desc' => '请填写数字QQ号。如果不想在网址中暴露QQ号,请到 <a href=\"http://shang.qq.com/v3/widget.html\" target=\"_blank\">这里</a> ——设置——安全级别设置,选择“安全加密”,保存后刷新网页,到“QQ通讯组件”获取代码,并在此处填入您的IDKEY(代码中IDKEY=后面的48位字符串)',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'qq_qr',\n 'label' => '手机QQ二维码',\n 'desc' => '请填写您的QQ二维码网址,在此处上传,或者直接使用媒体库中的图片',\n 'std' => '',\n 'type' => 'upload',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'twitter_id',\n 'label' => 'Twitter(https://twitter.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'facebook_id',\n 'label' => 'Facebook(https://www.facebook.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'gplus_id',\n 'label' => 'Google Plus(https://plus.google.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'skype_id',\n 'label' => 'Skype',\n 'desc' => '请填写您的Skype帐号。访客点击后默认会启动Skype打开和您的文字聊天窗口。',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'youku_id',\n 'label' => '优酷(http://i.youku.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'tudou_id',\n 'label' => '土豆(http://www.tudou.com/home/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'bilibili_id',\n 'label' => '哔哩哔哩(http://space.bilibili.tv/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'xiami_id',\n 'label' => '虾米(http://www.xiami.com/u/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'songtaste_id',\n 'label' => 'SongTaste(http://www.songtaste.com/user/×××/)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'huaban_id',\n 'label' => '花瓣(http://huaban.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'youtube_id',\n 'label' => 'Youtube(https://www.youtube.com/user/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'vimeo_id',\n 'label' => 'Vimeo(http://vimeo.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'soundcloud_id',\n 'label' => 'SoundCloud(https://soundcloud.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'flickr_id',\n 'label' => 'Flickr(https://www.flickr.com/photos/×××/)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'instagram_id',\n 'label' => 'Instagram(http://instagram.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'f500px_id',\n 'label' => '500px(http://500px.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'pinterest_id',\n 'label' => 'Pinterest(http://www.pinterest.com/×××/)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'zhihu_id',\n 'label' => '知乎(http://www.zhihu.com/people/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'guokr_id',\n 'label' => '果壳(http://www.guokr.com/i/×××/)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'douban_id',\n 'label' => '豆瓣(http://www.douban.com/people/×××/)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'zcool_id',\n 'label' => '站酷(http://www.zcool.com.cn/u/××× 或 http://×××.zcool.com.cn/)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'yiyan_id',\n 'label' => '译言(http://user.yeeyan.org/u/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'segmentfault_id',\n 'label' => 'SegmentFault(http://segmentfault.com/u/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'quora_id',\n 'label' => 'Quora(https://www.quora.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'dropbox_id',\n 'label' => 'Dropbox 邀请链接(https://db.tt/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'linkedin_id',\n 'label' => 'Linkedin(http://www.linkedin.com/pub/×××/×××/×××/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'dribbble_id',\n 'label' => 'Dribbble(http://dribbble.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'github_id',\n 'label' => 'Github(https://github.com/×××)',\n 'desc' => '请填写完整URL,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'stackexchange_id',\n 'label' => 'StackExchange(http://stackexchange.com/users/×××)',\n 'desc' => '请填写完整URL,包含http(s)://。注意这里是总站StackExchange的,不要填成了StackOverflow的',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'wechat_qr',\n 'label' => '微信',\n 'desc' => '请填写您的微信二维码网址,在此处上传,或者直接使用媒体库中的图片',\n 'std' => '',\n 'type' => 'upload',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'yixin_qr',\n 'label' => '易信',\n 'desc' => '请填写您的易信二维码网址,在此处上传,或者直接使用媒体库中的图片',\n 'std' => '',\n 'type' => 'upload',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'line_qr',\n 'label' => 'Line',\n 'desc' => '请填写您的Line二维码网址,在此处上传,或者直接使用媒体库中的图片',\n 'std' => '',\n 'type' => 'upload',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'whatsapp_qr',\n 'label' => 'Whatsapp',\n 'desc' => '请填写您的Whatsapp二维码网址,在此处上传,或者直接使用媒体库中的图片',\n 'std' => '',\n 'type' => 'upload',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'mail_address',\n 'label' => 'E-mail',\n 'desc' => '请填写邮箱地址(如[email protected])或者在线写信类网址(如QQ邮箱“邮我”,在设置——账户的最下方开启该功能并获取代码后,在此处填入href=之后,双引号之间的那个网址)',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'rss_feed',\n 'label' => 'RSS Feed',\n 'desc' => '请填写完整网址,包含http(s)://。一般为“您的博客网址/feed/”',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'any_url',\n 'label' => '自定义链接',\n 'desc' => '请填写完整网址,包含http(s)://',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'social_icons',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'header_analytics_code',\n 'label' => '页头统计代码',\n 'desc' => '适用于任何要求在页头(head)部分加载的统计代码,如谷歌统计,百度统计异步代码。请直接粘贴您的代码(包含script标签),支持多个统计代码,但建议只用一个',\n 'std' => '',\n 'type' => 'textarea-simple',\n 'section' => 'analytics_seo',\n 'rows' => '4',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'footer_analytics',\n 'label' => '页尾统计代码',\n 'desc' => '适用于任何要求在页尾(footer)部分加载的统计代码,如腾讯统计,百度统计普通代码。请直接粘贴您的代码(包含script标签),支持多个统计代码,但建议只用一个',\n 'std' => '',\n 'type' => 'textarea-simple',\n 'section' => 'analytics_seo',\n 'rows' => '4',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'baidu_tuijian',\n 'label' => '百度推荐',\n 'desc' => '在<a href=\"http://tuijian.baidu.com\" target=\"_blank\">百度推荐</a>获取异步代码后,填写id=\"hm_t_×××\"引号中的内容',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'analytics_seo',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'site_description',\n 'label' => '站点描述',\n 'desc' => '适当、准确地描述你的网站。如果不想出现 Description 标签用于SEO,此处请留空',\n 'std' => '',\n 'type' => 'textarea-simple',\n 'section' => 'analytics_seo',\n 'rows' => '4',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'site_keywords',\n 'label' => '关键词',\n 'desc' => '网站关键词,关键词之间用半角英文逗号隔开。如果不想出现 Keywords 标签用于SEO,此处请留空',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'analytics_seo',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n ),\n array(\n 'id' => 'site_author',\n 'label' => '作者',\n 'desc' => '网站作者或者所有者的名字。如果不想出现 Author 标签用于SEO,此处请留空',\n 'std' => '',\n 'type' => 'text',\n 'section' => 'analytics_seo',\n 'rows' => '',\n 'post_type' => '',\n 'taxonomy' => '',\n 'min_max_step'=> '',\n 'class' => '',\n 'condition' => '',\n 'operator' => 'and'\n )\n )\n );\n \n /* allow settings to be filtered before saving */\n $custom_settings = apply_filters( ot_settings_id() . '_args', $custom_settings );\n \n /* settings are not the same update the DB */\n if ( $saved_settings !== $custom_settings ) {\n update_option( ot_settings_id(), $custom_settings ); \n }\n \n /* Lets OptionTree know the UI Builder is being overridden */\n global $ot_has_custom_theme_options;\n $ot_has_custom_theme_options = true;\n \n}", "function tvp40_theme_setup() { // todo: check docs and enable required extensions\n\n\t/* Enable custom template hierarchy. */\n\tadd_theme_support( 'hybrid-core-template-hierarchy' );\n\n\t/* The best thumbnail/image script ever. */\n\tadd_theme_support( 'get-the-image' );\n\n\t/* Pagination. */\n\tadd_theme_support( 'loop-pagination' );\n\n\t/* Nicer [gallery] shortcode implementation. */\n\tadd_theme_support( 'cleaner-gallery' );\n\n\t/* Better captions for themes to style. */\n\tadd_theme_support( 'cleaner-caption' );\n\n\t/* Automatically add feed links to <head>. */\n\tadd_theme_support( 'automatic-feed-links' );\n\n\t/* Post formats. */\n\tadd_theme_support( \n\t\t'post-formats', \n\t\tarray( 'aside', 'audio', 'chat', 'image', 'gallery', 'link', 'quote', 'status', 'video' ) \n\t);\n\n\t/* Editor styles. */\n\tadd_editor_style( tvp40_get_editor_styles() );\n\n\t/* Handle content width for embeds and images. */\n\thybrid_set_content_width( 1100 ); //todo:change to fit\n}", "function setupTheme()\n{\n add_theme_support('post-thumbnails', ['destination']);\n registerPostTypes();\n registerTaxonomies();\n}", "function shell_theme_context_setup() {\r\n\r\n\t/* Additional Body class */\r\n\tadd_filter( 'body_class','shell_body_class');\r\n\r\n\t/* Additional css classes for widgets */\r\n\tadd_filter( 'dynamic_sidebar_params', 'shell_widget_classes' );\r\n\r\n\t/* Hybrid Core Context */\r\n\tadd_filter( 'hybrid_context', 'shell_hybrid_context' );\r\n\r\n\t/* Atomic Widget Plugin Context */\r\n\tadd_filter( 'atomic_widget_context', 'shell_atomic_widgets_context' );\r\n\r\n\t/* Post format singular template */\r\n\tadd_filter( 'single_template', 'shell_post_format_singular_template', 11 );\r\n}", "private function x_get_page_type(){\n global $wp_query;\n \n \n $og_type = 'website';\n \n if ( self::is_home_static_page() ) {\n $this->mod_defaults[ 'is_home' ] = true; \n $og_type = 'website';\n }\n elseif ( self::is_home_posts_page() ) {\n $this->mod_defaults[ 'is_home_page' ] = true; \n $og_type = 'website';\n }\n elseif ( self::is_posts_page() ) {\n $this->mod_defaults[ 'is_home_index' ] = true; \n $og_type = 'website';\n }\n elseif ( is_singular() ) {\n $this->mod_defaults[ 'is_singular' ] = true; \n }\n elseif ( is_search() ) {\n $this->mod_defaults[ 'is_search' ] = true; \n }\n elseif ( is_category() ) {\n $this->mod_defaults[ 'is_category' ] = true; \n }\n elseif ( is_tag() ) {\n $this->mod_defaults[ 'is_tag' ] = true; \n }\n elseif ( is_tax() ) {\n $this->mod_defaults[ 'is_tax' ] = true; \n }\n// elseif ( is_term() ) {\n// $this->mod_defaults[ 'is_term' ] = true; \n// }\n elseif ( is_author() ) {\n $og_type = 'profile';\n $this->mod_defaults[ 'is_author' ] = true; \n }\n elseif ( function_exists ('is_shop') && is_shop() ) {\n $this->mod_defaults[ 'is_shop' ] = true; \n $this->mod_defaults[ 'is_shop_archive' ] = true; \n }\n elseif ( is_post_type_archive() ) {\n $this->mod_defaults[ 'is_post_type_archive' ] = true; \n }\n elseif ( is_archive() ) {\n $this->mod_defaults[ 'is_archive' ] = true; \n }\n elseif ( is_404() ) {\n $this->mod_defaults[ 'is_404' ] = true; \n }\n \n $this->mod_defaults[ 'is_post_type_archive' ] = isset($wp_query->is_post_type_archive) ? $wp_query->is_post_type_archive : false;\n \n if( $this->is_post_page() ){\n if( ! empty( $post_type = get_post_type() ) && isset( MetaTagAssets::$MTA[ 'head' ][ 'og_type_ns' ][ $post_type ] )){\n $og_type = $post_type;\n }else {\n $og_type = !isset($this->options->aios_web_graph_options['og_post_type']) || empty( $this->options->aios_web_graph_options['og_post_type'] ) ? 'article' : $this->options->aios_web_graph_options['og_post_type'];\n }\n }\n \n $this->mod_defaults[ 'og_type' ] = $og_type;\n \n }", "function fiorello_mikado_theme_setup() {\n\t\t//add support for feed links\n\t\tadd_theme_support( 'automatic-feed-links' );\n\n\t\t//add support for post formats\n\t\tadd_theme_support( 'post-formats', array( 'gallery', 'link', 'quote', 'video', 'audio' ) );\n\n\t\t//add theme support for post thumbnails\n\t\tadd_theme_support( 'post-thumbnails' );\n\n\t\t//add theme support for title tag\n\t\tadd_theme_support( 'title-tag' );\n\n //add theme support for editor style\n add_editor_style( 'framework/admin/assets/css/editor-style.css' );\n\n\t\t//defined content width variable\n\t\t$GLOBALS['content_width'] = apply_filters( 'fiorello_mikado_filter_set_content_width', 1100 );\n\n\t\t//define thumbnail sizes\n\t\tadd_image_size( 'fiorello_mikado_square', 650, 650, true );\n\t\tadd_image_size( 'fiorello_mikado_landscape', 1300, 650, true );\n\t\tadd_image_size( 'fiorello_mikado_portrait', 650, 1300, true );\n\t\tadd_image_size( 'fiorello_mikado_huge', 1300, 1300, true );\n\n\t\tload_theme_textdomain( 'fiorello', get_template_directory() . '/languages' );\n\t}", "function thirdtheme_theme_support()\n {\n add_theme_support('post-thumbnails');\n \n // image size\n add_image_size('small-thumbnail',350,350,true);\n add_image_size('baner-image',1000,400,true);\n \n //post format\n add_theme_support('post-formats',array('aside','gallary','link'));\n }", "protected function setContentType()\n {\n $this->content_type = 'Page';\n }", "function register_content_types() {\n\n}", "function _bellcom_collect_theme_settings() {\n $settings = array();\n\n // Contact information\n $settings['contact_information']['business_owner_name'] = theme_get_setting('business_owner_name');\n $settings['contact_information']['business_startup_year'] = theme_get_setting('business_startup_year');\n $settings['contact_information']['address'] = theme_get_setting('address');\n $settings['contact_information']['zipcode'] = theme_get_setting('zipcode');\n $settings['contact_information']['city'] = theme_get_setting('city');\n $settings['contact_information']['phone_system'] = theme_get_setting('phone_system');\n $settings['contact_information']['phone_readable'] = theme_get_setting('phone_readable');\n $settings['contact_information']['email'] = theme_get_setting('email');\n $settings['contact_information']['working_hours'] = theme_get_setting('working_hours');\n\n // Social links\n $settings['social_links']['facebook']['active'] = theme_get_setting('facebook');\n $settings['social_links']['facebook']['url'] = theme_get_setting('facebook_url');\n $settings['social_links']['facebook']['tooltip'] = t(theme_get_setting('facebook_tooltip'));\n $settings['social_links']['twitter']['active'] = theme_get_setting('twitter');\n $settings['social_links']['twitter']['url'] = theme_get_setting('twitter_url');\n $settings['social_links']['twitter']['tooltip'] = t(theme_get_setting('twitter_tooltip'));\n $settings['social_links']['googleplus']['active'] = theme_get_setting('googleplus');\n $settings['social_links']['googleplus']['url'] = theme_get_setting('googleplus_url');\n $settings['social_links']['googleplus']['tooltip'] = t(theme_get_setting('googleplus_tooltip'));\n $settings['social_links']['instagram']['active'] = theme_get_setting('instagram');\n $settings['social_links']['instagram']['url'] = theme_get_setting('instagram_url');\n $settings['social_links']['instagram']['tooltip'] = t(theme_get_setting('instagram_tooltip'));\n $settings['social_links']['linkedin']['active'] = theme_get_setting('linkedin');\n $settings['social_links']['linkedin']['url'] = theme_get_setting('linkedin_url');\n $settings['social_links']['linkedin']['tooltip'] = t(theme_get_setting('linkedin_tooltip'));\n $settings['social_links']['pinterest']['active'] = theme_get_setting('pinterest');\n $settings['social_links']['pinterest']['url'] = theme_get_setting('pinterest_url');\n $settings['social_links']['pinterest']['tooltip'] = t(theme_get_setting('pinterest_tooltip'));\n $settings['social_links']['vimeo']['active'] = theme_get_setting('vimeo');\n $settings['social_links']['vimeo']['url'] = theme_get_setting('vimeo_url');\n $settings['social_links']['vimeo']['tooltip'] = t(theme_get_setting('vimeo_tooltip'));\n $settings['social_links']['youtube']['active'] = theme_get_setting('youtube');\n $settings['social_links']['youtube']['url'] = theme_get_setting('youtube_url');\n $settings['social_links']['youtube']['tooltip'] = t(theme_get_setting('youtube_tooltip'));\n\n // Layout\n $settings['layout']['copyright'] = ($settings['contact_information']['business_startup_year'] < date('Y') AND $settings['contact_information']['business_startup_year'] !== NULL) ? $settings['contact_information']['business_startup_year'] . '-' . date('Y') : date('Y');\n $settings['layout']['footer']['show_social_links'] = theme_get_setting('footer_show_social_links');\n $settings['layout']['sidebar']['show_social_links'] = theme_get_setting('sidebar_show_social_links');\n\n return $settings;\n}", "function gs_theme_setup() {\r\n\r\n\t/**\r\n\t * Load the theme functions library\r\n\t */\r\n\trequire_once('inc/library.php');\r\n\r\n\t/**\r\n\t * Load custom post types\r\n\t */\r\n\trequire_once('inc/cpt.slides.php'); \r\n\r\n\t/**\r\n\t * Load custom widgets\r\n\t */\r\n\trequire_once('inc/widget.feature-box/widget.feature-box.php'); \r\n\trequire_once('inc/widget.gs-recent-posts/widget.gs-recent-posts.php'); \r\n\r\n\t/**\r\n\t * Load custom admin features\r\n\t */\r\n\trequire_once('inc/admin/admin-branding.php'); \r\n\trequire_once('inc/admin/admin-menu.php'); \r\n\trequire_once('inc/admin/dashboard.recent-drafts.php'); \r\n\trequire_once('inc/admin/remove-dashboard-widgets.php'); \r\n\trequire_once('inc/admin/remove-default-widgets.php'); \r\n\trequire_once('inc/admin/tinymce-editor.php'); \r\n\trequire_once('inc/admin/user-capabilities.php'); \r\n\r\n \t/**\r\n * Removes WordPress version number from the document head (for security).\r\n\t *\r\n */\t\r\n\tremove_action('wp_head', 'wp_generator');\r\n\r\n \t/**\r\n * Registers theme menus.\r\n */\t\r\n\tregister_nav_menu('main', 'Main Navigation Menu');\r\n\t//register_nav_menu('Your Menu Name', 'Your Menu Description');\r\n\r\n \t/**\r\n * Registers thumbnail and featured image sizes.\r\n */\t\r\n\tadd_theme_support( 'post-thumbnails' );\r\n\tset_post_thumbnail_size( 150, 150, true ); // Normal post thumbnails\r\n\tadd_image_size( 'slide', 960, 300, true );\r\n\t//add_image_size( 'custom-thumb-name', 150, 150, true ); \r\n\r\n}", "function display_themes()\n {\n }", "public function action_init_theme()\n\t{\n\t\t$this->add_template('block.photoset_randomphotos', dirname(__FILE__) . '/block.photoset_randomphotos.php');\n\t\t$this->add_template('block.singlepage_content', dirname(__FILE__) . '/block.singlepage_content.php');\n\t\t\n\t\tFormat::apply('autop', 'comment_content_out');\n\t\tFormat::apply('autop', 'post_content_excerpt');\n\t\t\n\t\t$this->assign( 'multipleview', false);\n\t\t$action = Controller::get_action();\n\t\tif ($action == 'display_home' || $action == 'display_entries' || $action == 'search' || $action == 'display_tag' || $action == 'display_date') {\n\t\t\t$this->assign('multipleview', true);\n\t\t}\n\t}", "function _preview_theme_template_filter()\n {\n }", "function preview_theme()\n {\n }", "function _simple_content_type_installed_instances() {\r\n // textfield\r\n $instances['simple_content_type_textfield'] = array(\r\n 'field_name' => 'simple_content_type_textfield',\r\n 'type' => 'text',\r\n 'label' => t('A Textfield'),\r\n 'widget' => array(\r\n 'type' => 'text_textfield',\r\n 'weight' => '-1',\r\n\t 'settings' => array(\r\n 'size' => '20',\r\n\t\t'max_length' => '100',\r\n ),\r\n ),\r\n 'display' => array(\r\n 'default' => array(\r\n 'label' => 'inline',\r\n 'settings' => array(),\r\n 'type' => 'text_default',\r\n 'weight' => -1,\r\n ),\r\n 'teaser' => array(\r\n 'label' => 'above',\r\n 'settings' => array(),\r\n 'type' => 'hidden',\r\n 'weight' => -1,\r\n ),\r\n ),\r\n );\r\n // textarea\r\n $instances['simple_content_type_textarea'] = array(\r\n 'field_name' => 'simple_content_type_textarea',\r\n 'type' => 'text_long',\r\n 'label' => t('A Textarea'),\r\n 'widget' => array(\r\n 'settings' => array(\r\n 'rows' => '5',\r\n ),\r\n 'type' => 'text_textarea',\r\n 'weight' => 0,\r\n ),\r\n 'display' => array(\r\n 'default' => array(\r\n 'label' => 'above',\r\n 'settings' => array(),\r\n 'type' => 'text_default',\r\n 'weight' => 0,\r\n ),\r\n 'teaser' => array(\r\n 'label' => 'above',\r\n 'settings' => array(),\r\n 'type' => 'hidden',\r\n 'weight' => 0,\r\n ),\r\n ),\r\n 'required' => 0,\r\n 'settings' => array(\r\n 'text_processing' => '0',\r\n 'user_register_form' => FALSE,\r\n ),\r\n );\r\n // textarea\r\n $instances['simple_content_type_txtarea_fltr'] = array(\r\n 'field_name' => 'simple_content_type_txtarea_fltr',\r\n 'type' => 'text_long',\r\n 'label' => t('A Textarea with format filters'),\r\n 'widget' => array(\r\n 'settings' => array(\r\n 'rows' => '5',\r\n ),\r\n 'type' => 'text_textarea',\r\n 'weight' => 1,\r\n ),\r\n 'display' => array(\r\n 'default' => array(\r\n 'label' => 'above',\r\n 'settings' => array(),\r\n 'type' => 'text_default',\r\n 'weight' => 1,\r\n ),\r\n 'teaser' => array(\r\n 'label' => 'above',\r\n 'settings' => array(),\r\n 'type' => 'hidden',\r\n 'weight' => 1,\r\n ),\r\n ),\r\n 'required' => 0,\r\n 'settings' => array(\r\n 'text_processing' => '1',\r\n 'user_register_form' => FALSE,\r\n ),\r\n );\r\n \r\n return $instances;\r\n}", "function wp_using_themes()\n {\n }", "public function setDefaultDesignTheme();", "public function themeSetup()\n\t{\n\n\t\t// This theme styles the visual editor with editor-style.css to match the theme style.\n\t\tadd_editor_style();\n\n\t\t// This theme uses a custom image size for featured images, displayed on \"standard\" posts.\n\t\tadd_theme_support( 'post-thumbnails' );\n\n\n\t\t\n\t\tadd_image_size('hero', 1920, 1080, true );\t\n\t\tadd_image_size('hero-news', 480, 250, true );\t\n\t\tadd_image_size('timeline', 768, 450, true );\t\t\n\t\t//add_image_size('660x400', 660, 400, true );\t\t\n\t\t//add_image_size('810x431', 810, 431, true );\t\t\t\n\n\t\t/**\n\t\t * Make theme available for translation\n\t\t * Translations can be filed in the /languages/ directory\n\t\t * If you're building a theme based on _s, use a find and replace\n\t\t * to change '_s' to the name of your theme in all the template files\n\t\t */\n\t\tload_theme_textdomain( DION_THEME_SLUG, get_template_directory() . '/languages' );\n\t\t\n\n\t\t/**\n\t\t * Add default posts and comments RSS feed links to head\n\t\t */\n\t\tadd_theme_support( 'automatic-feed-links' );\n\n\n\t\t/**\n\t\t * More menus can be added if necessary\n\t\t */\n\t\tregister_nav_menus( array(\n\t\t\t'primary' => __( 'Ana Menü', DION_THEME_SLUG ),\n\t\t\t'footer-section' => __( 'Alt Menü', DION_THEME_SLUG ),\n\t\t) );\n\n\n\t}", "function thb_custom_theme_options() {\n \n /**\n * Get a copy of the saved settings array. \n */\n $saved_settings = get_option( 'option_tree_settings', array() );\n \n /**\n * Create a custom settings array that we pass to \n * the OptionTree Settings API Class.\n */\n $custom_settings = array(\n 'sections' => array(\n array(\n 'title' => esc_html__('Blog', 'werkstatt'),\n 'id' => 'blog'\n ),\n array(\n 'title' => esc_html__('Header & Menu', 'werkstatt'),\n 'id' => 'header'\n ),\n array(\n 'title' => esc_html__('Portfolio', 'werkstatt'),\n 'id' => 'portfolio'\n ),\n array(\n 'title' => esc_html__('Shop', 'werkstatt'),\n 'id' => 'shop'\n ),\n array(\n 'title' => esc_html__('Footer', 'werkstatt'),\n 'id' => 'footer'\n ),\n array(\n 'title' => esc_html__('Typography', 'werkstatt'),\n 'id' => 'typography'\n ),\n array(\n 'title' => esc_html__('Customization', 'werkstatt'),\n 'id' => 'customization'\n ),\n array(\n 'title' => esc_html__('Sound & Music', 'werkstatt'),\n 'id' => 'sounds'\n ),\n array(\n 'title' => esc_html__('Misc', 'werkstatt'),\n 'id' => 'misc'\n ),\n array(\n 'title' => esc_html__('Demo Content', 'werkstatt'),\n 'id' => 'import'\n )\n ),\n 'settings' => array(\n \tarray(\n \t 'id' => 'blog_tab0',\n \t 'label' => esc_html__('Blog Listing', 'werkstatt'),\n \t 'type' => 'tab',\n \t 'section' => 'blog'\n \t),\n \tarray(\n \t 'label' => esc_html__('Blog Style', 'werkstatt'),\n \t 'id' => 'blog_style',\n \t 'type' => 'radio',\n \t 'desc' => esc_html__('You can choose different blog styles here', 'werkstatt'),\n \t 'choices' => array(\n \t array(\n \t 'label' => esc_html__('Style 1 - Grid', 'werkstatt'),\n \t 'value' => 'style1'\n \t ),\n \t array(\n \t 'label' => esc_html__('Style 2 - Vertical', 'werkstatt'),\n \t 'value' => 'style2'\n \t ),\n \t array(\n \t 'label' => esc_html__('Style 3 - Left Thumbnail', 'werkstatt'),\n \t 'value' => 'style3'\n \t ),\n \t array(\n \t 'label' => esc_html__('Style 4 - Hover List', 'werkstatt'),\n \t 'value' => 'style4'\n \t ),\n \t array(\n \t 'label' => esc_html__('Style 5 - Masonry', 'werkstatt'),\n \t 'value' => 'style5'\n \t ),\n \t array(\n \t 'label' => esc_html__('Style 6 - Hover Grid', 'werkstatt'),\n \t 'value' => 'style6'\n \t ),\n \t array(\n \t 'label' => esc_html__('Style 7 - Large Left Thumbnail', 'werkstatt'),\n \t 'value' => 'style7'\n \t ),\n \t array(\n \t 'label' => esc_html__('Style 8 - Border Grid', 'werkstatt'),\n \t 'value' => 'style8'\n \t ),\n \t ),\n \t 'std' => 'style1',\n \t 'section' => 'blog'\n \t),\n \tarray(\n \t 'label' => esc_html__('Blog Pagination Style', 'werkstatt'),\n \t 'id' => 'blog_pagination_style',\n \t 'type' => 'radio',\n \t 'desc' => esc_html__('You can choose different blog pagination styles here. The regular pagination will be used for archive pages.', 'werkstatt'),\n \t 'choices' => array(\n \t array(\n \t 'label' => esc_html__('Regular Pagination', 'werkstatt'),\n \t 'value' => 'style1'\n \t ),\n \t array(\n \t 'label' => esc_html__('Load More Button', 'werkstatt'),\n \t 'value' => 'style2'\n \t ),\n \t array(\n \t 'label' => esc_html__('Infinite Scroll', 'werkstatt'),\n \t 'value' => 'style3'\n \t )\n \t ),\n \t 'std' => 'style1',\n \t 'section' => 'blog'\n \t),\n array(\n 'id' => 'blog_tab1',\n 'label' => esc_html__('Article Settings', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'blog'\n ),\n array(\n 'label' => esc_html__('Article Style', 'werkstatt'),\n 'id' => 'article_style',\n 'type' => 'radio',\n 'desc' => esc_html__('You can choose a default Article Style here.', 'werkstatt'),\n 'choices' => array(\n array(\n 'label' => esc_html__('Title Overlay - No Post Formats', 'werkstatt'),\n 'value' => 'style1'\n ),\n array(\n 'label' => esc_html__('Full Image', 'werkstatt'),\n 'value' => 'style2'\n ),\n array(\n 'label' => esc_html__('Full Image with Sidebar', 'werkstatt'),\n 'value' => 'style3'\n ),\n array(\n 'label' => esc_html__('Medium Image with Sidebar', 'werkstatt'),\n 'value' => 'style4'\n ),\n array(\n 'label' => esc_html__('Small Image with Sidebar', 'werkstatt'),\n 'value' => 'style5'\n ),\n ),\n 'std' => 'style1',\n 'section' => 'blog'\n ),\n array(\n 'label' => esc_html__('Use Header Animation?', 'werkstatt'),\n 'id' => 'blog_header_animation',\n 'type' => 'on_off',\n 'desc' => esc_html__('When scrolling down, the header will transform to display the sharing icons.', 'werkstatt'),\n 'std' => 'on',\n 'section' => 'blog'\n ),\n array(\n 'label' => esc_html__('Display Tags?', 'werkstatt'),\n 'id' => 'article_tags',\n 'type' => 'on_off',\n 'desc' => esc_html__('Displays article tags at the bottom', 'werkstatt'),\n 'std' => 'on',\n 'section' => 'blog'\n ),\n array(\n 'label' => esc_html__('Display Author Info?', 'werkstatt'),\n 'id' => 'article_author',\n 'type' => 'on_off',\n 'desc' => esc_html__('Displays author information at the bottom. Will only be displayed if the author description is filled.', 'werkstatt'),\n 'std' => 'on',\n 'section' => 'blog'\n ),\n array(\n 'label' => esc_html__('Display Related Posts?', 'werkstatt'),\n 'id' => 'article_related',\n 'type' => 'on_off',\n 'desc' => esc_html__('Displays related posts at the bottom.', 'werkstatt'),\n 'std' => 'on',\n 'section' => 'blog'\n ),\n array(\n 'label' => esc_html__('Display Article Navigation?', 'werkstatt'),\n 'id' => 'blog_nav',\n 'type' => 'on_off',\n 'desc' => esc_html__('Displays article navigation at the bottom', 'werkstatt'),\n 'std' => 'on',\n 'section' => 'blog'\n ),\n array(\n 'id' => 'blog_tab2',\n 'label' => esc_html__('Sharing Settings', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'blog'\n ),\n array(\n 'label' => 'Sharing buttons',\n 'id' => 'sharing_buttons',\n 'type' => 'checkbox',\n 'desc' => 'You can choose which social networks to display and get counts from. Please visit <strong>Theme Options > Misc</strong> to fill out application details for the social media sites you choose.',\n 'choices' => array(\n array(\n 'label' => 'Facebook',\n 'value' => 'facebook'\n ),\n array(\n 'label' => 'Twitter',\n 'value' => 'twitter'\n ),\n array(\n 'label' => 'Pinterest',\n 'value' => 'pinterest'\n ),\n array(\n 'label' => 'Google Plus',\n 'value' => 'google-plus'\n ),\n array(\n 'label' => 'Linkedin',\n 'value' => 'linkedin'\n ),\n array(\n 'label' => 'Vkontakte',\n 'value' => 'vkontakte'\n ),\n array(\n 'label' => 'WhatsApp',\n 'value' => 'whatsapp'\n ),\n array(\n 'label' => 'E-Mail',\n 'value' => 'email'\n )\n ),\n 'section' => 'blog'\n ),\n array(\n 'id' => 'portfolio_tab0',\n 'label' => esc_html__('General', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'portfolio'\n ),\n array(\n 'label' => esc_html__('Portfolio Slug', 'werkstatt'),\n 'id' => 'portfolio_slug',\n 'type' => 'text',\n 'desc' => esc_html__('The portfolio slug used for the portfolio permalinks', 'werkstatt'),\n 'section' => 'portfolio'\n ),\n array(\n 'label' => esc_html__('Portfolio Main Page Selection', 'werkstatt'),\n 'id' => 'portfolio_main',\n 'type' => 'page-select',\n 'desc' => esc_html__('The page that the portfolio navigation links back to. This can be overridden inside individual portfolio items.', 'werkstatt'),\n 'section' => 'portfolio'\n ),\n array(\n 'id' => 'portfolio_tab1',\n 'label' => esc_html__('Detail', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'portfolio'\n ),\n array(\n 'label' => esc_html__('Use Header Animation?', 'werkstatt'),\n 'id' => 'portfolio_header_animation',\n 'type' => 'on_off',\n 'desc' => esc_html__('When scrolling down, the header will transform to display the sharing icons.', 'werkstatt'),\n 'std' => 'on',\n 'section' => 'portfolio'\n ),\n array(\n 'label' => esc_html__('Portfolio Title / Description Animation', 'werkstatt'),\n 'id' => 'portfolio_title_animation',\n 'type' => 'on_off',\n 'desc' => esc_html__('You can toggle the title animations for the portfolio pages here.', 'werkstatt'),\n 'std' => 'on',\n 'section' => 'portfolio'\n ),\n array(\n 'label' => esc_html__('Display Portfolio Navigation?', 'werkstatt'),\n 'id' => 'portfolio_nav',\n 'type' => 'on_off',\n 'desc' => esc_html__('Displays portfolio navigation at the bottom', 'werkstatt'),\n 'std' => 'on',\n 'section' => 'portfolio'\n ),\n array(\n 'label' => esc_html__('Limit Navigation to Same Categories?', 'werkstatt'),\n 'id' => 'portfolio_nav_cat',\n 'type' => 'on_off',\n 'desc' => esc_html__('When enabled, the portfolio navigation will be limited within same categories', 'werkstatt'),\n 'std' => 'off',\n 'section' => 'portfolio',\n 'condition' => 'portfolio_nav:is(on)'\n ),\n array(\n 'id' => 'shop_tab0',\n 'label' => esc_html__('General', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'shop'\n ),\n array(\n 'label' => esc_html__('Product Title Color', 'werkstatt'),\n 'id' => 'product_style1_color',\n 'type' => 'radio',\n 'desc' => esc_html__('If you have dark product images, you can use the Light option..', 'werkstatt'),\n 'choices' => array(\n array(\n 'label' => esc_html__('Light', 'werkstatt'),\n 'value' => 'light'\n ),\n array(\n 'label' => esc_html__('Dark', 'werkstatt'),\n 'value' => 'dark'\n )\n ),\n 'std' => 'dark',\n 'section' => 'shop'\n ),\n array(\n 'label' => esc_html__('Shop Sidebar', 'werkstatt' ),\n 'id' => 'shop_sidebar',\n 'type' => 'radio',\n 'desc' => esc_html__('Would you like to display sidebar on shop main and category pages?', 'werkstatt'),\n 'choices' => array(\n array(\n 'label' => esc_html__('No Sidebar', 'werkstatt'),\n 'value' => 'no'\n ),\n array(\n 'label' => esc_html__('Right Sidebar', 'werkstatt'),\n 'value' => 'right'\n ),\n array(\n 'label' => esc_html__('Left Sidebar', 'werkstatt'),\n 'value' => 'left'\n )\n ),\n 'std' => 'no',\n 'section' => 'shop'\n ),\n array(\n 'label' => esc_html__('Products Per Page', 'werkstatt' ),\n 'id' => 'products_per_page',\n 'type' => 'text',\n 'section' => 'shop',\n 'std' \t\t\t\t=> '12'\n ),\n array(\n \t'label' => esc_html__('Products Per Row', 'werkstatt' ),\n 'id' => 'products_per_row',\n 'std' => '4',\n 'type' => 'numeric-slider',\n 'section' => 'shop',\n 'min_max_step'=> '2,6,1'\n ),\n array(\n 'id' => 'shop_tab1',\n 'label' => esc_html__('Product Page', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'shop'\n ),\n array(\n 'label' => esc_html__('Product Style', 'werkstatt' ),\n 'id' => 'product_style',\n 'type' => 'radio',\n 'desc' => esc_html__('This changes the layout of the product pages.', 'werkstatt'),\n 'choices' => array(\n array(\n 'label' => esc_html__('Style 1', 'werkstatt'),\n 'value' => 'style1'\n ),\n array(\n 'label' => esc_html__('Style 2', 'werkstatt'),\n 'value' => 'style2'\n )\n ),\n 'std' => 'style1',\n 'section' => 'shop'\n ),\n array(\n 'label' => esc_html__('Product Image Position Style', 'werkstatt' ),\n 'id' => 'product_image_position',\n 'type' => 'radio',\n 'desc' => esc_html__('This changes the position of the image', 'werkstatt'),\n 'choices' => array(\n array(\n 'label' => esc_html__('Left', 'werkstatt'),\n 'value' => 'left'\n ),\n array(\n 'label' => esc_html__('Right', 'werkstatt'),\n 'value' => 'right'\n )\n ),\n 'std' => 'left',\n 'section' => 'shop'\n ),\n array(\n 'label' => esc_html__('Product Image Size', 'werkstatt' ),\n 'id' => 'product_image_size',\n 'type' => 'radio',\n 'desc' => esc_html__('This changes the space image takes up', 'werkstatt'),\n 'choices' => array(\n array(\n 'label' => esc_html__('Small', 'werkstatt'),\n 'value' => '4'\n ),\n array(\n 'label' => esc_html__('Medium', 'werkstatt'),\n 'value' => '6'\n ),\n array(\n 'label' => esc_html__('Large', 'werkstatt'),\n 'value' => '8'\n )\n ),\n 'std' => '6',\n 'section' => 'shop'\n ),\n array(\n 'id' => 'header_tab1',\n 'label' => esc_html__('Menu Settings', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Header Style', 'werkstatt'),\n 'id' => 'header_style',\n 'type' => 'radio',\n 'desc' => esc_html__('Which header style would you like to use?', 'werkstatt'),\n 'choices' => array(\n \t\tarray(\n \t\t\t'label' => esc_html__('Style 1 (Left Logo)', 'werkstatt'),\n \t\t\t'value' => 'style1'\n \t\t),\n \t\tarray(\n \t\t\t'label' => esc_html__('Style 2 (Center Logo)', 'werkstatt'),\n \t\t\t'value' => 'style2'\n \t\t)\n ),\n 'std' => 'style1',\n 'section'\t => 'header'\n ),\n array(\n 'label' => esc_html__('Header Search', 'werkstatt'),\n 'id' => 'header_search',\n 'type' => 'on_off',\n 'desc' => esc_html__('You can toggle the search icon here.', 'werkstatt'),\n 'std' => 'on',\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Header Cart', 'werkstatt'),\n 'id' => 'header_cart',\n 'type' => 'on_off',\n 'desc' => esc_html__('You can toggle the cart icon here.', 'werkstatt'),\n 'std' => 'on',\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Menu Style', 'werkstatt'),\n 'id' => 'menu_style',\n 'type' => 'radio',\n 'desc' => esc_html__('Which menu style would you like to use?', 'werkstatt'),\n 'choices' => array(\n \t\tarray(\n \t\t\t'label' => esc_html__('Style 1 (Mobile Menu)', 'werkstatt'),\n \t\t\t'value' => 'menu_style1'\n \t\t),\n \t\tarray(\n \t\t\t'label' => esc_html__('Style 2 (Full Menu)', 'werkstatt'),\n \t\t\t'value' => 'menu_style2'\n \t\t)\n ),\n 'std' => 'menu_style1',\n 'section'\t => 'header'\n ),\n array(\n 'label' => esc_html__('Full Menu Social Links', 'werkstatt' ),\n 'id' => 'fullmenu_social_link',\n 'type' => 'social-links',\n 'desc' => esc_html__('Add your desired Social Links next to the full menu here', 'werkstatt' ),\n 'section' => 'header',\n 'condition' => 'menu_style:is(menu_style2)'\n ),\n array(\n 'label' => esc_html__('Language Switcher', 'werkstatt'),\n 'id' => 'thb_ls',\n 'type' => 'on_off',\n 'desc' => esc_html__('You can toggle the language switcher here. Requires that you have WPML installed.', 'werkstatt'),\n 'std' => 'on',\n 'section' => 'header'\n ),\n array(\n 'id' => 'header_tab2',\n 'label' => esc_html__('Mobile Menu Settings', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Mobile Menu Style', 'werkstatt'),\n 'id' => 'mobile_menu_style',\n 'type' => 'radio',\n 'desc' => esc_html__('You can choose your mobile menu style here', 'werkstatt'),\n 'choices' => array(\n array(\n 'label' => esc_html__('Style 1 (Half-page)', 'werkstatt'),\n 'value' => 'style1'\n ),\n array(\n 'label' => esc_html__('Style 2 (Full Screen)', 'werkstatt'),\n 'value' => 'style2'\n )\n ),\n 'std' => 'style1',\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Mobile Submenu Behaviour', 'werkstatt'),\n 'id' => 'submenu_behaviour',\n 'type' => 'radio',\n 'desc' => esc_html__('You can choose how your arrows signs work', 'werkstatt'),\n 'choices' => array(\n array(\n 'label' => esc_html__('Default - Clickable parent links', 'werkstatt'),\n 'value' => 'thb-default'\n ),\n array(\n 'label' => esc_html__('Open Submenu - Parent links open submenus', 'werkstatt'),\n 'value' => 'thb-submenu'\n )\n ),\n 'std' => 'thb-default',\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Secondary Menu Style', 'werkstatt'),\n 'id' => 'secondary_menu_style',\n 'type' => 'radio',\n 'desc' => esc_html__('This will change the secondary menu that is under the main menu. You can choose to have 1 or 2 columns.', 'werkstatt'),\n 'choices' => array(\n array(\n 'label' => esc_html__('2 columns', 'werkstatt'),\n 'value' => '2'\n ),\n array(\n 'label' => esc_html__('1 column', 'werkstatt'),\n 'value' => '1'\n )\n ),\n 'std' => '2',\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Mobile Menu Color', 'werkstatt'),\n 'id' => 'mobile_menu_color',\n 'type' => 'radio',\n 'desc' => esc_html__('You can choose your mobile menu color here.', 'werkstatt'),\n 'choices' => array(\n array(\n 'label' => esc_html__('Light', 'werkstatt'),\n 'value' => 'light'\n ),\n array(\n 'label' => esc_html__('Dark', 'werkstatt'),\n 'value' => 'dark'\n )\n ),\n 'std' => 'dark',\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Mobile Menu Link Animation', 'werkstatt'),\n 'id' => 'mobile_menu_link_animation',\n 'type' => 'radio',\n 'desc' => esc_html__('You can choose your mobile menu link animation here. If Background Fill is selected, the mobile menu background will change according to image defined for each menu item in Appearance > Menus.', 'werkstatt'),\n 'choices' => array(\n array(\n 'label' => esc_html__('Link Fill', 'werkstatt'),\n 'value' => 'link-fill'\n ),\n array(\n 'label' => esc_html__('Background Fill', 'werkstatt'),\n 'value' => 'bg-fill'\n )\n ),\n 'std' => 'link-fill',\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Link Fill Color', 'werkstatt'),\n 'id' => 'mobile_menu_link_fill',\n 'type' => 'colorpicker',\n 'desc' => esc_html__('Hover color for the Link Fill setting', 'werkstatt'),\n 'section' => 'header',\n 'condition' => 'mobile_menu_link_animation:is(link-fill)'\n ),\n array(\n 'label' => esc_html__('Mobile Menu Footer', 'werkstatt'),\n 'id' => 'menu_footer',\n 'type' => 'textarea',\n 'desc' => esc_html__('This content appears at the bottom of the menu. You can use your shortcodes here.', 'werkstatt'),\n 'rows' => '4',\n 'section' => 'header'\n ),\n array(\n 'id' => 'header_tab3',\n 'label' => esc_html__('Logo Settings', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Logo Height', 'werkstatt'),\n 'id' => 'logo_height',\n 'type' => 'measurement',\n 'desc' => esc_html__('You can modify the logo height from here. This is maximum height, so your logo may get smaller depending on spacing inside header', 'werkstatt'),\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Dark Logo Upload (black)', 'werkstatt'),\n 'id' => 'logo',\n 'type' => 'upload',\n 'desc' => esc_html__('You can upload your own logo here. Since this theme is retina-ready, <strong>please upload a double the size you set above.</strong>', 'werkstatt'),\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Light Logo Upload (white)', 'werkstatt'),\n 'id' => 'logo_light',\n 'type' => 'upload',\n 'desc' => esc_html__('You can upload your own logo here. Since this theme is retina-ready, <strong>please upload a double the size you set above.</strong>', 'werkstatt'),\n 'section' => 'header'\n ),\n array(\n 'id' => 'header_tab4',\n 'label' => esc_html__('Measurements', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Mobile Menu Icon Size', 'werkstatt'),\n 'id' => 'mobile_menu_icon_size',\n 'type' => 'numeric-slider',\n 'desc' => esc_html__('This changes the size of the mobile menu icon', 'werkstatt'),\n \t'min_max_step'=> '1,10,1',\n 'std' => '1',\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Header Padding', 'werkstatt'),\n 'id' => 'header_padding',\n 'type' => 'spacing',\n 'desc' => esc_html__('This affects header on large screens. The values are in px.', 'werkstatt'),\n 'section' => 'header'\n ),\n array(\n 'label' => esc_html__('Half Page Mobile Menu Width', 'werkstatt'),\n 'id' => 'mobile_menu_width',\n 'type' => 'numeric-slider',\n 'desc' => esc_html__('This changes the width of the mobile menu on desktop screens', 'werkstatt'),\n \t'min_max_step'=> '30,100,5',\n 'std' => '50',\n 'section' => 'header'\n ),\n array(\n 'id' => 'footer_tab0',\n 'label' => esc_html__('Footer Settings', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'footer'\n ),\n array(\n 'label' => esc_html__('Display Footer', 'werkstatt'),\n 'id' => 'footer',\n 'type' => 'on_off',\n 'desc' => esc_html__('Would you like to display the Footer?', 'werkstatt'),\n 'std' => 'on',\n 'section' => 'footer'\n ),\n array(\n 'label' => esc_html__('Footer Effect', 'werkstatt'),\n 'id' => 'footer_effect',\n 'type' => 'on_off',\n 'desc' => esc_html__('Would you like to use the fold effect? This also affects the sub-footer', 'werkstatt'),\n 'std' => 'off',\n 'section' => 'footer'\n ),\n array(\n 'label' => esc_html__('Footer Max-Width', 'werkstatt'),\n 'id' => 'footer_max_width',\n 'type' => 'on_off',\n 'desc' => esc_html__('Disabling this will make the footer full-width on large screens', 'werkstatt'),\n 'std' => 'off',\n 'section' => 'footer',\n 'condition' => 'footer:is(on)'\n ),\n array(\n 'label' => esc_html__('Footer Columns', 'werkstatt'),\n 'id' => 'footer_columns',\n 'type' => 'radio-image',\n 'desc' => esc_html__('You can change the layout of footer columns here', 'werkstatt'),\n 'std' => 'threecolumns',\n 'section' => 'footer',\n 'condition' => 'footer:is(on)'\n ),\n array(\n 'label' => esc_html__('Footer Color', 'werkstatt'),\n 'id' => 'footer_color',\n 'type' => 'radio',\n 'desc' => esc_html__('You can choose your footer color here. You can also change your footer background from \"Customization\"', 'werkstatt'),\n 'choices' => array(\n array(\n 'label' => esc_html__('Light', 'werkstatt'),\n 'value' => 'light'\n ),\n array(\n 'label' => esc_html__('Dark', 'werkstatt'),\n 'value' => 'dark'\n )\n ),\n 'std' => 'light',\n 'section' => 'footer',\n 'condition' => 'footer:is(on)'\n ),\n array(\n 'label' => esc_html__('Footer Shadow', 'werkstatt'),\n 'id' => 'footer_shadow',\n 'type' => 'radio',\n 'desc' => esc_html__('You can change the footer shadow here', 'werkstatt'),\n 'choices' => array(\n \tarray(\n \t 'label' => esc_html__('None', 'werkstatt'),\n \t 'value' => 'none'\n \t),\n array(\n 'label' => esc_html__('Light', 'werkstatt'),\n 'value' => 'light'\n ),\n array(\n 'label' => esc_html__('Heavy', 'werkstatt'),\n 'value' => 'heavy'\n )\n ),\n 'std' => 'heavy',\n 'section' => 'footer',\n 'condition' => 'footer:is(on)'\n ),\n array(\n 'id' => 'footer_tab1',\n 'label' => esc_html__('Call-to-Action', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'footer'\n ),\n array(\n 'label' => esc_html__('Display Call-to-Action', 'werkstatt'),\n 'id' => 'call_to_action',\n 'type' => 'on_off',\n 'desc' => esc_html__('Would you like to display the Call-to-Action? <small>You can customize the colors on \"Customization\"</small>', 'werkstatt'),\n 'std' => 'off',\n 'section' => 'footer'\n ),\n array(\n 'label' => esc_html__('Text', 'werkstatt' ),\n 'id' => 'call_to_action_text',\n 'type' => 'textarea',\n 'desc' => esc_html__('Content to be displayed on the Call-to-Action', 'werkstatt' ),\n 'section' => 'footer',\n 'std' \t\t\t\t=> sprintf(esc_html__('\n \t%1$sReady to take your WordPress site to the next level?%2$s', 'werkstatt'),\n \t'<h3 style=\"color:#fff\">',\n \t'</h3>'\n ),\n 'condition' => 'call_to_action:is(on)'\n ),\n array(\n 'label' => esc_html__('Button Style', 'werkstatt' ),\n 'id' => 'call_to_action_button_style',\n 'type' => 'radio',\n 'choices' => array(\n \tarray(\n \t 'label' => esc_html__('Default', 'werkstatt'),\n \t 'value' => ''\n \t),\n array(\n 'label' => esc_html__('Border Button with Solid Fill', 'werkstatt'),\n 'value' => 'thb-border-style'\n ),\n array(\n 'label' => esc_html__('Text with Border Fill', 'werkstatt'),\n 'value' => 'thb-text-style'\n ),\n array(\n 'label' => esc_html__('3d Effect', 'werkstatt'),\n 'value' => 'thb-3d-style'\n ),\n array(\n 'label' => esc_html__('Fill Effect', 'werkstatt'),\n 'value' => 'thb-fill-style'\n )\n ),\n 'std' => '',\n 'desc' => esc_html__('Call-to-Action Button Style', 'werkstatt' ),\n 'section' => 'footer',\n 'condition' => 'call_to_action:is(on)'\n ),\n array(\n 'label' => esc_html__('Button Color', 'werkstatt' ),\n 'id' => 'call_to_action_button_color',\n 'type' => 'radio',\n 'choices' => array(\n \tarray(\n \t 'label' => esc_html__('Black', 'werkstatt'),\n \t 'value' => ''\n \t),\n array(\n 'label' => esc_html__('White', 'werkstatt'),\n 'value' => 'white'\n ),\n array(\n 'label' => esc_html__('Accent', 'werkstatt'),\n 'value' => 'accent'\n )\n ),\n 'std' => 'white',\n 'desc' => esc_html__('Call-to-Action Button Color', 'werkstatt' ),\n 'section' => 'footer',\n 'condition' => 'call_to_action:is(on)'\n ),\n array(\n 'label' => esc_html__('Button Text', 'werkstatt' ),\n 'id' => 'call_to_action_button_text',\n 'type' => 'text',\n 'desc' => esc_html__('Call-to-Action Button Text', 'werkstatt' ),\n 'section' => 'footer',\n 'std' \t\t\t\t=> esc_html__('Purchase Now', 'werkstatt'),\n 'condition' => 'call_to_action:is(on)'\n ),\n array(\n 'label' => esc_html__('Button Link', 'werkstatt' ),\n 'id' => 'call_to_action_button_link',\n 'type' => 'text',\n 'desc' => esc_html__('Call-to-Action Button link', 'werkstatt' ),\n 'section' => 'footer',\n 'std' \t\t\t\t=> esc_html__('https://themeforest.net/item/werkstatt-creative-portfolio-theme/17870799?ref=fuelthemes', 'werkstatt'),\n 'condition' => 'call_to_action:is(on)'\n ),\n array(\n 'id' => 'footer_tab2',\n 'label' => esc_html__('Sub-Footer Settings', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'footer'\n ),\n array(\n 'label' => esc_html__('Display Sub-Footer', 'werkstatt'),\n 'id' => 'subfooter',\n 'type' => 'on_off',\n 'desc' => esc_html__('Would you like to display the Sub-Footer?', 'werkstatt'),\n 'std' => 'off',\n 'section' => 'footer'\n ),\n array(\n 'label' => esc_html__('Sub-Footer Max-Width', 'werkstatt'),\n 'id' => 'subfooter_max_width',\n 'type' => 'on_off',\n 'desc' => esc_html__('Disabling this will make the sub-footer full-width on large screens', 'werkstatt'),\n 'std' => 'off',\n 'section' => 'footer',\n 'condition' => 'subfooter:is(on)'\n ),\n array(\n 'label' => esc_html__('Sub-Footer Color', 'werkstatt'),\n 'id' => 'subfooter_color',\n 'type' => 'radio',\n 'desc' => esc_html__('You can choose your sub-footer color here. You can also change your sub-footer background from \"Customization\"', 'werkstatt'),\n 'choices' => array(\n array(\n 'label' => esc_html__('Light', 'werkstatt'),\n 'value' => 'light'\n ),\n array(\n 'label' => esc_html__('Dark', 'werkstatt'),\n 'value' => 'dark'\n )\n ),\n 'std' => 'light',\n 'section' => 'footer',\n 'condition' => 'subfooter:is(on)'\n ),\n array(\n 'label' => esc_html__('Subfooter Text', 'werkstatt' ),\n 'id' => 'subfooter_text',\n 'type' => 'textarea',\n 'desc' => esc_html__('Content to be displayed on the subfooter', 'werkstatt' ),\n 'section' => 'footer',\n 'std' \t\t\t\t=> esc_html__('&copy; 2016 Werkstatt', 'werkstatt'),\n 'condition' => 'subfooter:is(on)'\n ),\n array(\n 'label' => esc_html__('Social Links', 'werkstatt' ),\n 'id' => 'subfooter_social_link',\n 'type' => 'social-links',\n 'desc' => esc_html__('Add your desired Social Links for the subfooter here', 'werkstatt' ),\n 'section' => 'footer',\n 'condition' => 'subfooter:is(on)'\n ),\n array(\n 'id' => 'misc_tab0',\n 'label' => esc_html__('General', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'misc'\n ),\n array(\n 'label' => esc_html__('Google Maps API Key', 'werkstatt'),\n 'id' => 'map_api_key',\n 'type' => 'text',\n 'desc' => esc_html__('Please enter the Google Maps Api Key. <small>You need to create a browser API key. For more information, please visit: <a href=\"https://developers.google.com/maps/documentation/javascript/get-api-key\">https://developers.google.com/maps/documentation/javascript/get-api-key</a></small>', 'werkstatt'),\n 'section' => 'misc'\n ),\n array(\n 'label' => esc_html__('Scroll To Top?', 'werkstatt'),\n 'id' => 'scroll_to_top',\n 'type' => 'on_off',\n 'desc' => esc_html__('You can enable the Scroll To Top button here', 'werkstatt'),\n 'std' => 'off',\n 'section' => 'misc'\n ),\n array(\n 'label' => esc_html__('Extra CSS', 'werkstatt'),\n 'id' => 'extra_css',\n 'type' => 'css',\n 'desc' => esc_html__('Any CSS that you would like to add to the theme.', 'werkstatt'),\n 'section' => 'misc'\n ),\n array(\n 'id' => 'misc_tab1',\n 'label' => esc_html__('Instagram Settings', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'misc'\n ),\n array(\n 'label' => esc_html__('Instagram ID', 'werkstatt' ),\n 'id' => 'instagram_id',\n 'type' => 'text',\n 'desc' => sprintf(esc_html__('Your Instagram ID, you can find your ID from here: %1$shttp://www.otzberg.net/iguserid/%2$s', 'werkstatt' ),\n \t'<a href=\"http://www.otzberg.net/iguserid/\">',\n \t'</a>'\n \t),\n 'section' => 'misc'\n ),\n array(\n 'label' => esc_html__('Instagram Username', 'werkstatt' ),\n 'id' => 'instagram_username',\n 'type' => 'text',\n 'desc' => esc_html__('Your Instagram Username', 'werkstatt' ),\n 'section' => 'misc'\n ),\n array(\n 'label' => esc_html__('Access Token', 'werkstatt' ),\n 'id' => 'instagram_accesstoken',\n 'type' => 'text',\n 'desc' => sprintf(esc_html__('Visit %1$sthis link%2$s in a new tab, sign in with your Instagram account, click on Create a new application and create your own keys in case you dont have already. After that, you can get your Access Token using %3$shttp://instagram.pixelunion.net/%4$s', 'werkstatt' ),\n \t'<a href=\"http://instagr.am/developer/register/\" target=\"_blank\">',\n \t'</a>',\n \t'<a href=\"http://instagram.pixelunion.net/\" target=\"_blank\">',\n \t'</a>'\n \t),\n 'section' => 'misc'\n ),\n array(\n 'id' => 'misc_tab2',\n 'label' => esc_html__('Twitter Settings', 'werkstatt' ),\n 'type' => 'tab',\n 'section' => 'misc'\n ),\n array(\n 'id' => 'twitter_text',\n 'label' => esc_html__('About the Twitter Settings', 'werkstatt' ),\n 'desc' => esc_html__('You should fill out these settings if you want to use the Twitter related widgets or Visual Composer Elements', 'werkstatt' ),\n 'type' => 'textblock',\n 'section' => 'misc'\n ),\n array(\n 'label' => esc_html__('Twitter Sharing Cache', 'thevoux'),\n 'id' => 'twitter_cache',\n 'type' => 'select',\n 'desc' => esc_html__('Amount of time before the new tweets are fetched.', 'thevoux'),\n 'choices' => array(\n \tarray(\n \t 'label' => esc_html__('1 Hour', 'thevoux'),\n \t 'value' => '1h'\n \t),\n array(\n 'label' => esc_html__('1 Day', 'thevoux'),\n 'value' => '1'\n ),\n array(\n 'label' => esc_html__('7 Days', 'thevoux'),\n 'value' => '7'\n ),\n array(\n 'label' => esc_html__('30 Days', 'thevoux'),\n 'value' => '30'\n )\n ),\n 'std' => '1',\n 'section' => 'misc'\n ),\n array(\n 'label' => esc_html__('Twitter Username', 'werkstatt' ),\n 'id' => 'twitter_bar_username',\n 'type' => 'text',\n 'desc' => esc_html__('Username to pull tweets for', 'werkstatt' ),\n 'section' => 'misc'\n ),\n array(\n 'label' => esc_html__('Consumer Key', 'werkstatt' ),\n 'id' => 'twitter_bar_consumerkey',\n 'type' => 'text',\n 'desc' => esc_html__('Visit <a href=\"https://dev.twitter.com/apps\" target=\"_blank\">this link</a> in a new tab, sign in with your account, click on Create a new application and create your own keys in case you dont have already', 'werkstatt' ),\n 'section' => 'misc'\n ),\n array(\n 'label' => esc_html__('Consumer Secret', 'werkstatt' ),\n 'id' => 'twitter_bar_consumersecret',\n 'type' => 'text',\n 'desc' => esc_html__('Visit <a href=\"https://dev.twitter.com/apps\" target=\"_blank\">this link</a> in a new tab, sign in with your account, click on Create a new application and create your own keys in case you dont have already', 'werkstatt' ),\n 'section' => 'misc'\n ),\n array(\n 'label' => esc_html__('Access Token', 'werkstatt' ),\n 'id' => 'twitter_bar_accesstoken',\n 'type' => 'text',\n 'desc' => esc_html__('Visit <a href=\"https://dev.twitter.com/apps\" target=\"_blank\">this link</a> in a new tab, sign in with your account, click on Create a new application and create your own keys in case you dont have already', 'werkstatt' ),\n 'section' => 'misc'\n ),\n array(\n 'label' => esc_html__('Access Token Secret', 'werkstatt' ),\n 'id' => 'twitter_bar_accesstokensecret',\n 'type' => 'text',\n 'desc' => esc_html__('Visit <a href=\"https://dev.twitter.com/apps\" target=\"_blank\">this link</a> in a new tab, sign in with your account, click on Create a new application and create your own keys in case you dont have already', 'werkstatt' ),\n 'section' => 'misc'\n ),\n array(\n 'label' => esc_html__('Select Your Demo', 'werkstatt'),\n 'id' => 'demo-select',\n 'type' => 'radio-image',\n 'std' => '0',\n 'section' => 'import'\n ),\n array(\n 'id' => 'demo_import',\n 'label' => esc_html__('About Importing Demo Content', 'werkstatt'),\n 'desc' => esc_html__('\n <div id=\"thb-import-messages\"></div>\n <p style=\"text-align:center;\"><a class=\"button button-primary button-hero\" id=\"import-demo-content\" href=\"#\">Import Demo Content</a><br /><br />\n <small>Please press only once, and wait till you get the success message above.<br />If you \\'re having trouble with import, please see: <a href=\"https://fuelthemes.ticksy.com/article/2706/\">What To Do If Demo Content Import Fails</a></p>', 'werkstatt'),\n 'type' => 'textblock',\n 'section' => 'import'\n ),\n array(\n 'id' => 'typography_tab1',\n 'label' => esc_html__('Typography', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Google Font Subsets', 'werkstatt'),\n 'id' => 'font_subsets',\n 'type' => 'radio',\n 'desc' => esc_html__('You can add additional character subset specific to your language.', 'werkstatt'),\n 'choices' => array(\n \tarray(\n \t 'label' => esc_html__('No Subset', 'werkstatt'),\n \t 'value' => 'no-subset'\n \t),\n \tarray(\n \t 'label' => esc_html__('Latin Extended', 'werkstatt'),\n \t 'value' => 'latin-ext'\n \t),\n array(\n 'label' => esc_html__('Greek', 'werkstatt'),\n 'value' => 'greek'\n ),\n array(\n 'label' => esc_html__('Cyrillic', 'werkstatt'),\n 'value' => 'cyrillic'\n ),\n array(\n 'label' => esc_html__('Vietnamese', 'werkstatt'),\n 'value' => 'vietnamese'\n )\n ),\n 'std' => 'no-subset',\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Primary Font', 'werkstatt'),\n 'id' => 'primary_type',\n 'type' => 'typography',\n 'desc' => esc_html__('Font Family Setting for the primary font. Affects all headings.', 'werkstatt'),\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Secondary Font', 'werkstatt'),\n 'id' => 'secondary_type',\n 'type' => 'typography',\n 'desc' => esc_html__('Font Family Setting for the secondary font', 'werkstatt'),\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Button Font', 'werkstatt'),\n 'id' => 'button_type',\n 'type' => 'typography',\n 'desc' => esc_html__('Font Family Setting for the button. Uses the Secondary Font by default', 'werkstatt'),\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Menu Font', 'werkstatt'),\n 'id' => 'menu_type',\n 'type' => 'typography',\n 'desc' => esc_html__('Font Family Setting for the menu. This also overrides the header font. Uses the Secondary Font by default', 'werkstatt'),\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Body Font', 'werkstatt'),\n 'id' => 'body_type',\n 'type' => 'typography',\n 'desc' => esc_html__('Font Family Setting for the body.', 'werkstatt'),\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Full Menu Font', 'werkstatt'),\n 'id' => 'fullmenu_type',\n 'type' => 'typography',\n 'desc' => esc_html__('Font Family Setting for the full menu style', 'werkstatt'),\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Footer Widget Title Font', 'werkstatt'),\n 'id' => 'footer_widget_title_type',\n 'type' => 'typography',\n 'desc' => esc_html__('Font Family Setting for the footer widget titles', 'werkstatt'),\n 'section' => 'typography'\n ),\n array(\n 'id' => 'typography_tab2',\n 'label' => esc_html__('Heading Typography', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'typography'\n ),\n array(\n 'id' => 'heading_text',\n 'label' => esc_html__('About Heading Typography', 'werkstatt'),\n 'desc' => esc_html__('These affect all h* tags inside the theme, so use wisely. Some particular headings may need additional css to target.', 'werkstatt'),\n 'type' => 'textblock',\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Heading 1', 'werkstatt'),\n 'id' => 'h1_type',\n 'type' => 'typography',\n 'desc' => esc_html__('Font Settings for the H1 tag', 'werkstatt'),\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Heading 2', 'werkstatt'),\n 'id' => 'h2_type',\n 'type' => 'typography',\n 'desc' => esc_html__('Font Settings for the H2 tag', 'werkstatt'),\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Heading 3', 'werkstatt'),\n 'id' => 'h3_type',\n 'type' => 'typography',\n 'desc' => esc_html__('Font Settings for the H3 tag', 'werkstatt'),\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Heading 4', 'werkstatt'),\n 'id' => 'h4_type',\n 'type' => 'typography',\n 'desc' => esc_html__('Font Settings for the H4 tag', 'werkstatt'),\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Heading 5', 'werkstatt'),\n 'id' => 'h5_type',\n 'type' => 'typography',\n 'desc' => esc_html__('Font Settings for the H5 tag', 'werkstatt'),\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Heading 6', 'werkstatt'),\n 'id' => 'h6_type',\n 'type' => 'typography',\n 'desc' => esc_html__('Font Settings for the H6 tag', 'werkstatt'),\n 'section' => 'typography'\n ),\n array(\n 'id' => 'typography_tab3',\n 'label' => esc_html__('Typekit Support', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'typography'\n ),\n array(\n 'id' => 'typekit_text',\n 'label' => esc_html__('About Typekit Support', 'werkstatt'),\n 'desc' => esc_html__('Please make sure that you enter your Typekit ID or the fonts wont work. After adding Typekit Font Names, these names will appear on the font selection dropdown on the Typography tab.', 'werkstatt'),\n 'std' => '',\n 'type' => 'textblock',\n 'section' => 'typography'\n ),\n array(\n 'label' => esc_html__('Typekit Kit ID', 'werkstatt'),\n 'id' => 'typekit_id',\n 'type' => 'text',\n 'desc' => esc_html__('Paste the provided Typekit Kit ID. <small>Usually 6-7 random letters</small>', 'werkstatt'),\n 'section' => 'typography',\n ),\n array(\n 'label' => esc_html__('Typekit Font Names', 'werkstatt'),\n 'id' => 'typekit_fonts',\n 'type' => 'text',\n 'desc' => esc_html__('Enter your Typekit Font Name, seperated by comma. For example: futura-pt,aktiv-grotesk <strong>Do not leave spaces between commas</strong>', 'werkstatt'),\n 'section' => 'typography',\n ),\n array(\n 'id' => 'customization_tab1',\n 'label' => esc_html__('Backgrounds', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Header Background', 'werkstatt'),\n 'id' => 'header_bg',\n 'type' => 'background',\n 'class'\t\t\t\t=> 'ot-colorpicker-opacity',\n 'desc' => esc_html__('Background settings for the header.', 'werkstatt'),\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Footer Background', 'werkstatt'),\n 'id' => 'footer_bg',\n 'type' => 'background',\n 'class'\t\t\t\t=> 'ot-colorpicker-opacity',\n 'desc' => esc_html__('Background settings for the footer', 'werkstatt'),\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Sub - Footer Background', 'werkstatt'),\n 'id' => 'subfooter_bg',\n 'type' => 'background',\n 'class'\t\t\t\t=> 'ot-colorpicker-opacity',\n 'desc' => esc_html__('Background settings for the subfooter', 'werkstatt'),\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Mobile Menu Background', 'werkstatt'),\n 'id' => 'mobilemenu_bg',\n 'type' => 'background',\n 'class'\t\t\t\t=> 'ot-colorpicker-opacity',\n 'desc' => esc_html__('Background settings for the Mobile Menu', 'werkstatt'),\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Call-to-Action Background', 'werkstatt'),\n 'id' => 'call_to_action_bg',\n 'type' => 'background',\n 'class'\t\t\t\t=> 'ot-colorpicker-opacity',\n 'desc' => esc_html__('Background settings for the Call-to-Action inside Footer', 'werkstatt'),\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('404 Page Background', 'werkstatt'),\n 'id' => 'notfound_bg',\n 'type' => 'background',\n 'class'\t\t\t\t=> 'ot-colorpicker-opacity',\n 'desc' => esc_html__('Background settings for the 404 Page', 'werkstatt'),\n 'section' => 'customization'\n ),\n array(\n 'id' => 'customization_tab2',\n 'label' => esc_html__('Colors', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Accent Color', 'werkstatt'),\n 'id' => 'accent_color',\n 'type' => 'colorpicker',\n 'desc' => esc_html__('You can modify the accent color here, default red you see in some areas.', 'werkstatt'),\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Mobile Menu Icon Color', 'werkstatt'),\n 'id' => 'mobile_menu_icon_color',\n 'type' => 'colorpicker',\n 'desc' => esc_html__('You can modify the hamburger menu icon color here.', 'werkstatt'),\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Footer Widget Title Color', 'werkstatt'),\n 'id' => 'footer_widget_title_color',\n 'type' => 'colorpicker',\n 'desc' => esc_html__('You can modify the footer widget title color here', 'werkstatt'),\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Footer Text Color', 'werkstatt'),\n 'id' => 'footer_text_color',\n 'type' => 'colorpicker',\n 'desc' => esc_html__('You can modify the footer text color here', 'werkstatt'),\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('General Link Color', 'werkstatt'),\n 'id' => 'general_link_color',\n 'type' => 'link_color',\n 'desc' => esc_html__('You can modify the general link color here', 'werkstatt'),\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Footer Link Color', 'werkstatt'),\n 'id' => 'footer_link_color',\n 'type' => 'link_color',\n 'desc' => esc_html__('You can modify the footer link color here', 'werkstatt'),\n 'section' => 'customization'\n ),\n array(\n 'id' => 'typography_tab4',\n 'label' => esc_html__('Measurements', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Footer Padding', 'werkstatt'),\n 'id' => 'footer_padding',\n 'type' => 'spacing',\n 'desc' => esc_html__('You can modify the footer padding here', 'werkstatt'),\n 'section' => 'customization'\n ),\n array(\n 'id' => 'customization_tab4',\n 'label' => esc_html__('Preloaders', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Preloader', 'werkstatt' ),\n 'id' => 'thb_preloader',\n 'type' => 'radio',\n 'desc' => esc_html__('This is the hexagon preloader you see on some areas.', 'werkstatt'),\n 'choices' => array(\n array(\n 'label' => esc_html__('Hexagon', 'werkstatt'),\n 'value' => 'hexagon'\n ),\n array(\n 'label' => esc_html__('Circle', 'werkstatt'),\n 'value' => 'circle'\n ),\n array(\n 'label' => esc_html__('No Preloader', 'werkstatt'),\n 'value' => 'no'\n )\n ),\n 'std' => 'hexagon',\n 'section' => 'customization'\n ),\n array(\n 'id' => 'customization_tab5',\n 'label' => esc_html__('Other', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Use Custom Scrollbar?', 'werkstatt'),\n 'id' => 'custom_scrollbar',\n 'type' => 'on_off',\n 'desc' => esc_html__('This only works for Webkit (Chrome, Safari).', 'werkstatt'),\n 'std' => 'on',\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Google Theme Color', 'werkstatt'),\n 'id' => 'thb_google_theme_color',\n 'type' => 'colorpicker',\n 'desc' => esc_html__('Applied only on Android mobile devices, click <a href=\"https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android\" target=\"_blank\">here</a> to learn more about this', 'werkstatt'),\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Site Border', 'werkstatt'),\n 'id' => 'site_borders',\n 'type' => 'on_off',\n 'desc' => esc_html__('This will add borders around the viewport.', 'werkstatt'),\n 'std' => 'off',\n 'section' => 'customization'\n ),\n array(\n 'label' => esc_html__('Border Width', 'werkstatt'),\n 'id' => 'site_borders_width',\n 'type' => 'measurement',\n 'desc' => esc_html__('You can modify border width here', 'werkstatt'),\n 'section' => 'customization',\n 'condition' => 'site_borders:is(on)'\n ),\n array(\n 'label' => esc_html__('Border Color', 'werkstatt'),\n 'id' => 'site_borders_color',\n 'type' => 'colorpicker',\n 'desc' => esc_html__('You can modify the border color here', 'werkstatt'),\n 'section' => 'customization',\n 'condition' => 'site_borders:is(on)'\n ),\n array(\n 'id' => 'sounds_tab0',\n 'label' => esc_html__('Website Music', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'sounds'\n ),\n array(\n 'label' => esc_html__('Enable Background Music?', 'werkstatt'),\n 'id' => 'music_sound',\n 'type' => 'on_off',\n 'desc' => esc_html__('You can enable the Background Music Here', 'werkstatt'),\n 'std' => 'off',\n 'section' => 'sounds'\n ),\n array(\n 'label' => esc_html__('Restrict Background Music to Homepage', 'werkstatt'),\n 'id' => 'music_sound_toggle_home',\n 'type' => 'on_off',\n 'desc' => esc_html__('You can restrict background music to homepage if desired.', 'werkstatt'),\n 'std' => 'on',\n 'section' => 'sounds',\n 'condition' => 'music_sound:is(on)'\n ),\n array(\n 'label' => esc_html__('Display Background Music Toggle?', 'werkstatt'),\n 'id' => 'music_sound_toggle',\n 'type' => 'on_off',\n 'desc' => esc_html__('You can enable the Background Music Here', 'werkstatt'),\n 'std' => 'off',\n 'section' => 'sounds',\n 'condition' => 'music_sound:is(on)'\n ),\n array(\n 'label' => esc_html__('Background Music Upload', 'werkstatt'),\n 'id' => 'music_sound_file',\n 'type' => 'upload',\n 'desc' => esc_html__('You can upload your own MP3 file here.', 'werkstatt'),\n 'section' => 'sounds',\n 'condition' => 'music_sound:is(on)'\n ),\n array(\n 'id' => 'sounds_tab1',\n 'label' => esc_html__('General Sounds', 'werkstatt'),\n 'type' => 'tab',\n 'section' => 'sounds'\n ),\n array(\n 'label' => esc_html__('Click Sound', 'werkstatt'),\n 'id' => 'click_sound',\n 'type' => 'on_off',\n 'desc' => esc_html__('You can enable the Click Sound here', 'werkstatt'),\n 'std' => 'off',\n 'section' => 'sounds'\n ),\n array(\n 'label' => esc_html__('Click Sound Upload', 'werkstatt'),\n 'id' => 'click_sound_file',\n 'type' => 'upload',\n 'desc' => esc_html__('You can upload your own MP3 file here.', 'werkstatt'),\n 'section' => 'sounds',\n 'condition' => 'click_sound:is(on)'\n ),\n array(\n 'label' => esc_html__('Menu Item Hover Sound', 'werkstatt'),\n 'id' => 'menu_item_hover_sound',\n 'type' => 'on_off',\n 'desc' => esc_html__('You can enable the Menu Item Hover Sound here', 'werkstatt'),\n 'std' => 'off',\n 'section' => 'sounds'\n ),\n array(\n 'label' => esc_html__('Menu Item Hover Sound Upload', 'werkstatt'),\n 'id' => 'menu_item_hover_sound_file',\n 'type' => 'upload',\n 'desc' => esc_html__('You can upload your own MP3 file here.', 'werkstatt'),\n 'section' => 'sounds',\n 'condition' => 'menu_item_hover_sound:is(on)'\n ),\n array(\n 'label' => esc_html__('Menu Open Sound', 'werkstatt'),\n 'id' => 'menu_open_sound',\n 'type' => 'on_off',\n 'desc' => esc_html__('You can enable the Menu Open Sound here', 'werkstatt'),\n 'std' => 'off',\n 'section' => 'sounds'\n ),\n array(\n 'label' => esc_html__('Menu Open Sound Upload', 'werkstatt'),\n 'id' => 'menu_open_sound_file',\n 'type' => 'upload',\n 'desc' => esc_html__('You can upload your own MP3 file here.', 'werkstatt'),\n 'section' => 'sounds',\n 'condition' => 'menu_open_sound:is(on)'\n ),\n array(\n 'label' => esc_html__('Menu Close Sound', 'werkstatt'),\n 'id' => 'menu_close_sound',\n 'type' => 'on_off',\n 'desc' => esc_html__('You can enable the Menu Close Sound here', 'werkstatt'),\n 'std' => 'off',\n 'section' => 'sounds'\n ),\n array(\n 'label' => esc_html__('Menu Close Sound Upload', 'werkstatt'),\n 'id' => 'menu_close_sound_file',\n 'type' => 'upload',\n 'desc' => esc_html__('You can upload your own MP3 file here.', 'werkstatt'),\n 'section' => 'sounds',\n 'condition' => 'menu_close_sound:is(on)'\n )\n )\n );\n \n /* settings are not the same update the DB */\n if ( $saved_settings !== $custom_settings ) {\n update_option( 'option_tree_settings', $custom_settings ); \n }\n}", "function getContentType(){ return $this->_ContentType;}", "function register_taxonomy_omfg_mobile_pro_themes() {\n\t// USED TO CONNECT A SITE WITH A SELECTED THEME\n\t// ============================================ -->\n $labels = array( \n 'name' => _x( 'OMFG Mobile Pro Page Themes', 'omfg_mobile_pro_themes' ),\n 'singular_name' => _x( 'OMFG Mobile Pro Page Theme', 'omfg_mobile_pro_themes' ),\n 'search_items' => _x( 'Search OMFG Mobile Pro Page Themes', 'omfg_mobile_pro_themes' ),\n 'popular_items' => _x( 'Popular OMFG Mobile Pro Page Themes', 'omfg_mobile_pro_themes' ),\n 'all_items' => _x( 'All OMFG Mobile Pro Page Themes', 'omfg_mobile_pro_themes' ),\n 'parent_item' => _x( 'Parent OMFG Mobile Pro Page Theme', 'omfg_mobile_pro_themes' ),\n 'parent_item_colon' => _x( 'Parent OMFG Mobile Pro Page Theme:', 'omfg_mobile_pro_themes' ),\n 'edit_item' => _x( 'Edit OMFG Mobile Pro Page Theme', 'omfg_mobile_pro_themes' ),\n 'update_item' => _x( 'Update OMFG Mobile Pro Page Theme', 'omfg_mobile_pro_themes' ),\n 'add_new_item' => _x( 'Add New OMFG Mobile Pro Page Theme', 'omfg_mobile_pro_themes' ),\n 'new_item_name' => _x( 'New OMFG Mobile Pro Page Theme Name', 'omfg_mobile_pro_themes' ),\n 'separate_items_with_commas' => _x( 'Separate omfg mobile pro page themes with commas', 'omfg_mobile_pro_themes' ),\n 'add_or_remove_items' => _x( 'Add or remove omfg mobile pro page themes', 'omfg_mobile_pro_themes' ),\n 'choose_from_most_used' => _x( 'Choose from the most used omfg mobile pro page themes', 'omfg_mobile_pro_themes' ),\n 'menu_name' => _x( 'OMFG Mobile Pro Page Themes', 'omfg_mobile_pro_themes' ),\n );\n\n $args = array( \n 'labels' => $labels,\n 'public' => true,\n 'show_in_nav_menus' => false,\n 'show_ui' => true,\n 'show_tagcloud' => false,\n 'hierarchical' => true,\n 'rewrite' => false,\n 'query_var' => true\n );\n\t\n\tregister_taxonomy( 'omfg_mobile_pro_themes', /*array('omfg-mobile-pro'),*/ $args );\n\n}", "function wtfdivi099_add_meta_boxes() {\r\n\tforeach(get_post_types() as $pt) {\r\n\t\tif (post_type_supports($pt, 'editor') and function_exists('et_single_settings_meta_box')) {\r\n\t\t\tadd_meta_box('et_settings_meta_box', __('Divi Custom Post Settings', 'Divi'), 'et_single_settings_meta_box', $pt, 'side', 'high');\r\n\t\t}\r\n\t} \r\n}", "function install_theme_information()\n {\n }", "function get_allowed_themes()\n {\n }", "function set_theme($params)\n\t{\n\n\t\t(object) $theme = array_to_object($params);\n\n \t/**\n \t * ----------------------------------------------------------------------\n\t\t * The YoteyoteUI Main Configuration data array.\n\t\t * ----------------------------------------------------------------------\n\t\t */\n/*\n\t\t$data = array(\n\t\t\t'template' => array(\n \t\t\t'name' => 'Yoteyote',\n\t\t\t 'version' => '1.0',\n\t\t\t 'author' => 'Yoteyote',\n\t\t\t 'title' => 'YoteyoteUI - Premium Web App and Admin Template',\n\t\t\t 'description' => 'YoteyoteUI is a Premium Web App and Admin Template',\n\t\t\t\t'keywords' => 'Yoteyote',\n\n\t\t\t // '' empty to remove full width from the page (< 992px: 100%, > 992px: 95%, 1440px max width)\n\t\t\t // 'full-width' for a full width page (100%, 1920px max width)\n\t\t\t 'page' => 'full-width',\n\n\t\t\t // 'navbar-default' for a light header\n\t\t\t // 'navbar-inverse' for a dark header\n\t\t\t 'header_navbar' => 'navbar-default',\n\n\t\t\t // 'navbar-fixed-top' for a top fixed header\n\t\t\t // 'navbar-fixed-bottom' for a bottom fixed header\n\t\t\t 'header' => 'navbar-fixed-top',\n\n\t\t\t // '' left sidebar will open only from the top left toggle button (better website performance)\n\t\t\t // 'enable-hover' will make a small portion of left sidebar visible, so that it can be opened with a mouse hover (> 1200px) (may affect website performance)\n\t\t\t 'sidebar_left' => 'enable-hover',\n\n\t\t\t // '' right sidebar will open only from the top right toggle button (better website performance)\n\t\t\t // 'enable-hover' will make a small portion of right sidebar visible, so that it can be opened with a mouse hover (> 1200px) (may affect website performance)\n\t\t\t 'sidebar_right' => '',\n\n\t\t\t // '' empty for default behavior\n\t\t\t // 'sidebar-left-pinned' for a left pinned sidebar (always visible > 1200px)\n\t\t\t // 'sidebar-right-pinned' for a right pinned sidebar (always visible > 1200px)\n\t\t\t // 'sidebar-left-pinned sidebar-right-pinned' for both sidebars pinned (always visible > 1200px)\n\t\t\t 'navigation' => '',\n\n\t\t\t // All effects apply in resolutions larger than 1200px width\n\t\t\t // 'fx-none' remove all effects from main content when one of the sidebars are open (better website performance)\n\t\t\t // 'fx-opacity' opacity effect\n\t\t\t // 'fx-move' move effect\n\t\t\t // 'fx-push' push effect\n\t\t\t // 'fx-rotate' rotate effect\n\t\t\t // 'fx-push-move' push-move effect\n\t\t\t // 'fx-push-rotate' push-rotate effect\n\t\t\t 'content_fx' => 'fx-opacity',\n\n\t\t\t // Available themes: 'river', 'amethyst' , 'dragon', 'emerald', 'grass' or '' leave empty for the default fresh orange\n\t\t\t 'theme' => 'dragon',\n\t\t\t //'theme' => $this->input->cookie('theme_cookie', TRUE),\n\n\t\t\t //'active_page' => basename($_SERVER['PHP_SELF']),\n\t\t\t 'active_page' => current_url($page), // To get the CI current page.\n\t\t\t),\n\t\t);\n*/\n\n\t\t$data = array(\n\t\t\t'template' => array(\n \t\t\t'name' => $theme->name,\n\t\t\t 'version' => $theme->version,\n\t\t\t 'author' => $theme->author,\n\t\t\t 'title' => $theme->title,\n\t\t\t 'description' => $theme->description,\n\t\t\t\t'keywords' => $theme->keywords,\n\t\t\t 'page' => $theme->page,\n\t\t\t 'header_navbar' => $theme->header_navbar,\n\t\t\t 'header' => $theme->header,\n\t\t\t 'sidebar_left' => $theme->sidebar_left,\n\t\t\t 'sidebar_right' => $theme->sidebar_right,\n\t\t\t 'navigation' => $theme->navigation,\n\t\t\t 'content_fx' => $theme->content_fx,\n\t\t\t 'theme' => $theme->theme,\n\t\t\t 'active_page' => $theme->active_page,\n\t\t\t),\n\t\t);\n\n\t\treturn $data;\n\t}", "function pd_theme_support()\n{\n\n /* =============== \tAdd language supports =============== */\n load_theme_textdomain('pd', get_template_directory() . '/lang');\n\n\n /* =============== Rss feed support =============== */\n add_theme_support('automatic-feed-links');\n\n\n /* =============== \t Add post formarts supports =============== */\n add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));\n}", "function theme()\n\t{\n\t\t$this->viewdata[\"function_title\"] = __(\"Theme\");\n\n\t\t$form = array();\n\n\t\t$form['open'] = array(\n\t\t\t'type' => 'open'\n\t\t);\n\t\t\n\t\t// build the array for the form\n\t\t$form['fs_gen_site_title'] = array(\n\t\t\t'type' => 'input',\n\t\t\t'label' => 'Title',\n\t\t\t'class' => 'span3',\n\t\t\t'placeholder' => FOOL_PREF_GEN_WEBSITE_TITLE,\n\t\t\t'preferences' => TRUE,\n\t\t\t'validate' => 'trim|max_length[32]',\n\t\t\t'help' => __('Sets the title of your site.')\n\t\t);\n\t\t\n\t\t// build the array for the form\n\t\t$form['fs_gen_index_title'] = array(\n\t\t\t'type' => 'input',\n\t\t\t'label' => 'Index title',\n\t\t\t'class' => 'span3',\n\t\t\t'placeholder' => FOOL_PREF_GEN_INDEX_TITLE,\n\t\t\t'preferences' => TRUE,\n\t\t\t'validate' => 'trim|max_length[32]',\n\t\t\t'help' => __('Sets the title displayed in the index page.')\n\t\t);\n\t\t\n\t\t$form['ff_lang_default'] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'label' => __('Default language'),\n\t\t\t'help' => __('The language the users will see as they reach your site.'),\n\t\t\t'options' => config_item('ff_available_languages'),\n\t\t\t'default_value' => FOOL_LANG_DEFAULT,\n\t\t\t'preferences' => TRUE,\n\t\t);\n\n\t\t$form['separator-2'] = array(\n\t\t\t'type' => 'separator'\n\t\t);\n\t\t\n\t\t$themes = array();\n\t\t\n\t\t$this->load->model('theme_model', 'theme');\n\t\t\n\t\tforeach($this->theme->get_all() as $name => $theme)\n\t\t{\n\t\t\t$themes[] = array(\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => $theme['name'] . ' theme',\n\t\t\t\t'help' => sprintf(__('Enable %s theme'), $theme['name']),\n\t\t\t\t'array_key' => $name,\n\t\t\t\t'preferences' => TRUE,\n\t\t\t\t'checked' => defined('FOOL_PREF_THEMES_THEME_' . strtoupper($name) . '_ENABLED') ?\n\t\t\t\t\tconstant('FOOL_PREF_THEMES_THEME_' . strtoupper($name) . '_ENABLED'):0\n\t\t\t);\n\t\t}\n\t\t\n\t\t$form['fs_theme_active_themes'] = array(\n\t\t\t'type' => 'checkbox_array',\n\t\t\t'label' => __('Active themes'),\n\t\t\t'help' => __('Choose the themes to make available to the users. Admins are able to access any of them even if disabled.'),\n\t\t\t'checkboxes' => $themes\n\t\t);\n\t\t\n\t\t$themes_default = array();\n\t\t\n\t\tforeach($this->theme->get_all() as $name => $theme)\n\t\t{\n\t\t\t$themes_default[$name] = $theme['name'];\n\t\t}\n\t\t\n\t\t$form['fs_theme_default'] = array(\n\t\t\t'type' => 'dropdown',\n\t\t\t'label' => __('Default theme'),\n\t\t\t'help' => __('The theme the users will see as they reach your site.'),\n\t\t\t'options' => $themes_default,\n\t\t\t'default_value' => FOOL_THEME_DEFAULT,\n\t\t\t'preferences' => TRUE,\n\t\t);\n\n\t\t$form['fs_theme_google_analytics'] = array(\n\t\t\t'type' => 'input',\n\t\t\t'label' => __('Google Analytics code'),\n\t\t\t'placeholder' => 'UX-XXXXXXX-X',\n\t\t\t'preferences' => TRUE,\n\t\t\t'help' => __(\"Insert your Google Analytics code to get statistics.\"),\n\t\t\t'class' => 'span2'\n\t\t);\n\n\t\t$form['separator-3'] = array(\n\t\t\t'type' => 'separator'\n\t\t);\n\n\t\t$form['fs_theme_header_text'] = array(\n\t\t\t'type' => 'textarea',\n\t\t\t'label' => __('Header Text (\"notices\")'),\n\t\t\t'preferences' => TRUE,\n\t\t\t'help' => __(\"Inserts the text above in the header, below the nagivation links.\"),\n\t\t\t'class' => 'span5'\n\t\t);\n\n\t\t$form['fs_theme_header_code'] = array(\n\t\t\t'type' => 'textarea',\n\t\t\t'label' => __('Header Code'),\n\t\t\t'preferences' => TRUE,\n\t\t\t'help' => __(\"This will insert the HTML code inside the &lt;HEAD&gt;.\"),\n\t\t\t'class' => 'span5'\n\t\t);\n\n\t\t$form['fs_theme_footer_text'] = array(\n\t\t\t'type' => 'textarea',\n\t\t\t'label' => __('Footer Text'),\n\t\t\t'preferences' => TRUE,\n\t\t\t'help' => __('Credits in the footer and similar.'),\n\t\t\t'class' => 'span5'\n\t\t);\n\n\t\t$form['fs_theme_footer_code'] = array(\n\t\t\t'type' => 'textarea',\n\t\t\t'label' => __('Footer Code'),\n\t\t\t'preferences' => TRUE,\n\t\t\t'help' => __(\"This will insert the HTML code above after the &lt;BODY&gt;.\"),\n\t\t\t'class' => 'span5'\n\t\t);\n\n\t\t$form['separator'] = array(\n\t\t\t'type' => 'separator'\n\t\t);\n\n\t\t$form['submit'] = array(\n\t\t\t'type' => 'submit',\n\t\t\t'value' => __('Submit'),\n\t\t\t'class' => 'btn btn-primary'\n\t\t);\n\n\t\t$form['close'] = array(\n\t\t\t'type' => 'close'\n\t\t);\n\n\t\t$this->preferences->submit_auto($form);\n\n\t\t$data['form'] = $form;\n\n\t\t// create a form\n\t\t$this->viewdata[\"main_content_view\"] = $this->load->view(\"admin/form_creator\",\n\t\t\t$data, TRUE);\n\t\t$this->load->view(\"admin/default\", $this->viewdata);\n\t}", "function wp_theme_auto_update_setting_template()\n {\n }", "function hybrid_theme_setup_theme() {\n\tglobal $content_width;\n\t\n\t/* Get the theme prefix. */\n\t$prefix = hybrid_get_prefix();\n\n\t\n\t/* Add support for framework features. */\n\tadd_theme_support( 'hybrid-core-menus', array( 'primary' ) );\n\tadd_theme_support( 'hybrid-core-sidebars', array( 'primary', 'secondary', 'before-content', 'after-content', 'after-singular', 'subsidiary' ) );\n\tadd_theme_support( 'hybrid-core-widgets' );\n\tadd_theme_support( 'hybrid-core-shortcodes' );\n\tadd_theme_support( 'hybrid-favicon-support' );\n \n\t// add_theme_support( 'hybrid-core-theme-settings', array( 'about', 'footer' ) );\n\t// add_theme_support( 'hybrid-core-drop-downs' );\n\t// add_theme_support( 'hybrid-core-seo' );\n\t// add_theme_support( 'hybrid-core-template-hierarchy' );\n\t// add_theme_support( 'hybrid-core-deprecated' ); \n\t/* Add support for framework extensions. */\n\tadd_theme_support( 'breadcrumb-trail' );\n\t// add_theme_support( 'custom-field-series' );\n\tadd_theme_support( 'get-the-image' );\n\t// add_theme_support( 'post-stylesheets' );\n add_theme_support( 'loop-pagination' );\n\t/* Only add cleaner gallery support if not using child theme. Eventually, all child themes should support this. */\n\t// if ( 'hybrid' == get_stylesheet() )\n\tadd_theme_support( 'cleaner-gallery' );\n\t\n\t// lets plugins know that we have style for twitter\n\tadd_theme_support( 'tabs', 'twitter-bootstrap' );\n\tadd_theme_support( 'accordions', 'twitter-bootstrap' );\n\tadd_theme_support( 'grid', 'twitter-bootstrap' );\n\n\t/* Add support for WordPress features. */\n\tadd_theme_support( 'automatic-feed-links' );\n\n\t/* Register sidebars. */\n\tadd_action( 'init', 'hybrid_theme_register_sidebars', 11 );\n\n\t/* Disables widget areas. */\n\tadd_filter( 'sidebars_widgets', 'hybrid_theme_remove_sidebars' );\n\n\t/* Header actions. */\n\t// add_action( \"{$prefix}_header\", 'hybrid_site_title' );\n\t// add_action( \"{$prefix}_header\", 'hybrid_site_description' );\n\n\t/* Load the primary menu. */\n\t// add_action( \"{$prefix}_after_header\", 'hybrid_get_primary_menu' );\n\n\t/* Add the primary and secondary sidebars after the container. */\n\t//add_action( \"{$prefix}_after_container\", 'hybrid_get_primary' );\n\t\n\t//add_action( \"{$prefix}_after_container\", 'hybrid_get_secondary' );\n\n\t/* Add the breadcrumb trail and before content sidebar before the content. */\n\t\n\t\n\tadd_action( \"{$prefix}_before_content\", 'hybrid_get_utility_before_content' );\n\n\t/* Add the title, byline, and entry meta before and after the entry. */\n\tadd_action( \"{$prefix}_before_entry\", 'ubc_collab_entry_title' );\n\tadd_action( \"{$prefix}_before_entry\", 'hybrid_byline' );\n\tadd_action( \"{$prefix}_after_entry\", 'hybrid_entry_meta' );\n\n\t/* Add the after singular sidebar and custom field series extension after singular views. */\n\tadd_action( \"{$prefix}_after_singular\", 'hybrid_get_utility_after_singular' );\n\t// add_action( \"{$prefix}_after_singular\", 'custom_field_series' );\n\n\t/* Add the after content sidebar and navigation links after the content. */\n\tadd_action( \"{$prefix}_after_content\", 'hybrid_get_utility_after_content' );\n\tadd_action( \"{$prefix}_after_content\", 'hybrid_navigation_links' );\n\n\t/* Add the subsidiary sidebar and footer insert to the footer. */\n\tadd_action( \"{$prefix}_before_footer\", 'hybrid_get_subsidiary' );\n\t// add_action( \"{$prefix}_footer\", 'hybrid_footer_insert' );\n\n\t/* Add the comment avatar and comment meta before individual comments. */\n\tadd_action( \"{$prefix}_before_comment\", 'hybrid_avatar' );\n\tadd_action( \"{$prefix}_before_comment\", 'ubc_collab_comment_meta' );\n\t\n\t\n\t\n\t/* Add Hybrid theme-specific body classes. */\n\tadd_filter( 'body_class', 'hybrid_theme_body_class' );\n\t\n\tadd_filter( 'loop_pagination' , 'ubc_collab_loop_pagination' );\n\t\n\tadd_filter( 'loop-shortcode-pagination' , 'ubc_collab_pagination_arg' );\n\tadd_filter( 'loop_pagination_args', 'ubc_collab_pagination_arg');\n\t\n\t// Responsive Embed\n\tadd_filter('oembed_dataparse', 'ubc_collab_responsive_embed', 10, 1);\n\t\n\t// rename Subsidiary to Footer\n\tadd_filter( \"{$prefix}_sidebar_args\", 'ubc_collab_rename_subsidiary_sidebar', 10, 2 );\n\t\n\t/* Content width. */\n\tif ( empty( $content_width ) && !is_active_sidebar( 'primary' ) && !is_active_sidebar( 'secondary' ) )\n\t\t$content_width = 960;\n\telseif ( empty( $content_width ) )\n\t\t$content_width = 620;\n\t\t\n}", "function thb_theme_layout_options() {\n\t\tforeach( thb_theme()->getPublicPostTypes() as $post_type ) {\n\t\t\tif ( ! $thb_metabox = $post_type->getMetabox('layout') ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$all_templates = thb_get_theme_templates();\n\n\t\t\t$thb_container = $thb_metabox->getContainer( 'layout_container' );\n\n\t\t\tif( thb_is_admin_template( $all_templates ) ) {\n\t\t\t\t$thb_field = new THB_SelectField( 'superba_page_header_alignment' );\n\t\t\t\t\t$thb_field->setLabel( __( 'Page header alignment', 'thb_text_domain' ) );\n\t\t\t\t\t$thb_field->setOptions(array(\n\t\t\t\t\t\t'pageheader-alignment-left' => __('Left', 'thb_text_domain'),\n\t\t\t\t\t\t'pageheader-alignment-center' => __('Center', 'thb_text_domain'),\n\t\t\t\t\t\t'pageheader-alignment-right' => __('Right', 'thb_text_domain')\n\t\t\t\t\t));\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t$thb_field = new THB_SelectField( 'superba_subtitle_position' );\n\t\t\t\t\t$thb_field->setLabel( __( 'Page subtitle position', 'thb_text_domain' ) );\n\t\t\t\t\t$thb_field->setOptions(array(\n\t\t\t\t\t\t'subtitle-bottom' => __('Bottom', 'thb_text_domain'),\n\t\t\t\t\t\t'subtitle-top' => __('Top', 'thb_text_domain')\n\t\t\t\t\t));\n\t\t\t\t$thb_container->addField($thb_field);\n\t\t\t}\n\n\t\t\tif( thb_is_admin_template( 'default' ) || thb_is_admin_template( 'template-blank.php' ) ) {\n\n\t\t\t\t$thb_field = new THB_SelectField( 'superba_page_width' );\n\t\t\t\t\t$thb_field->setLabel( __( 'Page width', 'thb_text_domain' ) );\n\t\t\t\t\t$thb_field->setOptions(array(\n\t\t\t\t\t\t'thb-page-width-large' => __('Large', 'thb_text_domain'),\n\t\t\t\t\t\t'thb-page-width-small' => __('Small', 'thb_text_domain')\n\t\t\t\t\t));\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t}\n\n\t\t\tif( thb_is_admin_template( thb_get_theme_templates( 'gallery' ) ) ) {\n\n\t\t\t\t$thb_field = new THB_CheckboxField('gallery_disable_featured_image');\n\t\t\t\t$thb_field->setLabel( __('Disable page featured image', 'thb_text_domain') );\n\t\t\t\t$thb_field->setHelp( __('Check if you want to disable the featured image inside the page.', 'thb_text_domain') );\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t}\n\n\t\t\tif( thb_is_admin_template( thb_get_theme_templates( 'gallery' ) ) || thb_is_admin_template( 'single-works.php' ) ) {\n\n\t\t\t\t$thb_field = new THB_SelectField( 'gallery_modal_skin' );\n\t\t\t\t\t$thb_field->setLabel( __( 'Choose the modal skin', 'thb_text_domain' ) );\n\t\t\t\t\t$thb_field->setOptions(array(\n\t\t\t\t\t\t'modal-skin-light' => __('Light', 'thb_text_domain'),\n\t\t\t\t\t\t'modal-skin-dark' => __('Dark', 'thb_text_domain')\n\t\t\t\t\t));\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t$thb_field = new THB_CheckboxField( 'gallery_modal_details_auto_open' );\n\t\t\t\t\t$thb_field->setLabel( __( 'Details panel expanded', 'thb_text_domain' ) );\n\t\t\t\t\t$thb_field->setHelp( __('Check if you want to open the gallery modal with the details panel already expanded.', 'thb_text_domain') );\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t$thb_field = new THB_CheckboxField( 'gallery_modal_disable_margins' );\n\t\t\t\t\t$thb_field->setLabel( __( 'Disable margins on modal', 'thb_text_domain' ) );\n\t\t\t\t\t$thb_field->setHelp( __('Check if you want to disable the margins around images on modal view.', 'thb_text_domain') );\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t$thb_field = new THB_CheckboxField( 'gallery_modal_disable' );\n\t\t\t\t\t$thb_field->setLabel( __( 'Disable gallery modal', 'thb_text_domain' ) );\n\t\t\t\t\t$thb_field->setHelp( __('Check this if you don\\'t want the gallery lightbox modal to open when clicking on album images.', 'thb_text_domain') );\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t}\n\n\t\t\tif( thb_is_admin_template( 'template-splash.php' ) ) {\n\n\t\t\t\t// $thb_tab = $thb_metabox->createTab( 'Logo' )\n\n\t\t\t\t$thb_container->setTitle( __( 'Logo', 'thb_text_domain' ) );\n\n\t\t\t\t$thb_field = new THB_UploadField('splash_logo');\n\t\t\t\t$thb_field->setLabel( __('Splash Logo', 'thb_text_domain') );\n\t\t\t\t$thb_field->setHelp( __('Upload an image to be used as a splash logo for your page. If this field is left empty, a simple text logo will be used. Please remember to load a properly dimensioned logo.', 'thb_text_domain') );\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t$thb_field = new THB_UploadField('splash_logo_retina');\n\t\t\t\t\t$thb_field->setLabel( __('Retina logo', 'thb_text_domain') );\n\t\t\t\t\t$thb_field->setHelp( __('Upload an image to be used as a splash logo for your page for high definition screens. Please remember to load a properly dimensioned logo (usually you can double the size of the regular logo).', 'thb_text_domain') );\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t$thb_field = new THB_TextField('splash_logo_url');\n\t\t\t\t\t$thb_field->setLabel( __('Splash logo URL', 'thb_text_domain') );\n\t\t\t\t\t$thb_field->setHelp( __('You can use a manual URL http:// or a post or page ID.', 'thb_text_domain'));\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t$thb_container = $thb_metabox->createContainer( __( 'Headings', 'thb_text_domain' ), 'splash_headings_container' );\n\n\t\t\t\t$thb_field = new THB_TextField('splash_title');\n\t\t\t\t$thb_field->setLabel( __('Main heading', 'thb_text_domain') );\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t$thb_field = new THB_TextField('splash_subtitle');\n\t\t\t\t$thb_field->setLabel( __('Sub heading', 'thb_text_domain') );\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t$thb_field = new THB_SelectField( 'splash_subtitle_position' );\n\t\t\t\t\t$thb_field->setLabel( __( 'Sub heading position', 'thb_text_domain' ) );\n\t\t\t\t\t$thb_field->setOptions(array(\n\t\t\t\t\t\t'thb-splash-subtitle-bottom' => __('Bottom', 'thb_text_domain'),\n\t\t\t\t\t\t'thb-splash-subtitle-top' => __('Top', 'thb_text_domain')\n\t\t\t\t\t));\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t$thb_field = new THB_SelectField( 'splash_page_alignment' );\n\t\t\t\t\t$thb_field->setLabel( __( 'Heading alignment', 'thb_text_domain' ) );\n\t\t\t\t\t$thb_field->setOptions(array(\n\t\t\t\t\t\t'thb-splash-align-left' => __('Left', 'thb_text_domain'),\n\t\t\t\t\t\t'thb-splash-align-center' => __('Center', 'thb_text_domain'),\n\t\t\t\t\t\t'thb-splash-align-right' => __('Right', 'thb_text_domain')\n\t\t\t\t\t));\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t$thb_container = $thb_metabox->createContainer( __( 'Call to action', 'thb_text_domain' ), 'splash_callto_container' );\n\n\t\t\t\t$thb_field = new THB_TextField('splash_action_label');\n\t\t\t\t\t$thb_field->setLabel( __('Call to action label', 'thb_text_domain') );\n\t\t\t\t\t$thb_field->setHelp( __('Call to action button label. If left empty the call to action button will not be shown.', 'thb_text_domain') );\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t$thb_field = new THB_TextField('splash_action_url');\n\t\t\t\t\t$thb_field->setLabel( __('Call to action URL', 'thb_text_domain') );\n\t\t\t\t\t$thb_field->setHelp( __('The call to action button URL. You can use a manual URL http:// or a post or page ID.', 'thb_text_domain'));\n\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t$thb_container = $thb_metabox->createContainer( __( 'Social links', 'thb_text_domain' ), 'splash_social_container' );\n\n\t\t\t\t\t$thb_field = new THB_MultipleSelectField('social_networks');\n\t\t\t\t\t\t$thb_field->setLabel( __('Social networks', 'thb_text_domain') );\n\t\t\t\t\t\t$thb_field->setHelp( __('Social networks to be displayed in the page bottom.', 'thb_text_domain') );\n\t\t\t\t\t\t$thb_field->setOptions( thb_get_theme_social_options() );\n\t\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t$thb_container = $thb_metabox->createContainer( __( 'Overlay', 'thb_text_domain' ), 'splash_overlay_container' );\n\n\t\t\t\t\t$thb_field = new THB_ColorField('splash_overlay_color');\n\t\t\t\t\t\t$thb_field->setLabel( __('Color', 'thb_text_domain') );\n\t\t\t\t\t$thb_container->addField($thb_field);\n\n\t\t\t\t\t$thb_field = new THB_NumberField('splash_overlay_opacity');\n\t\t\t\t\t\t$thb_field->setLabel( __('Opacity', 'thb_text_domain') );\n\t\t\t\t\t\t$thb_field->setMin(0);\n\t\t\t\t\t\t$thb_field->setMax(1);\n\t\t\t\t\t\t$thb_field->setStep(0.05);\n\t\t\t\t\t$thb_container->addField($thb_field);\n\t\t\t}\n\n\t\t}\n\n\t\tif( thb_is_admin_template( thb_get_theme_templates( 'gallery' ) ) ) {\n\t\t\t$thb_metabox = thb_theme()->getPostType( 'page' )->getMetabox( 'thb_builder' );\n\t\t\t$thb_container = $thb_metabox->createContainer( '', 'thb_builder_gallery_config', 0 );\n\n\t\t\t$thb_field = new THB_SelectField( 'builder_position_gallery_pages' );\n\t\t\t\t$thb_field->setLabel( __( 'Position', 'thb_text_domain' ) );\n\t\t\t\t$thb_field->setOptions( array(\n\t\t\t\t\t'top' => __( 'Above the gallery', 'thb_text_domain' ),\n\t\t\t\t\t'bottom' => __( 'Below the gallery', 'thb_text_domain' ),\n\t\t\t\t) );\n\t\t\t$thb_container->addField( $thb_field );\n\t\t}\n\t}", "function my_theme_create_options() {\r\n $titan = TitanFramework::getInstance( 'genietheme' );\r\n \r\n // Create my admin panel\r\n $panel = $titan->createAdminPanel( array(\r\n 'name' => 'Theme Options',\r\n ) );\r\n \r\n \r\n $generaltab = $panel->createTab( array(\r\n 'name' => 'General Tab',\r\n ) );\r\n \r\n // Create options for my admin panel\r\n $generaltab->createOption( array(\r\n 'name' => 'LOGO',\r\n 'id' => 'head_logo',\r\n 'type' => 'upload',\r\n 'desc' => 'Upoad logo of site.'\r\n ) );\r\n \r\n $generaltab->createOption( array(\r\n 'name' => 'Header Scripts',\r\n 'id' => 'header_scripts',\r\n 'type' => 'textarea',\r\n 'desc' => 'Enter your header scripts or code like google analytics,webmaster code etc...'\r\n ) );\r\n \r\n \r\n $generaltab->createOption( array(\r\n 'name' => 'Footer Scripts',\r\n 'id' => 'footer_scripts',\r\n 'type' => 'textarea',\r\n 'desc' => 'Enter your footer scripts or code like google analytics,webmaster code etc...'\r\n ) );\r\n \r\n \r\n $generaltab->createOption( array(\r\n 'type' => 'save'\r\n ) );\r\n \r\n \r\n $titan = TitanFramework::getInstance( 'genietheme' );\r\n$productMetaBox = $titan->createMetaBox( array(\r\n 'name' => 'Additinal Job Information',\r\n 'post_type' => 'jobs',\r\n) );\r\n\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Job Link',\r\n 'id' => 'j_link',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Experience Required',\r\n 'id' => 'exp_required',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Education Qualification',\r\n 'id' => 'edu_qual',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Preffered Nationality',\r\n 'id' => 'nationality',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Salary',\r\n 'id' => 'salary',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'No. of vaccancies',\r\n 'id' => 'vaccancies',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Benefits',\r\n 'id' => 'benefits',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Gender',\r\n 'id' => 'gender',\r\n 'options' => array(\r\n '1' => 'Male',\r\n '2' => 'Female',\r\n '3' => 'Male/Female',\r\n ),\r\n 'type' => 'radio',\r\n 'desc' => 'Select gender',\r\n 'default' => '1',\r\n \r\n ) );\r\n\r\n \r\n}", "function thememount_set_rs_as_theme() {\n\tif(get_option('revSliderAsTheme') != 'true'){\n\t\tupdate_option('revSliderAsTheme', 'true');\n\t}\n\tif(get_option('revslider-valid-notice') != 'false'){\n\t\tupdate_option('revslider-valid-notice', 'false');\n\t}\n\tif( function_exists('set_revslider_as_theme') ){\t\n\t\tset_revslider_as_theme();\n\t}\n}", "public function set_content_type($contenttype)\n\t{\n\t\t$variables = &$this->cms->variables;\n\t\t$variables['content-type'] = $contenttype;\n\t}", "function mmpm_register_theme_options() {\n\t\tregister_setting( 'mmpm_options_group', MMPM_OPTIONS_DB_NAME );\n//\t\tregister_setting( 'mmpm_options_group', MMPM_SKIN_DB_NAME );\n\t}", "function hello_world_theme($existing, $type, $theme, $path) {\n $theme = array();\n $theme['node__hello_world_article'] = array(\n 'render element' => 'content',\n 'base hook' => 'node',\n 'template' => 'node--hello_world_article',\n 'path' => drupal_get_path('module', 'hello_world') . '/templates',\n );\n return $theme;\n}", "function thirdtheme_about_page()\n {\n $args = array(\n 'labels' => array('name' =>__('our service'),\n 'add_new' =>__('add services detail')),\n \n 'public' => true,\n 'menu_icon' =>'dashicons-buddicons-pm',\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title', 'editor')); \n register_post_type('our_service',$args);\n }", "function jw_theme_setup(){\n\t\n\t\tglobal $domain; /* The unique string used for translation */\n\t\n\t\t/* Add theme-supported features. */\n\t\tadd_theme_support('automatic-feed-links');\n\t\tadd_theme_support('post-thumbnails');\n\t\t\n\t\t/* Add post thumbnail sizes */\n\t\tset_post_thumbnail_size(570, 194, true);\n\t\tadd_image_size('jw_full', 880, 303, true);\n\t\tadd_image_size('jw_third', 270, 170, true);\n\t\tadd_image_size('jw_half', 425, 232, true);\n\t\tadd_image_size('jw_portfolio_grid', 241, 180, true);\n\t\t\n\t\t/* Don't change the sizes bellow */\n\t\tadd_image_size('jw_58', 58, 43, true);\n\t\tadd_image_size('jw_100', 100, 100, true);\n\t\t\n\t\t/* Localization */\n\t\tload_theme_textdomain($domain, TEMPLATEPATH . '/lang');\n\t\t\n\t}", "function custom_theme_options() {\n\n \n\n /* OptionTree is not loaded yet */\n\n if ( ! function_exists( 'ot_settings_id' ) )\n\n return false;\n\n \n\n /**\n\n * Get a copy of the saved settings array. \n\n */\n\n $saved_settings = get_option( ot_settings_id(), array() );\n\n \n\n /**\n\n * Custom settings array that will eventually be \n\n * passes to the OptionTree Settings API Class.\n\n */\n\n $custom_settings = array( \n\n 'contextual_help' => array( \n\n 'sidebar' => ''\n\n ),\n\n 'sections' => array( \n\n array(\n\n 'id' => 'general',\n\n 'title' => __( 'General', 'theme-options.php' )\n\n ),\n\n\n array(\n\n 'id' => 'slider',\n\n 'title' => __( 'Slider', 'theme-options.php' )\n\n ),\n\n array(\n\n 'id' => 'footer',\n\n 'title' => __( 'Footer', 'theme-options.php' )\n\n ),\n\n array(\n\n 'id' => 'social_links',\n\n 'title' => __( 'Social Links', 'theme-options.php' )\n\n )\n\n ),\n\n 'settings' => array( \n\n array(\n\n 'id' => 'theme_logo',\n\n 'label' => __( 'Theme Logo', 'theme-options.php' ),\n\n 'desc' => __( 'Upload your Logo Image Here.Logo Dimension width:223px,Height:52px.', 'theme-options.php' ),\n\n 'std' => '',\n\n 'type' => 'upload',\n\n 'section' => 'general',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n ),\n\n\n array(\n\n 'id' => 'alert',\n\n 'label' => __( 'Add or Change Alert Box Text from Home Page', 'theme-options.php' ),\n\n 'desc' => '',\n\n 'std' => '',\n\n 'type' => 'text',\n\n 'section' => 'general',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n ),\n\n\n array(\n\n 'id' => 'column_one_direction',\n\n 'label' => __( 'Add Column One Hours & Direction ', 'theme-options.php' ),\n\n 'desc' => '',\n\n 'std' => '',\n\n 'type' => 'textarea',\n\n 'section' => 'general',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n ),\n\t array(\n\n 'id' => 'column_two_direction',\n\n 'label' => __( 'Add Column Two Hours & Direction With Button', 'theme-options.php' ),\n\n 'desc' => '',\n\n 'std' => '',\n\n 'type' => 'textarea',\n\n 'section' => 'general',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n ),\n\t\n\t array(\n\n 'id' => 'mail_chimp',\n\n 'label' => __( 'Add Mailchimp Form Image:Dimension: width:340px & Height:151px', 'theme-options.php' ),\n\n 'desc' => __( '.', 'theme-options.php' ),\n\n 'std' => '',\n\n 'type' => 'upload',\n\n 'section' => 'general',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n ),\n\n \n\n\t array(\n\n 'id' => 'slide',\n\n 'label' => __( 'Slide', 'theme-options.php' ),\n\n 'desc' => 'Click Add New Button to add the slider Images.Slider Image Dimention - Width:1400px Height:573px',\n\n 'std' => '',\n\n 'type' => 'slider',\n\n 'section' => 'slider',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n ),\n\n \n\n\t \n\n array(\n\n 'id' => 'copyright',\n\n 'label' => __( 'Add Your Footer Bottom Copyright Text', 'theme-options.php' ),\n\n 'desc' => '',\n\n 'std' => '',\n\n 'type' => 'text',\n\n 'section' => 'footer',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n ),\n\t array(\n\n 'id' => 'address',\n\n 'label' => __( 'Add Your Footer Address Here', 'theme-options.php' ),\n\n 'desc' => '',\n\n 'std' => '',\n\n 'type' => 'text',\n\n 'section' => 'footer',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n ),\n\t array(\n\n 'id' => 'phone',\n\n 'label' => __( 'Add Your Footer Phone Number Here', 'theme-options.php' ),\n\n 'desc' => '',\n\n 'std' => '',\n\n 'type' => 'text',\n\n 'section' => 'footer',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n ),\n\n\n\n array(\n\n 'id' => 'soc_pintrest',\n\n 'label' => __( 'Add Your Pintrest Profile link', 'theme-options.php' ),\n\n 'desc' => '',\n\n 'std' => '',\n\n 'type' => 'text',\n\n 'section' => 'social_links',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n ),\n\n\t array(\n\n 'id' => 'soc_instagram',\n\n 'label' => __( 'Add Your instagram Profile link', 'theme-options.php' ),\n\n 'desc' => '',\n\n 'std' => '',\n\n 'type' => 'text',\n\n 'section' => 'social_links',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n ),\n\n\t array(\n\n 'id' => 'soc_google',\n\n 'label' => __( 'Add Your Google Plus Profile link', 'theme-options.php' ),\n\n 'desc' => '',\n\n 'std' => '',\n\n 'type' => 'text',\n\n 'section' => 'social_links',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n ),\n\n array(\n\n 'id' => 'soc_facebook',\n\n 'label' => __( 'Add Your Facebook Profile link', 'theme-options.php' ),\n\n 'desc' => '',\n\n 'std' => '',\n\n 'type' => 'text',\n\n 'section' => 'social_links',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n ),\n\n array(\n\n 'id' => 'soc_twitter',\n\n 'label' => __( 'Add Your Twitter Profile link', 'theme-options.php' ),\n\n 'desc' => '',\n\n 'std' => '',\n\n 'type' => 'text',\n\n 'section' => 'social_links',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n ),\n\n\n\n array(\n\n 'id' => 'soc_youtube',\n\n 'label' => __( 'Add Your YouTube Profile link', 'theme-options.php' ),\n\n 'desc' => '',\n\n 'std' => '',\n\n 'type' => 'text',\n\n 'section' => 'social_links',\n\n 'rows' => '',\n\n 'post_type' => '',\n\n 'taxonomy' => '',\n\n 'min_max_step'=> '',\n\n 'class' => '',\n\n 'condition' => '',\n\n 'operator' => 'and'\n\n )\n\n )\n\n );\n\n \n\n /* allow settings to be filtered before saving */\n\n $custom_settings = apply_filters( ot_settings_id() . '_args', $custom_settings );\n\n \n\n /* settings are not the same update the DB */\n\n if ( $saved_settings !== $custom_settings ) {\n\n update_option( ot_settings_id(), $custom_settings ); \n\n }\n\n \n\n /* Lets OptionTree know the UI Builder is being overridden */\n\n global $ot_has_custom_theme_options;\n\n $ot_has_custom_theme_options = true;\n\n \n\n}", "protected function set_type() {\n\n\t\t\t$this->type = 'kirki-editor';\n\n\t\t}", "function pmpro_wp_mail_content_type( $content_type ) {\t\n\tadd_action('phpmailer_init', 'pmpro_send_html');\n\n\t// Change to html if not already.\n\tif( $content_type == 'text/plain') {\t\t\t\n\t\t$content_type = 'text/html';\n\t}\n\t\n\treturn $content_type;\n}", "final public function init(){\n\t\twp_register_style( 'tify-tinymce_template', self::tFyAppUrl() . '/theme.css', array(), '1.150317' );\n\t}", "function render_field_settings( $field ) {\n\t\t$templateKeys=array_keys(Context::current()->ui->setting('content/templates',[]));\n\n\t\t$choices=[];\n\t\tforeach($templateKeys as $key)\n\t\t\t$choices[$key] = $key;\n\n\n\t\tacf_render_field_setting( $field, array(\n\t\t\t'label' => __('Content Type','stem-content'),\n\t\t\t'instructions' => __('Select the content type to display alternate templates for.','stem-content'),\n\t\t\t'type' => 'select',\n\t\t\t'name' => 'content_type',\n\t\t\t'layout' => 'horizontal',\n\t\t\t'multiple' => 0,\n\t\t\t'choices' => $choices\n\t\t));\n\t}", "function yatta_theme_setup_child() {\n\n\n\n}", "function tierone_delta_settings(){\n\n\t\tload_theme_textdomain('tierone', get_template_directory() . '/languages');\n\n\t\t// Custom Image Crop\n\t\tadd_image_size('tier-featured-slider', 801, 423, true);\n\t\tadd_image_size('tier-featured-lights', 321, 161, true);\n\t\tadd_image_size('tier-featured-large', 870, 600, true);\n\t\tadd_image_size('tier-featured-medium', 473, 213, true);\n\t\tadd_image_size('tier-featured', 360, 218, true);\n\t\tadd_image_size('tier-featured-d', 380, 170, true);\n\t\tadd_image_size('tier-featured-post-ba', 311, 204, true);\n\t\tadd_image_size('tier-featured-post-bc', 177, 108, true);\n\t\tadd_image_size('tier-featured-small', 230, 118, true);\n\t\tadd_image_size('tier-featured-xs', 76, 76, true);\n\n /*\n * Let WordPress manage the document title.\n * By adding theme support, we declare that this theme does not use a\n * hard-coded <title> tag in the document head, and expect WordPress to\n * provide it for us.\n */\n add_theme_support('title-tag');\n\n\t\t/**\n\t\t * Add Custom Logo Support\n\t\t */\n\t\tadd_theme_support( 'custom-logo' );\n\n\t\t\n\t\tadd_theme_support('post-thumbnails');\n\n\n\t\t// This theme uses wp_nav_menu() in one location.\n\t\tregister_nav_menus(array(\n\t\t\t'primary-menu' => esc_html__( 'Primary Menu', 'tierone-delta' ),\n\t\t\t'footer-menu' => esc_html__( 'Footer Menu', 'tierone-delta' )\n\t\t));\n\n\n\t\t/*\n\t\t * Switch default core markup for search form, comment form, and comments\n\t\t * to output valid HTML5.\n\t\t */\n\t\tadd_theme_support('html5',array('search-form','comment-form','comment-list','gallery','caption'));\n\n\n\t\t/*\n\t\t * Enable support for Post Formats.\n\t\t * See https://developer.wordpress.org/themes/functionality/post-formats/\n\t\t */\n\t\tadd_theme_support('post-formats', array(\n\t\t\t'aside',\n\t\t\t'image',\n\t\t\t'video',\n\t\t\t'quote',\n\t\t\t'link'\n\t\t));\n\n // Setup the WordPress core custom background feature.\n add_theme_support( 'custom-background' , apply_filters( 'tier_custom_background_cb', array(\n 'default-color' => 'ffffff',\n 'default-image' => '',\n )));\n \n\t}", "function acquia_marina_theme($existing, $type, $theme, $path) {\r\n return array(\r\n 'gradapplication_node_form' => array(\r\n 'arguments' => array('form' => NULL),\r\n 'template' => 'node-edit-gradapplication',\r\n ),\r\n\t'gradapplication_node_form2' => array(\r\n \t'arguments' => array('form' => NULL),\r\n \t'template' => 'node-edit-gradapplication2',\r\n\t),\r\n\t'gradapplication_node_form3' => array(\r\n \t'arguments' => array('form' => NULL),\r\n \t'template' => 'node-edit-gradapplication3',\r\n\t),\r\n\t'gradapplication_node_form4' => array(\r\n \t'arguments' => array('form' => NULL),\r\n \t'template' => 'node-edit-gradapplication4',\r\n\t),\r\n\t'gradapplication_node_form5' => array(\r\n \t'arguments' => array('form' => NULL),\r\n \t'template' => 'node-edit-gradapplication5',\r\n\t),\r\n );\r\n}", "protected function _content_template()\n {\n ?>\n <div>\n <ul class=\"elementor-portfolio__filters cat-filter-for-{{ settings.post_id }}\">\n <li class=\"elementor-portfolio__filter elementor-active\">{{{ settings.all_text }}}</li>\n <li class=\"elementor-portfolio__filter\">{{{ settings.taxonomy }}} 1</li>\n <li class=\"elementor-portfolio__filter\">{{{ settings.taxonomy }}} 2</li>\n </ul>\n </div>\n<?php\n }", "function _action_vivian_theme_setup() {\n\t\tload_theme_textdomain( 'vivian', get_template_directory() . '/lang' );\n\n\t\tadd_theme_support( 'automatic-feed-links' );\n\t\tadd_theme_support( 'post-thumbnails' );\n\t\tadd_theme_support( 'title-tag' );\n\t\tadd_image_size( 'vivian_landscape_small', 300, 225, true );\n\t\tadd_image_size( 'vivian_landscape_medium', 1000, 600, true );\n\t\tadd_image_size( 'vivian_landscape_large', 2000, 1100, true );\n\t\tadd_image_size( 'vivian_landscape_wide', 1500, 300, true );\n\t\tadd_image_size( 'vivian_square_small', 100, 100, true );\n\t\tadd_image_size( 'vivian_portrait', 400, 550, true );\n\t\tadd_image_size( 'vivian_medium', 700, 700, true );\n\t\tadd_image_size( 'vivian_medium_soft', 700, 700, false );\n\t\tadd_image_size( 'vivian_large', 1300, 1300, true );\n\t\tadd_image_size( 'vivian_large_soft', 1300, 1300, false );\n\n\t\tset_post_thumbnail_size( 50, 50, true );\n\n\t\tadd_theme_support( 'html5', array(\n\t\t\t'search-form',\n\t\t\t'comment-form',\n\t\t\t'comment-list',\n\t\t\t'gallery',\n\t\t\t'caption'\n\t\t\t) );\n\t}", "protected function prepareTheme(): void\n {\n register_nav_menus([\n 'main' => 'Main Menu',\n 'footer' => 'Footer Menu',\n ]);\n \n add_theme_support('post-thumbnails', get_post_types(['public' => true]));\n }", "function shell_theme_setup() {\r\n\r\n\t/* Get action/filter hook prefix. */\r\n\t$prefix = hybrid_get_prefix();\r\n\r\n\t/* === HYBRID CORE FEATURES === */\r\n\r\n\t/* Register Navigation Menus */\r\n\tadd_theme_support( 'hybrid-core-menus', array( 'primary', 'secondary', 'subsidiary' ) );\r\n\r\n\t/* Register Sidebars */\r\n\tadd_theme_support( 'hybrid-core-sidebars', array( 'primary', 'secondary', 'header', 'subsidiary', 'after-singular' ) );\r\n\r\n\t/* Widgets Reloaded */\r\n\tadd_theme_support( 'hybrid-core-widgets' );\r\n\r\n\t/* Template Shortcodes */\r\n\tadd_theme_support( 'hybrid-core-shortcodes' );\r\n\r\n\t/* Theme Settings */\r\n\tadd_theme_support( 'hybrid-core-theme-settings', array( 'about', 'footer' ) );\r\n\r\n\t/* Better Template Hierarchy */\r\n\tadd_theme_support( 'hybrid-core-template-hierarchy' );\r\n\r\n\r\n\t/* === HYBRID CORE EXTENSIONS === */\r\n\r\n\t/* Loop Pagination */\r\n\tadd_theme_support( 'loop-pagination' );\r\n\r\n\t/* Get The Image */\r\n\tadd_theme_support( 'get-the-image' );\r\n\r\n\t/* Breadcrumb Trail */\r\n\tadd_theme_support( 'breadcrumb-trail' );\r\n\r\n\t/* Cleaner Gallery */\r\n\tadd_theme_support( 'cleaner-gallery' );\r\n\r\n\r\n\t/* === WORDPRESS FEATURES === */\r\n\r\n\t/* RSS Feed */\r\n\tadd_theme_support( 'automatic-feed-links' );\r\n\r\n\r\n\t/* === DEFAULT FILTERS === */\r\n\r\n\t/* Avatar size in comments: Hybrid Core - Comments Args */\r\n\tadd_filter( \"shell_list_comments_args\", 'shell_comments_args' );\r\n\r\n\r\n\t/* === THEME UPDATER === */\r\n\r\n\t/* Updater args */\r\n\t$updater_args = array(\r\n\t\t'repo_uri' => 'http://repo.shellcreeper.com/',\r\n\t\t'repo_slug' => 'shell',\r\n\t);\r\n\r\n\t/* Add support for updater */\r\n\tadd_theme_support( 'auto-hosted-theme-updater', $updater_args );\r\n}", "function get_theme_mods()\n {\n }", "function custom_post_Contentp() {\r\n\tregister_post_type( 'contentp',\r\n\t\tarray('labels' => array(\r\n\t\t\t'name' => __('Teacher Education Presentations', 'emc'),\r\n\t\t\t'singular_name' => __('Teacher Education Presentation', 'emc'),\r\n\t\t\t'all_items' => __('All Teacher Education Presentations', 'emc'),\r\n\t\t\t'add_new' => __('Add New', 'emc'),\r\n\t\t\t'add_new_item' => __('Add New Teacher Education Presentation', 'emc'),\r\n\t\t\t'edit' => __( 'Edit', 'emc' ),\r\n\t\t\t'edit_item' => __('Edit Teacher Education Presentation', 'emc'),\r\n\t\t\t'new_item' => __('New Teacher Education Presentation', 'emc'),\r\n\t\t\t'view_item' => __('View Teacher Education Presentation', 'emc'),\r\n\t\t\t'search_items' => __('Search Teacher Education Presentations', 'emc'),\r\n\t\t\t'not_found' => __('Nothing found in the Database.', 'emc'),\r\n\t\t\t'not_found_in_trash' => __('Nothing found in Trash', 'emc'),\r\n\t\t\t'parent_item_colon' => ''\r\n\t\t\t),\r\n\t\t\t'description' => __( 'This is the example Teacher Education Presentation', 'emc' ),\r\n\t\t\t'public' => true,\r\n\t\t\t'publicly_queryable' => true,\r\n\t\t\t'exclude_from_search' => false,\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'menu_position' => 5,\r\n\t\t\t'menu_icon' => get_stylesheet_directory_uri() . '/img/emc.png',\r\n\t\t\t'rewrite'\t=> array( 'slug' => 'teacher-education-presentations', 'with_front' => false ),\r\n\t\t\t'has_archive' => 'teacher-education-presentations',\r\n\t\t\t'capability_type' => 'post',\r\n\t\t\t'hierarchical' => true,\r\n\t\t\t'supports' => array( 'title', 'category', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'sticky')\r\n\t \t)\r\n\t);\r\n\t//register_taxonomy_for_object_type('category', 'reasearch');\r\n\t//register_taxonomy_for_object_type('post_tag', 'reasearch');\r\n}", "function um_theme_setup() {\n\t\tload_theme_textdomain( 'um-theme' );\n\n\t\t/*\n\t * Add default posts and comments RSS feed links to head.\n\t */\n\t\tadd_theme_support( 'automatic-feed-links' );\n\n\t\t/*\n\t\t * Let WordPress manage the document title.\n\t\t * By adding theme support, we declare that this theme does not use a\n\t\t * hard-coded <title> tag in the document head, and expect WordPress to\n\t\t * provide it for us.\n\t\t */\n\t\tadd_theme_support( 'title-tag' );\n\n\t\t/*\n\t\t * Enable support for Post Thumbnails on posts and pages.\n\t\t *\n\t\t * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails\n\t\t */\n\t\tadd_theme_support( 'post-thumbnails' );\n\t\tadd_image_size( 'um-theme-thumb', 820, 400, array( 'center', 'center' ) );\n\t\tset_post_thumbnail_size( 'um-theme-thumb', 820, 400 );\n\n\t\t/*\n\t\t * Enable support responsive embedded content\n\t\t * See: https://wordpress.org/gutenberg/handbook/extensibility/theme-support/#responsive-embedded-content\n\t\t */\n\t\tadd_theme_support( 'responsive-embeds' );\n\n\t\t// Add support for default block styles.\n\t\tadd_theme_support( 'wp-block-styles' );\n\n\t\t// Add support for full and wide align images.\n\t\tadd_theme_support( 'align-wide' );\n\n\t\t// Adds support for editor color palette.\n\t\tadd_theme_support( 'editor-color-palette', array(\n\t\t array(\n\t\t 'name' \t=> __( 'sky blue', 'um-theme' ),\n\t\t 'slug' \t=> 'strong-magenta',\n\t\t 'color' => '#6596ff',\n\t\t ),\n\t\t array(\n\t\t 'name' \t=> __( 'light grayish magenta', 'um-theme' ),\n\t\t 'slug' \t=> 'light-grayish-magenta',\n\t\t 'color' => '#333333',\n\t\t ),\n\t\t array(\n\t\t 'name' \t=> __( 'very light gray', 'um-theme' ),\n\t\t 'slug' \t=> 'very-light-gray',\n\t\t 'color' => '#eeeeee',\n\t\t ),\n\t\t array(\n\t\t 'name' \t=> __( 'very dark gray', 'um-theme' ),\n\t\t 'slug' \t=> 'very-dark-gray',\n\t\t 'color' => '#444444',\n\t\t ),\n\t\t) );\n\n\t\t/**\n\t\t * Register custom Custom Navigation Menus.\n\t\t * This theme uses wp_nav_menu() in the following locations.\n\t\t *\n\t\t * @link https://developer.wordpress.org/reference/functions/register_nav_menus/\n\t\t * @since 1.0.0\n\t\t */\n\t\tregister_nav_menus(\n\t\t\t/**\n\t\t\t * Filter registered nav menus.\n\t\t\t *\n\t\t\t * @since 1.0.0\n\t\t\t *\n\t\t\t * @var array\n\t\t\t */\n\t\t\t(array) apply_filters( 'um_theme_nav_menus',\n\t\t\t\tarray(\n\t\t\t\t\t'header-top' \t\t=> esc_html__( 'Top Bar Menu', 'um-theme' ),\n\t\t\t\t\t'primary' \t\t\t=> esc_html__( 'Primary Menu', 'um-theme' ),\n\t\t\t\t\t'header-bottom' \t=> esc_html__( 'Bottom Bar Menu', 'um-theme' ),\n\t\t\t\t\t'profile-menu' \t\t=> esc_html__( 'User Header Menu', 'um-theme' ),\n\t\t\t\t\t'footer' \t\t\t=> esc_html__( 'Footer Menu', 'um-theme' ),\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t// Add theme support for Custom Logo.\n\t\tadd_theme_support( 'custom-logo' );\n\n\t\t/*\n\t\t * Switch default core yorkup for search form, comment form, and comments\n\t\t * to output valid HTML5.\n\t\t */\n\t\tadd_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) );\n\n\t\tadd_theme_support( 'widget-customizer' );\n\n\t /*\n\t * Enable support for Customizer Selective Refresh.\n\t * See: https://make.wordpress.org/core/2016/02/16/selective-refresh-in-the-customizer/\n\t */\n\t\tadd_theme_support( 'customize-selective-refresh-widgets' );\n\n\t\tadd_theme_support( 'custom-background', (array) apply_filters( 'um_custom_background_args',\n\t\t\tarray(\n\t\t\t\t'default-color' => '#f6f9fc',\n\t\t\t\t'default-image' => '',\n\t\t\t)\n\t\t) );\n\n\t\t// Set the default content width.\n\t\t$GLOBALS['content_width'] = (int) apply_filters( 'um_content_width', 640 );\n\n\t\tadd_editor_style();\n\t}", "public function theme() {\n \treturn array(\n \t\t'node_list' => array(\n \t\t\t'template' => 'node-list',\n \t\t\t'path' => drupal_get_path('module', 'scf') . '/theme',\n \t\t\t'arguments' => array(\n \t\t\t\t'items' => array(),\n \t\t\t\t'title' => NULL,\n \t\t\t\t'nid' => NULL,\n \t\t\t\t'haslink' => NULL,\n \t\t\t\t'associations' => array(),\n \t 'name' => NULL,\n \t 'form' => NULL,\n \t\t\t)\t\n \t\t)\n \t);\n }", "function ldc_theme_init() {\n global $ldc_theme;\n $ldc_theme = wp_get_theme();\n\n\n\n // allow editor style\n add_editor_style( get_stylesheet_directory_uri() . '/library/css/editor-style.css' );\n\n // let's get language support going, if you need it\n load_theme_textdomain( 'bonestheme', get_template_directory() . '/library/translation' );\n\n\n\n //// Init CMB2.\n // require_once 'library/cmb2/init.php';\n\n\n //// Load custom post types.\n require_once 'library/cpt/cpt-ldc_chatter.php';\n require_once 'library/cpt/cpt-ldc_creation.php';\n require_once 'library/cpt/cpt-ldc_event.php';\n\n\n //// Load shortcodes.\n require_once 'library/sc/sc-ldc_list.php';\n\n\n // launching operation cleanup\n add_action( 'init', 'bones_head_cleanup' );\n // A better title\n add_filter( 'wp_title', 'rw_title', 10, 3 );\n // remove WP version from RSS\n add_filter( 'the_generator', 'bones_rss_version' );\n // remove pesky injected css for recent comments widget\n add_filter( 'wp_head', 'bones_remove_wp_widget_recent_comments_style', 1 );\n // clean up comment styles in the head\n add_action( 'wp_head', 'bones_remove_recent_comments_style', 1 );\n // clean up gallery output in wp\n add_filter( 'gallery_style', 'bones_gallery_style' );\n\n // enqueue base scripts and styles\n add_action( 'wp_enqueue_scripts', 'bones_scripts_and_styles', 999 );\n // ie conditional wrapper\n\n // launching this stuff after theme setup\n bones_theme_support();\n\n // adding sidebars to Wordpress (these are created in functions.php)\n add_action( 'widgets_init', 'bones_register_sidebars' );\n\n // cleaning up random code around images\n add_filter( 'the_content', 'bones_filter_ptags_on_images' );\n // cleaning up excerpt\n add_filter( 'excerpt_more', 'bones_excerpt_more' );\n\n}", "public static function getContentType()\n {\n return ['core', 'page'];\n }", "public function setContentType($content_type) {}", "function theme_typography_css() {\n if (is_customize_preview()) {\n $typography_css = get_theme_mod('typography_css');\n if ($typography_css) {\n echo \"$typography_css\\n\";\n }\n }\n}", "function cinerama_edge_register_theme_settings() {\n\t\tregister_setting( EDGE_OPTIONS_SLUG, 'edgtf_options' );\n\t}", "public function settings_field_theme() {\n\t\t?>\n\t\t<select name=\"theme_my_login_recaptcha[theme]\" id=\"theme_my_login_recaptcha_theme\">\n\t\t<?php foreach ( $this->get_themes() as $theme => $theme_name ) : ?>\n\t\t\t<option value=\"<?php echo $theme; ?>\"<?php selected( $this->get_option( 'theme' ), $theme ); ?>><?php echo $theme_name; ?></option>\n\t\t<?php endforeach; ?>\n\t\t</select>\n\t\t<?php\n\t}", "function carbon_register_post_type($settings){\n\n $labels = array(\n 'name' => _x($settings['plural'],'post type plural name','carbon'),\n 'singular_name' => _x($settings['singular'],'post type singular name','carbon'),\n 'add_new' => _x('Add New',$settings['singular'],'carbon'),\n 'add_new_item' => __('Add New ' .$settings['singular']),\n 'edit_item' => __('Edit ' .$settings['singular']),\n 'new_item' => __('New ' .$settings['singular']),\n 'all_items' => __('All ' .$settings['plural']),\n 'view_item' => __('View ' .$settings['singular']),\n 'search_items' => __('Search ' .$settings['plural']),\n 'not_found' => __('No ' .$settings['plural'].' found'),\n 'not_found_in_trash' => __('No ' .$settings['plural'].' found in Trash'),\n 'parent_item_colon' => ':',\n 'menu_name' => $settings['plural'],\n );\n\n $args = array(\n 'labels' => $labels,\n 'can_export' => (isset($settings['can_export']) ? $settings['can_export'] : true), // defaults true\n 'capability_type' => (isset($settings['capability_type']) ? $settings['behavior'] : 'post'), // default post\n // 'capabilities' // default capability_type\n 'exclude_from_search' => (isset($settings['exclude_from_search']) ? $settings['exclude_from_search'] : false), // default opposite of public\n 'hierarchical' => (isset($settings['hierarchical']) ? $settings['hierarchical'] : false), // default false\n 'has_archive' => (isset($settings['has_archive']) ? $settings['has_archive'] : false), // default false\n // 'permalink_epmask' // default EP_PERMALINK\n 'public' => (isset($settings['public']) ? $settings['public'] : true), // default false\n 'publicly_queryable' => (isset($settings['publicly_queryable']) ? $settings['publicly_queryable'] : true), // default public\n 'query_var' => (isset($settings['query_var']) ? $settings['query_var'] : true), // default true type\n 'show_ui' => (isset($settings['show_ui']) ? $settings['show_ui'] : true), // default public\n 'show_in_menu' => (isset($settings['show_in_menu']) ? $settings['show_in_menu'] : true), // default public\n 'show_in_admin_bar' => (isset($settings['show_in_admin_bar']) ? $settings['show_in_admin_bar'] : true), // default show_in_menu\n 'menu_position' => (isset($settings['menu_position']) ? $settings['menu_position'] : null), // default null\n 'menu_icon' => (isset($settings['menu_icon']) ? $settings['menu_icon'] : 'dashicons-admin-post'),\n 'supports' => (isset($settings['supports']) ? $settings['supports'] : array('title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'page-attributes')), // default title editor\n 'taxonomies' => (isset($settings['taxonomies']) ? $settings['taxonomies'] : array()), // default none\n // 'register_meta_box_cb' // default none\n 'rewrite' => (isset($settings['rewrite']) ? $settings['rewrite'] : array( // default true name\n 'slug' => (isset($settings['slug']) ? $settings['slug'] : $settings['type']), // default type\n 'with_front' => (isset($settings['with_front']) ? $settings['with_front'] : false), // default true\n 'feeds' => (isset($settings['feeds']) ? $settings['feeds'] : false), // default has_archive\n 'pages' => (isset($settings['pages']) ? $settings['pages'] : true), // defaults true\n // 'ep_mask' // default permalink_epmask EP_PERMALINK\n )),\n );\n register_post_type($settings['type'], $args);\n }", "function theme_content_width() {\n global $content_width;\n\n if (is_attachment())\n $content_width = 724;\n elseif (has_post_format('audio'))\n $content_width = 484;\n}", "function redmoon_setup(){\n load_theme_textdomain( 'redmoon', get_template_directory( ).'/languages' ); \n\n //Feed automático\n add_theme_support('automatic-feed-links'); \n\n //Thumbnails\n add_theme_support( 'post-thumbnails' ); \n\n //opciones d post's\n add_theme_support( 'post-formats', array('aside', 'gallery', 'quote', 'image', 'video') );\n\n //registramos los distintos menus\n register_nav_menus( array(\n 'main_menu' => __('Menú principal', 'redmoon'),\n 'responsive_main_menu' => __('Responsive Menú', 'redmoon'),\n 'social_header' => __('Social Cabecera', 'redmoon'),\n 'footer_social' => __('Social Pie de Página', 'redmoon')\n ) );\n\n require_once get_template_directory( ).'/inc/theme-options/setup-options-theme.php';\n setup_options_theme();\n\n }", "function purity_theme_init() {\n elgg_extend_view('page/elements/head', 'purity_theme/meta');\n elgg_unregister_menu_item('topbar', 'elgg_logo');\n\telgg_register_plugin_hook_handler('index', 'system', 'purity_theme');\n}", "public function setup_theme()\n {\n add_theme_support('title-tag');\n\n /* WP custom logo */\n add_theme_support(\n 'custom-logo',\n [\n 'header-text' => [\n 'site-title',\n 'site-description'\n ],\n 'height' => 100,\n 'width' => 100,\n ]\n );\n\n\n /* Add theme support for selective refresh for widgets */\n add_theme_support('customize-selective-refresh-widgets');\n\n /* Add default posts and comments RSS feed links to head */\n add_theme_support('automatic-feed-links');\n\n /**\n * Switch default core markup for search form, comment form, comment-list, gallery, caption, script and style\n * to output valid HTML5.\n */\n add_theme_support(\n 'html5',\n [\n 'search-form',\n 'comment-form',\n 'comment-list',\n 'gallery',\n 'caption',\n 'script',\n 'style',\n ]\n );\n\n /* Gutenberg theme support */\n add_theme_support('wp-block-styles');\n add_theme_support('align-wide');\n add_theme_support('editor-styles');\n\n global $content_width;\n if (!isset($content_width)) $content_width = 1240;\n }", "function elijah_customize_cpt_content( $content ) {\n\tif( ! is_archive() && ! is_author() && !is_search() ) {\n\t\tif ($GLOBALS['post']->post_type == 'research_goal') {\n\t\t\tob_start();\n\t\t\tinclude( elijah_templates_dir . 'research-goal-content.php' );\n\t\t\t$content = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t} elseif( $GLOBALS['post']->post_type == 'research_tip') {\n\t\t\tob_start();\n\t\t\tinclude( elijah_templates_dir . 'research-tip-content.php' );\n\t\t\t$content = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t}\n\t}\n\treturn $content;\n}", "static function get_settings(){\n\t\t\t\treturn array(\t\n\t\t\t\t\t'icon' => GDLR_CORE_URL . '/framework/images/page-builder/nav-template.png', \n\t\t\t\t\t'title' => esc_html__('Templates', 'goodlayers-core')\n\t\t\t\t);\n\t\t\t}", "function display_theme($theme)\n {\n }", "public function contenttypeAction() {\n\t$resource_type = $this->_getParam('resource_type');\n\t$story_type = $this->_getParam('story_type', null);\n\t$calling_from = $this->_getParam('calling_from', null);\n\t$resource_id = $this->_getParam('resource_id', null);\n\n\t$resource_array = array();\n\tif (!empty($resource_type)) {\n\t $resource_array = Engine_Api::_()->communityad()->resource_content($resource_type, $story_type, $calling_from, $resource_id);\n\t $getModType = Engine_Api::_()->getDbTable('modules', 'communityad')->getModuleInfo($resource_type);\n\t}\n\n\t$this->view->resource_string = $resource_array;\n\t$this->view->resource_type = $resource_type;\n\tif( !empty( $getModType ) && !empty($getModType['module_title']) ) {\n\t $this->view->modTitle = $getModType['module_title'];\n\t}\n }", "function get_theme_starter_content()\n {\n }", "function classiera_add_settings_page() { \r\n add_theme_page('Categories Custom Fields', 'Categories Custom Fields', 'manage_options', 'settings', 'classiera_theme_settings_page'); \r\n}", "function fr_front_page_editing(){\r\n\tregister_post_type('fr_front page', array(\r\n\t\t'supports' => array('title', 'editor', 'excerpt'),\r\n\t\t'rewrite' => array('slug' => 'fr_front page'),\r\n\t\t'has archive' => true,\r\n\t\t'public' => true,\r\n\t\t'labels' => array(\r\n\t\t\t'name' => 'FR_Front Page Statement',\r\n\t\t\t'edit_item' => 'FR_Edit Front Page',\r\n\t\t\t'singular' => 'FR_Front Page Statement'\r\n\t\t),\r\n\t\t'menu_icon' => 'dashicons-admin-home'\r\n\t));\r\n}", "function prfx_admin_styles(){\r\n global $typenow;\r\n if( $typenow == 'page' ) {\r\n wp_enqueue_style( 'prfx_meta_box_styles', plugin_dir_url( __FILE__ ) . '/css/meta-box-style.css' );\r\n }\r\n}" ]
[ "0.6693527", "0.668327", "0.65220195", "0.6435913", "0.63750255", "0.63635767", "0.6354345", "0.63294053", "0.6279334", "0.62736714", "0.62616986", "0.6258032", "0.6242749", "0.62193364", "0.62175834", "0.6215949", "0.6210672", "0.6210186", "0.6188366", "0.61840093", "0.6179921", "0.6168804", "0.6157044", "0.6147207", "0.61397165", "0.60973346", "0.6088657", "0.60882705", "0.6087744", "0.6080696", "0.6078336", "0.6059247", "0.60558933", "0.6055171", "0.6054996", "0.6054076", "0.6051823", "0.60410464", "0.6031685", "0.6031184", "0.6024301", "0.60234624", "0.6022938", "0.60190153", "0.6017851", "0.6016671", "0.60132664", "0.6005984", "0.59987533", "0.5997585", "0.5996115", "0.5993831", "0.5984176", "0.5980875", "0.5979308", "0.59765863", "0.5973661", "0.59684014", "0.59606826", "0.59601265", "0.5959869", "0.5956649", "0.59411216", "0.59352946", "0.5933627", "0.59315896", "0.5929784", "0.59248227", "0.5923633", "0.59236103", "0.59219867", "0.59095937", "0.59057784", "0.59026396", "0.5896304", "0.58916193", "0.5890531", "0.58903706", "0.5889636", "0.5889364", "0.58866155", "0.58864796", "0.5883902", "0.58827364", "0.5882467", "0.5878669", "0.58774304", "0.58770174", "0.5871339", "0.5868045", "0.5865845", "0.58625257", "0.585843", "0.58543193", "0.5853493", "0.584227", "0.58394724", "0.58371973", "0.58328646", "0.5832344" ]
0.61514163
23